-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
RestoreRequestInfo.cs
134 lines (127 loc) · 7.92 KB
/
RestoreRequestInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;
namespace Azure.ResourceManager.AppService.Models
{
/// <summary> Description of a restore request. </summary>
public partial class RestoreRequestInfo : ResourceData
{
/// <summary>
/// Keeps track of any properties unknown to the library.
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
private IDictionary<string, BinaryData> _serializedAdditionalRawData;
/// <summary> Initializes a new instance of <see cref="RestoreRequestInfo"/>. </summary>
public RestoreRequestInfo()
{
Databases = new ChangeTrackingList<AppServiceDatabaseBackupSetting>();
}
/// <summary> Initializes a new instance of <see cref="RestoreRequestInfo"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="storageAccountUri"> SAS URL to the container. </param>
/// <param name="blobName"> Name of a blob which contains the backup. </param>
/// <param name="canOverwrite"> <code>true</code> if the restore operation can overwrite target app; otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an existing app. </param>
/// <param name="siteName"> Name of an app. </param>
/// <param name="databases"> Collection of databases which should be restored. This list has to match the list of databases included in the backup. </param>
/// <param name="ignoreConflictingHostNames">
/// Changes a logic when restoring an app with custom domains. <code>true</code> to remove custom domains automatically. If <code>false</code>, custom domains are added to
/// the app's object when it is being restored, but that might fail due to conflicts during the operation.
/// </param>
/// <param name="ignoreDatabases"> Ignore the databases and only restore the site content. </param>
/// <param name="appServicePlan"> Specify app service plan that will own restored site. </param>
/// <param name="operationType"> Operation type. </param>
/// <param name="adjustConnectionStrings"> <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>. </param>
/// <param name="hostingEnvironment"> App Service Environment name, if needed (only when restoring an app to an App Service Environment). </param>
/// <param name="kind"> Kind of resource. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal RestoreRequestInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Uri storageAccountUri, string blobName, bool? canOverwrite, string siteName, IList<AppServiceDatabaseBackupSetting> databases, bool? ignoreConflictingHostNames, bool? ignoreDatabases, string appServicePlan, BackupRestoreOperationType? operationType, bool? adjustConnectionStrings, string hostingEnvironment, string kind, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
StorageAccountUri = storageAccountUri;
BlobName = blobName;
CanOverwrite = canOverwrite;
SiteName = siteName;
Databases = databases;
IgnoreConflictingHostNames = ignoreConflictingHostNames;
IgnoreDatabases = ignoreDatabases;
AppServicePlan = appServicePlan;
OperationType = operationType;
AdjustConnectionStrings = adjustConnectionStrings;
HostingEnvironment = hostingEnvironment;
Kind = kind;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> SAS URL to the container. </summary>
[WirePath("properties.storageAccountUrl")]
public Uri StorageAccountUri { get; set; }
/// <summary> Name of a blob which contains the backup. </summary>
[WirePath("properties.blobName")]
public string BlobName { get; set; }
/// <summary> <code>true</code> if the restore operation can overwrite target app; otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an existing app. </summary>
[WirePath("properties.overwrite")]
public bool? CanOverwrite { get; set; }
/// <summary> Name of an app. </summary>
[WirePath("properties.siteName")]
public string SiteName { get; set; }
/// <summary> Collection of databases which should be restored. This list has to match the list of databases included in the backup. </summary>
[WirePath("properties.databases")]
public IList<AppServiceDatabaseBackupSetting> Databases { get; }
/// <summary>
/// Changes a logic when restoring an app with custom domains. <code>true</code> to remove custom domains automatically. If <code>false</code>, custom domains are added to
/// the app's object when it is being restored, but that might fail due to conflicts during the operation.
/// </summary>
[WirePath("properties.ignoreConflictingHostNames")]
public bool? IgnoreConflictingHostNames { get; set; }
/// <summary> Ignore the databases and only restore the site content. </summary>
[WirePath("properties.ignoreDatabases")]
public bool? IgnoreDatabases { get; set; }
/// <summary> Specify app service plan that will own restored site. </summary>
[WirePath("properties.appServicePlan")]
public string AppServicePlan { get; set; }
/// <summary> Operation type. </summary>
[WirePath("properties.operationType")]
public BackupRestoreOperationType? OperationType { get; set; }
/// <summary> <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>. </summary>
[WirePath("properties.adjustConnectionStrings")]
public bool? AdjustConnectionStrings { get; set; }
/// <summary> App Service Environment name, if needed (only when restoring an app to an App Service Environment). </summary>
[WirePath("properties.hostingEnvironment")]
public string HostingEnvironment { get; set; }
/// <summary> Kind of resource. </summary>
[WirePath("kind")]
public string Kind { get; set; }
}
}