Skip to content

Commit ff0799c

Browse files
author
SDK Automation
committed
Generated from a810e7b4c68562f9670b2d0fcb12c79fe3574c22
PrivateEndpointConnection should inherit proxyresource Update spec
1 parent 3488ccc commit ff0799c

File tree

3 files changed

+101
-96
lines changed

3 files changed

+101
-96
lines changed

sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models.py

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,19 +2103,53 @@ def __init__(self, **kwargs):
21032103
self.id = kwargs.get('id', None)
21042104

21052105

2106-
class PrivateEndpointConnection(Model):
2106+
class ProxyResource(Model):
2107+
"""The resource model definition for a ARM proxy resource. It will have
2108+
everything other than required location and tags.
2109+
2110+
Variables are only populated by the server, and will be ignored when
2111+
sending a request.
2112+
2113+
:ivar id: The resource ID.
2114+
:vartype id: str
2115+
:ivar name: The name of the resource.
2116+
:vartype name: str
2117+
:ivar type: The type of the resource.
2118+
:vartype type: str
2119+
"""
2120+
2121+
_validation = {
2122+
'id': {'readonly': True},
2123+
'name': {'readonly': True},
2124+
'type': {'readonly': True},
2125+
}
2126+
2127+
_attribute_map = {
2128+
'id': {'key': 'id', 'type': 'str'},
2129+
'name': {'key': 'name', 'type': 'str'},
2130+
'type': {'key': 'type', 'type': 'str'},
2131+
}
2132+
2133+
def __init__(self, **kwargs):
2134+
super(ProxyResource, self).__init__(**kwargs)
2135+
self.id = None
2136+
self.name = None
2137+
self.type = None
2138+
2139+
2140+
class PrivateEndpointConnection(ProxyResource):
21072141
"""An object that represents a private endpoint connection for a container
21082142
registry.
21092143
21102144
Variables are only populated by the server, and will be ignored when
21112145
sending a request.
21122146
2113-
:ivar type: The resource type is private endpoint connection.
2147+
:ivar id: The resource ID.
2148+
:vartype id: str
2149+
:ivar name: The name of the resource.
2150+
:vartype name: str
2151+
:ivar type: The type of the resource.
21142152
:vartype type: str
2115-
:param id: The resource ID.
2116-
:type id: str
2117-
:param name: The name of the resource.
2118-
:type name: str
21192153
:param private_endpoint: The resource of private endpoint.
21202154
:type private_endpoint:
21212155
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpoint
@@ -2131,24 +2165,23 @@ class PrivateEndpointConnection(Model):
21312165
"""
21322166

21332167
_validation = {
2168+
'id': {'readonly': True},
2169+
'name': {'readonly': True},
21342170
'type': {'readonly': True},
21352171
'provisioning_state': {'readonly': True},
21362172
}
21372173

21382174
_attribute_map = {
2139-
'type': {'key': 'type', 'type': 'str'},
21402175
'id': {'key': 'id', 'type': 'str'},
21412176
'name': {'key': 'name', 'type': 'str'},
2177+
'type': {'key': 'type', 'type': 'str'},
21422178
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
21432179
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
21442180
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
21452181
}
21462182

21472183
def __init__(self, **kwargs):
21482184
super(PrivateEndpointConnection, self).__init__(**kwargs)
2149-
self.type = None
2150-
self.id = kwargs.get('id', None)
2151-
self.name = kwargs.get('name', None)
21522185
self.private_endpoint = kwargs.get('private_endpoint', None)
21532186
self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None)
21542187
self.provisioning_state = None
@@ -2228,40 +2261,6 @@ def __init__(self, **kwargs):
22282261
self.actions_required = kwargs.get('actions_required', None)
22292262

22302263

