Skip to content

Commit

Permalink
[AutoPR web/resource-manager] WebApps - Add BackupName to backup API …
Browse files Browse the repository at this point in the history
…models (#3058)

* Generated from 6162973ef0993464a1806f8db5ca913f0fa5d6c8

WebApps - Add BackupName to replace non-ARM-compliant Name property on Backup API models

* Generated from c8664a06cff19844eb381ad410872b34cba23b27

Revert breaking change to BackupItem. BackupItemName property will be fine in place of BackupName for now.
  • Loading branch information
AutorestCI authored Aug 20, 2018
1 parent 5ac171b commit 7f6cf48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions azure-mgmt-web/azure/mgmt/web/models/backup_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class BackupRequest(ProxyOnlyResource):
:type kind: str
:ivar type: Resource type.
:vartype type: str
:param backup_name: Name of the backup.
:type backup_name: str
:param enabled: True if the backup schedule is enabled (must be included
in that case), false if the backup schedule should be disabled.
:type enabled: bool
Expand All @@ -52,6 +54,7 @@ class BackupRequest(ProxyOnlyResource):
'name': {'key': 'name', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'backup_name': {'key': 'properties.backupName', 'type': 'str'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'},
'backup_schedule': {'key': 'properties.backupSchedule', 'type': 'BackupSchedule'},
Expand All @@ -60,6 +63,7 @@ class BackupRequest(ProxyOnlyResource):

def __init__(self, **kwargs):
super(BackupRequest, self).__init__(**kwargs)
self.backup_name = kwargs.get('backup_name', None)
self.enabled = kwargs.get('enabled', None)
self.storage_account_url = kwargs.get('storage_account_url', None)
self.backup_schedule = kwargs.get('backup_schedule', None)
Expand Down
6 changes: 5 additions & 1 deletion azure-mgmt-web/azure/mgmt/web/models/backup_request_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class BackupRequest(ProxyOnlyResource):
:type kind: str
:ivar type: Resource type.
:vartype type: str
:param backup_name: Name of the backup.
:type backup_name: str
:param enabled: True if the backup schedule is enabled (must be included
in that case), false if the backup schedule should be disabled.
:type enabled: bool
Expand All @@ -52,14 +54,16 @@ class BackupRequest(ProxyOnlyResource):
'name': {'key': 'name', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'backup_name': {'key': 'properties.backupName', 'type': 'str'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'},
'backup_schedule': {'key': 'properties.backupSchedule', 'type': 'BackupSchedule'},
'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'},
}

def __init__(self, *, storage_account_url: str, kind: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None:
def __init__(self, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None:
super(BackupRequest, self).__init__(kind=kind, **kwargs)
self.backup_name = backup_name
self.enabled = enabled
self.storage_account_url = storage_account_url
self.backup_schedule = backup_schedule
Expand Down

0 comments on commit 7f6cf48

Please # to comment.