Skip to content

Commit 2a772b6

Browse files
author
SDKAuto
committed
CodeGen from PR 18971 in Azure/azure-rest-api-specs
Merge 6e0903ba2cb7f3b5782dc9602752935d42542a96 into 324a148497f28ef7588eee7bdb61dcd28b74f505
1 parent 5ebba6e commit 2a772b6

File tree

7 files changed

+74
-52
lines changed

7 files changed

+74
-52
lines changed

sdk/servicelinker/azure-mgmt-servicelinker/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "9d8640319ef481ae301b67b033d6ae0bd30422c3",
7+
"commit": "6a49ba4da5d28c034ddba7800e1eb6724bd9d02f",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
1010
"readme": "specification/servicelinker/resource-manager/readme.md"
1111
}

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "1.0.0b1"

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/operations/_linker_operations.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ async def _validate_initial(
545545
resource_uri: str,
546546
linker_name: str,
547547
**kwargs: Any
548-
) -> Optional["_models.ValidateResult"]:
549-
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ValidateResult"]]
548+
) -> Optional["_models.ValidateOperationResult"]:
549+
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ValidateOperationResult"]]
550550
error_map = {
551551
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
552552
}
@@ -577,7 +577,7 @@ async def _validate_initial(
577577

578578
deserialized = None
579579
if response.status_code == 200:
580-
deserialized = self._deserialize('ValidateResult', pipeline_response)
580+
deserialized = self._deserialize('ValidateOperationResult', pipeline_response)
581581

582582
if cls:
583583
return cls(pipeline_response, deserialized, {})
@@ -593,7 +593,7 @@ async def begin_validate(
593593
resource_uri: str,
594594
linker_name: str,
595595
**kwargs: Any
596-
) -> AsyncLROPoller["_models.ValidateResult"]:
596+
) -> AsyncLROPoller["_models.ValidateOperationResult"]:
597597
"""Validate a link.
598598
599599
:param resource_uri: The fully qualified Azure Resource manager identifier of the resource to
@@ -609,14 +609,15 @@ async def begin_validate(
609609
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
610610
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
611611
Retry-After header is present.
612-
:return: An instance of AsyncLROPoller that returns either ValidateResult or the result of
613-
cls(response)
614-
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.servicelinker.models.ValidateResult]
612+
:return: An instance of AsyncLROPoller that returns either ValidateOperationResult or the
613+
result of cls(response)
614+
:rtype:
615+
~azure.core.polling.AsyncLROPoller[~azure.mgmt.servicelinker.models.ValidateOperationResult]
615616
:raises: ~azure.core.exceptions.HttpResponseError
616617
"""
617618
api_version = kwargs.pop('api_version', "2022-05-01") # type: str
618619
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
619-
cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateResult"]
620+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateOperationResult"]
620621
lro_delay = kwargs.pop(
621622
'polling_interval',
622623
self._config.polling_interval
@@ -634,7 +635,7 @@ async def begin_validate(
634635

635636
def get_long_running_output(pipeline_response):
636637
response = pipeline_response.http_response
637-
deserialized = self._deserialize('ValidateResult', pipeline_response)
638+
deserialized = self._deserialize('ValidateOperationResult', pipeline_response)
638639
if cls:
639640
return cls(pipeline_response, deserialized, {})
640641
return deserialized

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,20 @@
3737
from ._models_py3 import TargetServiceBase
3838
from ._models_py3 import UserAssignedIdentityAuthInfo
3939
from ._models_py3 import VNetSolution
40-
from ._models_py3 import ValidateResult
40+
from ._models_py3 import ValidateOperationResult
4141
from ._models_py3 import ValidationResultItem
4242
from ._models_py3 import ValueSecretInfo
4343

4444

4545
from ._service_linker_management_client_enums import (
4646
ActionType,
4747
AuthType,
48+
AzureResourceType,
4849
ClientType,
4950
CreatedByType,
5051
Origin,
5152
SecretType,
52-
Type,
53+
TargetServiceType,
5354
VNetSolutionType,
5455
ValidationResultStatus,
5556
)
@@ -86,16 +87,17 @@
8687
'TargetServiceBase',
8788
'UserAssignedIdentityAuthInfo',
8889
'VNetSolution',
89-
'ValidateResult',
90+
'ValidateOperationResult',
9091
'ValidationResultItem',
9192
'ValueSecretInfo',
9293
'ActionType',
9394
'AuthType',
95+
'AzureResourceType',
9496
'ClientType',
9597
'CreatedByType',
9698
'Origin',
9799
'SecretType',
98-
'Type',
100+
'TargetServiceType',
99101
'VNetSolutionType',
100102
'ValidationResultStatus',
101103
]

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_models_py3.py

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class AzureResourcePropertiesBase(msrest.serialization.Model):
6060
All required parameters must be populated in order to send to Azure.
6161
6262
:ivar type: Required. The azure resource type.Constant filled by server. Possible values
63-
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault".
64-
:vartype type: str or ~azure.mgmt.servicelinker.models.Type
63+
include: "KeyVault".
64+
:vartype type: str or ~azure.mgmt.servicelinker.models.AzureResourceType
6565
"""
6666

6767
_validation = {
@@ -92,8 +92,8 @@ class AzureKeyVaultProperties(AzureResourcePropertiesBase):
9292
All required parameters must be populated in order to send to Azure.
9393
9494
:ivar type: Required. The azure resource type.Constant filled by server. Possible values
95-
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault".
96-
:vartype type: str or ~azure.mgmt.servicelinker.models.Type
95+
include: "KeyVault".
96+
:vartype type: str or ~azure.mgmt.servicelinker.models.AzureResourceType
9797
:ivar connect_as_kubernetes_csi_driver: True if connect via Kubernetes CSI Driver.
9898
:vartype connect_as_kubernetes_csi_driver: bool
9999
"""
@@ -131,8 +131,8 @@ class TargetServiceBase(msrest.serialization.Model):
131131
All required parameters must be populated in order to send to Azure.
132132
133133
:ivar type: Required. The target service type.Constant filled by server. Possible values
134-
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault".
135-
:vartype type: str or ~azure.mgmt.servicelinker.models.Type
134+
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry".
135+
:vartype type: str or ~azure.mgmt.servicelinker.models.TargetServiceType
136136
"""
137137

138138
_validation = {
@@ -163,8 +163,8 @@ class AzureResource(TargetServiceBase):
163163
All required parameters must be populated in order to send to Azure.
164164
165165
:ivar type: Required. The target service type.Constant filled by server. Possible values
166-
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault".
167-
:vartype type: str or ~azure.mgmt.servicelinker.models.Type
166+
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry".
167+
:vartype type: str or ~azure.mgmt.servicelinker.models.TargetServiceType
168168
:ivar id: The Id of azure resource.
169169
:vartype id: str
170170
:ivar resource_properties: The azure resource connection related properties.
@@ -206,8 +206,8 @@ class ConfluentBootstrapServer(TargetServiceBase):
206206
All required parameters must be populated in order to send to Azure.
207207
208208
:ivar type: Required. The target service type.Constant filled by server. Possible values
209-
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault".
210-
:vartype type: str or ~azure.mgmt.servicelinker.models.Type
209+
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry".
210+
:vartype type: str or ~azure.mgmt.servicelinker.models.TargetServiceType
211211
:ivar endpoint: The endpoint of service.
212212
:vartype endpoint: str
213213
"""
@@ -242,8 +242,8 @@ class ConfluentSchemaRegistry(TargetServiceBase):
242242
All required parameters must be populated in order to send to Azure.
243243
244244
:ivar type: Required. The target service type.Constant filled by server. Possible values
245-
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault".
246-
:vartype type: str or ~azure.mgmt.servicelinker.models.Type
245+
include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry".
246+
:vartype type: str or ~azure.mgmt.servicelinker.models.TargetServiceType
247247
:ivar endpoint: The endpoint of service.
248248
:vartype endpoint: str
249249
"""
@@ -1264,9 +1264,13 @@ def __init__(
12641264
self.subscription_id = subscription_id
12651265

12661266

1267-
class ValidateResult(msrest.serialization.Model):
1268-
"""The validation result for a linker.
1267+
class ValidateOperationResult(msrest.serialization.Model):
1268+
"""The validation operation result for a linker.
12691269
1270+
:ivar resource_id: Validated linker id.
1271+
:vartype resource_id: str
1272+
:ivar status: Validation operation status.
1273+
:vartype status: str
12701274
:ivar linker_name: The linker name.
12711275
:vartype linker_name: str
12721276
:ivar is_connection_available: A boolean value indicating whether the connection is available
@@ -1288,19 +1292,23 @@ class ValidateResult(msrest.serialization.Model):
12881292
"""
12891293

12901294
_attribute_map = {
1291-
'linker_name': {'key': 'linkerName', 'type': 'str'},
1292-
'is_connection_available': {'key': 'isConnectionAvailable', 'type': 'bool'},
1293-
'report_start_time_utc': {'key': 'reportStartTimeUtc', 'type': 'iso-8601'},
1294-
'report_end_time_utc': {'key': 'reportEndTimeUtc', 'type': 'iso-8601'},
1295-
'source_id': {'key': 'sourceId', 'type': 'str'},
1296-
'target_id': {'key': 'targetId', 'type': 'str'},
1297-
'auth_type': {'key': 'authType', 'type': 'str'},
1298-
'validation_detail': {'key': 'validationDetail', 'type': '[ValidationResultItem]'},
1295+
'resource_id': {'key': 'resourceId', 'type': 'str'},
1296+
'status': {'key': 'status', 'type': 'str'},
1297+
'linker_name': {'key': 'properties.linkerName', 'type': 'str'},
1298+
'is_connection_available': {'key': 'properties.isConnectionAvailable', 'type': 'bool'},
1299+
'report_start_time_utc': {'key': 'properties.reportStartTimeUtc', 'type': 'iso-8601'},
1300+
'report_end_time_utc': {'key': 'properties.reportEndTimeUtc', 'type': 'iso-8601'},
1301+
'source_id': {'key': 'properties.sourceId', 'type': 'str'},
1302+
'target_id': {'key': 'properties.targetId', 'type': 'str'},
1303+
'auth_type': {'key': 'properties.authType', 'type': 'str'},
1304+
'validation_detail': {'key': 'properties.validationDetail', 'type': '[ValidationResultItem]'},
12991305
}
13001306

13011307
def __init__(
13021308
self,
13031309
*,
1310+
resource_id: Optional[str] = None,
1311+
status: Optional[str] = None,
13041312
linker_name: Optional[str] = None,
13051313
is_connection_available: Optional[bool] = None,
13061314
report_start_time_utc: Optional[datetime.datetime] = None,
@@ -1312,6 +1320,10 @@ def __init__(
13121320
**kwargs
13131321
):
13141322
"""
1323+
:keyword resource_id: Validated linker id.
1324+
:paramtype resource_id: str
1325+
:keyword status: Validation operation status.
1326+
:paramtype status: str
13151327
:keyword linker_name: The linker name.
13161328
:paramtype linker_name: str
13171329
:keyword is_connection_available: A boolean value indicating whether the connection is
@@ -1331,7 +1343,9 @@ def __init__(
13311343
:keyword validation_detail: The detail of validation result.
13321344
:paramtype validation_detail: list[~azure.mgmt.servicelinker.models.ValidationResultItem]
13331345
"""
1334-
super(ValidateResult, self).__init__(**kwargs)
1346+
super(ValidateOperationResult, self).__init__(**kwargs)
1347+
self.resource_id = resource_id
1348+
self.status = status
13351349
self.linker_name = linker_name
13361350
self.is_connection_available = is_connection_available
13371351
self.report_start_time_utc = report_start_time_utc
@@ -1349,7 +1363,7 @@ class ValidationResultItem(msrest.serialization.Model):
13491363
:vartype name: str
13501364
:ivar description: The display name of validation item.
13511365
:vartype description: str
1352-
:ivar result: The result of validation. Possible values include: "success", "failed",
1366+
:ivar result: The result of validation. Possible values include: "success", "failure",
13531367
"warning".
13541368
:vartype result: str or ~azure.mgmt.servicelinker.models.ValidationResultStatus
13551369
:ivar error_message: The error message of validation result.
@@ -1381,7 +1395,7 @@ def __init__(
13811395
:paramtype name: str
13821396
:keyword description: The display name of validation item.
13831397
:paramtype description: str
1384-
:keyword result: The result of validation. Possible values include: "success", "failed",
1398+
:keyword result: The result of validation. Possible values include: "success", "failure",
13851399
"warning".
13861400
:paramtype result: str or ~azure.mgmt.servicelinker.models.ValidationResultStatus
13871401
:keyword error_message: The error message of validation result.

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_service_linker_management_client_enums.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ class AuthType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
2727
SERVICE_PRINCIPAL_CERTIFICATE = "servicePrincipalCertificate"
2828
SECRET = "secret"
2929

30+
class AzureResourceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
31+
"""The azure resource type.
32+
"""
33+
34+
KEY_VAULT = "KeyVault"
35+
3036
class ClientType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
3137
"""The application client type
3238
"""
@@ -68,21 +74,20 @@ class SecretType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
6874
KEY_VAULT_SECRET_URI = "keyVaultSecretUri"
6975
KEY_VAULT_SECRET_REFERENCE = "keyVaultSecretReference"
7076

71-
class Type(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
77+
class TargetServiceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
7278
"""The target service type.
7379
"""
7480

7581
AZURE_RESOURCE = "AzureResource"
7682
CONFLUENT_BOOTSTRAP_SERVER = "ConfluentBootstrapServer"
7783
CONFLUENT_SCHEMA_REGISTRY = "ConfluentSchemaRegistry"
78-
KEY_VAULT = "KeyVault"
7984

8085
class ValidationResultStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
8186
"""The result of validation
8287
"""
8388

8489
SUCCESS = "success"
85-
FAILED = "failed"
90+
FAILURE = "failure"
8691
WARNING = "warning"
8792

8893
class VNetSolutionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_linker_operations.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,8 @@ def _validate_initial(
800800
resource_uri: str,
801801
linker_name: str,
802802
**kwargs: Any
803-
) -> Optional["_models.ValidateResult"]:
804-
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ValidateResult"]]
803+
) -> Optional["_models.ValidateOperationResult"]:
804+
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ValidateOperationResult"]]
805805
error_map = {
806806
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
807807
}
@@ -832,7 +832,7 @@ def _validate_initial(
832832

833833
deserialized = None
834834
if response.status_code == 200:
835-
deserialized = self._deserialize('ValidateResult', pipeline_response)
835+
deserialized = self._deserialize('ValidateOperationResult', pipeline_response)
836836

837837
if cls:
838838
return cls(pipeline_response, deserialized, {})
@@ -848,7 +848,7 @@ def begin_validate(
848848
resource_uri: str,
849849
linker_name: str,
850850
**kwargs: Any
851-
) -> LROPoller["_models.ValidateResult"]:
851+
) -> LROPoller["_models.ValidateOperationResult"]:
852852
"""Validate a link.
853853
854854
:param resource_uri: The fully qualified Azure Resource manager identifier of the resource to
@@ -864,14 +864,14 @@ def begin_validate(
864864
:paramtype polling: bool or ~azure.core.polling.PollingMethod
865865
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
866866
Retry-After header is present.
867-
:return: An instance of LROPoller that returns either ValidateResult or the result of
867+
:return: An instance of LROPoller that returns either ValidateOperationResult or the result of
868868
cls(response)
869-
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.servicelinker.models.ValidateResult]
869+
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.servicelinker.models.ValidateOperationResult]
870870
:raises: ~azure.core.exceptions.HttpResponseError
871871
"""
872872
api_version = kwargs.pop('api_version', "2022-05-01") # type: str
873873
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
874-
cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateResult"]
874+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateOperationResult"]
875875
lro_delay = kwargs.pop(
876876
'polling_interval',
877877
self._config.polling_interval
@@ -889,7 +889,7 @@ def begin_validate(
889889

890890
def get_long_running_output(pipeline_response):
891891
response = pipeline_response.http_response
892-
deserialized = self._deserialize('ValidateResult', pipeline_response)
892+
deserialized = self._deserialize('ValidateOperationResult', pipeline_response)
893893
if cls:
894894
return cls(pipeline_response, deserialized, {})
895895
return deserialized

0 commit comments

Comments
 (0)