2231-
class ProxyResource(Model):
2232-
"""The resource model definition for a ARM proxy resource. It will have
2233-
everything other than required location and tags.
2234-
2235-
Variables are only populated by the server, and will be ignored when
2236-
sending a request.
2237-
2238-
:ivar id: The resource ID.
2239-
:vartype id: str
2240-
:ivar name: The name of the resource.
2241-
:vartype name: str
2242-
:ivar type: The type of the resource.
2243-
:vartype type: str
2244-
"""
2245-
2246-
_validation = {
2247-
'id': {'readonly': True},
2248-
'name': {'readonly': True},
2249-
'type': {'readonly': True},
2250-
}
2251-
2252-
_attribute_map = {
2253-
'id': {'key': 'id', 'type': 'str'},
2254-
'name': {'key': 'name', 'type': 'str'},
2255-
'type': {'key': 'type', 'type': 'str'},
2256-
}
2257-
2258-
def __init__(self, **kwargs):
2259-
super(ProxyResource, self).__init__(**kwargs)
2260-
self.id = None
2261-
self.name = None
2262-
self.type = None
2263-
2264-
22652264
class QuarantinePolicy(Model):
22662265
"""The quarantine policy for a container registry.
22672266

sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models_py3.py

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,19 +2103,53 @@ def __init__(self, *, id: str=None, **kwargs) -> None:
21032103
self.id = id
21042104

21052105

2106-
class PrivateEndpointConnection(Model):
2106+
class ProxyResource(Model):
2107+
"""The resource model definition for a ARM proxy resource. It will have
2108+
everything other than required location and tags.
2109+
2110+
Variables are only populated by the server, and will be ignored when
2111+
sending a request.
2112+
2113+
:ivar id: The resource ID.
2114+
:vartype id: str
2115+
:ivar name: The name of the resource.
2116+
:vartype name: str
2117+
:ivar type: The type of the resource.
2118+
:vartype type: str
2119+
"""
2120+
2121+
_validation = {
2122+
'id': {'readonly': True},
2123+
'name': {'readonly': True},
2124+
'type': {'readonly': True},
2125+
}
2126+
2127+
_attribute_map = {
2128+
'id': {'key': 'id', 'type': 'str'},
2129+
'name': {'key': 'name', 'type': 'str'},
2130+
'type': {'key': 'type', 'type': 'str'},
2131+
}
2132+
2133+
def __init__(self, **kwargs) -> None:
2134+
super(ProxyResource, self).__init__(**kwargs)
2135+
self.id = None
2136+
self.name = None
2137+
self.type = None
2138+
2139+
2140+
class PrivateEndpointConnection(ProxyResource):
21072141
"""An object that represents a private endpoint connection for a container
21082142
registry.
21092143
21102144
Variables are only populated by the server, and will be ignored when
21112145
sending a request.
21122146
2113-
:ivar type: The resource type is private endpoint connection.
2147+
:ivar id: The resource ID.
2148+
:vartype id: str
2149+
:ivar name: The name of the resource.
2150+
:vartype name: str
2151+
:ivar type: The type of the resource.
21142152
:vartype type: str
2115-
:param id: The resource ID.
2116-
:type id: str
2117-
:param name: The name of the resource.
2118-
:type name: str
21192153
:param private_endpoint: The resource of private endpoint.
21202154
:type private_endpoint:
21212155
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpoint
@@ -2131,24 +2165,23 @@ class PrivateEndpointConnection(Model):
21312165
"""
21322166

21332167
_validation = {
2168+
'id': {'readonly': True},
2169+
'name': {'readonly': True},
21342170
'type': {'readonly': True},
21352171
'provisioning_state': {'readonly': True},
21362172
}
21372173

21382174
_attribute_map = {
2139-
'type': {'key': 'type', 'type': 'str'},
21402175
'id': {'key': 'id', 'type': 'str'},
21412176
'name': {'key': 'name', 'type': 'str'},
2177+
'type': {'key': 'type', 'type': 'str'},
21422178
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
21432179
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
21442180
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
21452181
}
21462182

2147-
def __init__(self, *, id: str=None, name: str=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None:
2183+
def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None:
21482184
super(PrivateEndpointConnection, self).__init__(**kwargs)
2149-
self.type = None
2150-
self.id = id
2151-
self.name = name
21522185
self.private_endpoint = private_endpoint
21532186
self.private_link_service_connection_state = private_link_service_connection_state
21542187
self.provisioning_state = None
@@ -2228,40 +2261,6 @@ def __init__(self, *, status=None, description: str=None, actions_required=None,
22282261
self.actions_required = actions_required
22292262

22302263

2231-
class ProxyResource(Model):
2232-
"""The resource model definition for a ARM proxy resource. It will have
2233-
everything other than required location and tags.
2234-
2235-
Variables are only populated by the server, and will be ignored when
2236-
sending a request.
2237-
2238-
:ivar id: The resource ID.
2239-
:vartype id: str
2240-
:ivar name: The name of the resource.
2241-
:vartype name: str
2242-
:ivar type: The type of the resource.
2243-
:vartype type: str
2244-
"""
2245-
2246-
_validation = {
2247-
'id': {'readonly': True},
2248-
'name': {'readonly': True},
2249-
'type': {'readonly': True},
2250-
}
2251-
2252-
_attribute_map = {
2253-
'id': {'key': 'id', 'type': 'str'},
2254-
'name': {'key': 'name', 'type': 'str'},
2255-
'type': {'key': 'type', 'type': 'str'},
2256-
}
2257-
2258-
def __init__(self, **kwargs) -> None:
2259-
super(ProxyResource, self).__init__(**kwargs)
2260-
self.id = None
2261-
self.name = None
2262-
self.type = None
2263-
2264-
22652264
class QuarantinePolicy(Model):
22662265
"""The quarantine policy for a container registry.
22672266

sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_private_endpoint_connections_operations.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ def get(
111111

112112

113113
def _create_or_update_initial(
114-
self, resource_group_name, registry_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers=None, raw=False, **operation_config):
114+
self, resource_group_name, registry_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config):
115+
private_endpoint_connection = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state)
116+
115117
# Construct URL
116118
url = self.create_or_update.metadata['url']
117119
path_format_arguments = {
@@ -163,7 +165,7 @@ def _create_or_update_initial(
163165
return deserialized
164166

165167
def create_or_update(
166-
self, resource_group_name, registry_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers=None, raw=False, polling=True, **operation_config):
168+
self, resource_group_name, registry_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config):
167169
"""Update the state of specified private endpoint connection associated
168170
with the container registry.
169171
@@ -175,10 +177,14 @@ def create_or_update(
175177
:param private_endpoint_connection_name: The name of the private
176178
endpoint connection.
177179
:type private_endpoint_connection_name: str
178-
:param private_endpoint_connection: The parameters for creating a
179-
private endpoint connection.
180-
:type private_endpoint_connection:
181-
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpointConnection
180+
:param private_endpoint: The resource of private endpoint.
181+
:type private_endpoint:
182+
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpoint
183+
:param private_link_service_connection_state: A collection of
184+
information about the state of the connection between service consumer
185+
and provider.
186+
:type private_link_service_connection_state:
187+
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateLinkServiceConnectionState
182188
:param dict custom_headers: headers that will be added to the request
183189
:param bool raw: The poller return type is ClientRawResponse, the
184190
direct response alongside the deserialized response
@@ -197,7 +203,8 @@ def create_or_update(
197203
resource_group_name=resource_group_name,
198204
registry_name=registry_name,
199205
private_endpoint_connection_name=private_endpoint_connection_name,
200-
private_endpoint_connection=private_endpoint_connection,
206+
private_endpoint=private_endpoint,
207+
private_link_service_connection_state=private_link_service_connection_state,
201208
custom_headers=custom_headers,
202209
raw=True,
203210
**operation_config

0 commit comments

Comments
 (0)