1# coding=utf-8
2# --------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for license information.
5# Code generated by Microsoft (R) AutoRest Code Generator.
6# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7# --------------------------------------------------------------------------
8
9import datetime
10from typing import Dict, List, Optional, Union
11
12from azure.core.exceptions import HttpResponseError
13import msrest.serialization
14
15from ._container_registry_management_client_enums import *
16
17
18class ActivationProperties(msrest.serialization.Model):
19    """The activation properties of the connected registry.
20
21    Variables are only populated by the server, and will be ignored when sending a request.
22
23    :ivar status: The activation status of the connected registry. Possible values include:
24     "Active", "Inactive".
25    :vartype status: str or
26     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ActivationStatus
27    """
28
29    _validation = {
30        'status': {'readonly': True},
31    }
32
33    _attribute_map = {
34        'status': {'key': 'status', 'type': 'str'},
35    }
36
37    def __init__(
38        self,
39        **kwargs
40    ):
41        super(ActivationProperties, self).__init__(**kwargs)
42        self.status = None
43
44
45class ActiveDirectoryObject(msrest.serialization.Model):
46    """The Active Directory Object that will be used for authenticating the token of a container registry.
47
48    :param object_id: The user/group/application object ID for Active Directory Object that will be
49     used for authenticating the token of a container registry.
50    :type object_id: str
51    :param tenant_id: The tenant ID of user/group/application object Active Directory Object that
52     will be used for authenticating the token of a container registry.
53    :type tenant_id: str
54    """
55
56    _attribute_map = {
57        'object_id': {'key': 'objectId', 'type': 'str'},
58        'tenant_id': {'key': 'tenantId', 'type': 'str'},
59    }
60
61    def __init__(
62        self,
63        *,
64        object_id: Optional[str] = None,
65        tenant_id: Optional[str] = None,
66        **kwargs
67    ):
68        super(ActiveDirectoryObject, self).__init__(**kwargs)
69        self.object_id = object_id
70        self.tenant_id = tenant_id
71
72
73class Actor(msrest.serialization.Model):
74    """The agent that initiated the event. For most situations, this could be from the authorization context of the request.
75
76    :param name: The subject or username associated with the request context that generated the
77     event.
78    :type name: str
79    """
80
81    _attribute_map = {
82        'name': {'key': 'name', 'type': 'str'},
83    }
84
85    def __init__(
86        self,
87        *,
88        name: Optional[str] = None,
89        **kwargs
90    ):
91        super(Actor, self).__init__(**kwargs)
92        self.name = name
93
94
95class CallbackConfig(msrest.serialization.Model):
96    """The configuration of service URI and custom headers for the webhook.
97
98    All required parameters must be populated in order to send to Azure.
99
100    :param service_uri: Required. The service URI for the webhook to post notifications.
101    :type service_uri: str
102    :param custom_headers: Custom headers that will be added to the webhook notifications.
103    :type custom_headers: dict[str, str]
104    """
105
106    _validation = {
107        'service_uri': {'required': True},
108    }
109
110    _attribute_map = {
111        'service_uri': {'key': 'serviceUri', 'type': 'str'},
112        'custom_headers': {'key': 'customHeaders', 'type': '{str}'},
113    }
114
115    def __init__(
116        self,
117        *,
118        service_uri: str,
119        custom_headers: Optional[Dict[str, str]] = None,
120        **kwargs
121    ):
122        super(CallbackConfig, self).__init__(**kwargs)
123        self.service_uri = service_uri
124        self.custom_headers = custom_headers
125
126
127class ProxyResource(msrest.serialization.Model):
128    """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.
129
130    Variables are only populated by the server, and will be ignored when sending a request.
131
132    :ivar id: The resource ID.
133    :vartype id: str
134    :ivar name: The name of the resource.
135    :vartype name: str
136    :ivar type: The type of the resource.
137    :vartype type: str
138    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
139    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
140    """
141
142    _validation = {
143        'id': {'readonly': True},
144        'name': {'readonly': True},
145        'type': {'readonly': True},
146        'system_data': {'readonly': True},
147    }
148
149    _attribute_map = {
150        'id': {'key': 'id', 'type': 'str'},
151        'name': {'key': 'name', 'type': 'str'},
152        'type': {'key': 'type', 'type': 'str'},
153        'system_data': {'key': 'systemData', 'type': 'SystemData'},
154    }
155
156    def __init__(
157        self,
158        **kwargs
159    ):
160        super(ProxyResource, self).__init__(**kwargs)
161        self.id = None
162        self.name = None
163        self.type = None
164        self.system_data = None
165
166
167class ConnectedRegistry(ProxyResource):
168    """An object that represents a connected registry for a container registry.
169
170    Variables are only populated by the server, and will be ignored when sending a request.
171
172    :ivar id: The resource ID.
173    :vartype id: str
174    :ivar name: The name of the resource.
175    :vartype name: str
176    :ivar type: The type of the resource.
177    :vartype type: str
178    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
179    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
180    :ivar provisioning_state: Provisioning state of the resource. Possible values include:
181     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
182    :vartype provisioning_state: str or
183     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
184    :param mode: The mode of the connected registry resource that indicates the permissions of the
185     registry. Possible values include: "Registry", "Mirror".
186    :type mode: str or
187     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ConnectedRegistryMode
188    :ivar version: The current version of ACR runtime on the connected registry.
189    :vartype version: str
190    :ivar connection_state: The current connection state of the connected registry. Possible values
191     include: "Online", "Offline", "Syncing", "Unhealthy".
192    :vartype connection_state: str or
193     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ConnectionState
194    :ivar last_activity_time: The last activity time of the connected registry.
195    :vartype last_activity_time: ~datetime.datetime
196    :ivar activation: The activation properties of the connected registry.
197    :vartype activation:
198     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ActivationProperties
199    :param parent: The parent of the connected registry.
200    :type parent: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ParentProperties
201    :param client_token_ids: The list of the ACR token resource IDs used to authenticate clients to
202     the connected registry.
203    :type client_token_ids: list[str]
204    :param login_server: The login server properties of the connected registry.
205    :type login_server:
206     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.LoginServerProperties
207    :param logging: The logging properties of the connected registry.
208    :type logging: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.LoggingProperties
209    :ivar status_details: The list of current statuses of the connected registry.
210    :vartype status_details:
211     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.StatusDetailProperties]
212    """
213
214    _validation = {
215        'id': {'readonly': True},
216        'name': {'readonly': True},
217        'type': {'readonly': True},
218        'system_data': {'readonly': True},
219        'provisioning_state': {'readonly': True},
220        'version': {'readonly': True},
221        'connection_state': {'readonly': True},
222        'last_activity_time': {'readonly': True},
223        'activation': {'readonly': True},
224        'status_details': {'readonly': True},
225    }
226
227    _attribute_map = {
228        'id': {'key': 'id', 'type': 'str'},
229        'name': {'key': 'name', 'type': 'str'},
230        'type': {'key': 'type', 'type': 'str'},
231        'system_data': {'key': 'systemData', 'type': 'SystemData'},
232        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
233        'mode': {'key': 'properties.mode', 'type': 'str'},
234        'version': {'key': 'properties.version', 'type': 'str'},
235        'connection_state': {'key': 'properties.connectionState', 'type': 'str'},
236        'last_activity_time': {'key': 'properties.lastActivityTime', 'type': 'iso-8601'},
237        'activation': {'key': 'properties.activation', 'type': 'ActivationProperties'},
238        'parent': {'key': 'properties.parent', 'type': 'ParentProperties'},
239        'client_token_ids': {'key': 'properties.clientTokenIds', 'type': '[str]'},
240        'login_server': {'key': 'properties.loginServer', 'type': 'LoginServerProperties'},
241        'logging': {'key': 'properties.logging', 'type': 'LoggingProperties'},
242        'status_details': {'key': 'properties.statusDetails', 'type': '[StatusDetailProperties]'},
243    }
244
245    def __init__(
246        self,
247        *,
248        mode: Optional[Union[str, "ConnectedRegistryMode"]] = None,
249        parent: Optional["ParentProperties"] = None,
250        client_token_ids: Optional[List[str]] = None,
251        login_server: Optional["LoginServerProperties"] = None,
252        logging: Optional["LoggingProperties"] = None,
253        **kwargs
254    ):
255        super(ConnectedRegistry, self).__init__(**kwargs)
256        self.provisioning_state = None
257        self.mode = mode
258        self.version = None
259        self.connection_state = None
260        self.last_activity_time = None
261        self.activation = None
262        self.parent = parent
263        self.client_token_ids = client_token_ids
264        self.login_server = login_server
265        self.logging = logging
266        self.status_details = None
267
268
269class ConnectedRegistryListResult(msrest.serialization.Model):
270    """The result of a request to list connected registries for a container registry.
271
272    :param value: The list of connected registries. Since this list may be incomplete, the nextLink
273     field should be used to request the next list of connected registries.
274    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.ConnectedRegistry]
275    :param next_link: The URI that can be used to request the next list of connected registries.
276    :type next_link: str
277    """
278
279    _attribute_map = {
280        'value': {'key': 'value', 'type': '[ConnectedRegistry]'},
281        'next_link': {'key': 'nextLink', 'type': 'str'},
282    }
283
284    def __init__(
285        self,
286        *,
287        value: Optional[List["ConnectedRegistry"]] = None,
288        next_link: Optional[str] = None,
289        **kwargs
290    ):
291        super(ConnectedRegistryListResult, self).__init__(**kwargs)
292        self.value = value
293        self.next_link = next_link
294
295
296class ConnectedRegistryUpdateParameters(msrest.serialization.Model):
297    """The parameters for updating a connected registry.
298
299    :param sync_properties: The sync properties of the connected registry with its parent.
300    :type sync_properties:
301     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SyncUpdateProperties
302    :param logging: The logging properties of the connected registry.
303    :type logging: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.LoggingProperties
304    :param client_token_ids: The list of the ACR token resource IDs used to authenticate clients to
305     the connected registry.
306    :type client_token_ids: list[str]
307    """
308
309    _attribute_map = {
310        'sync_properties': {'key': 'properties.syncProperties', 'type': 'SyncUpdateProperties'},
311        'logging': {'key': 'properties.logging', 'type': 'LoggingProperties'},
312        'client_token_ids': {'key': 'properties.clientTokenIds', 'type': '[str]'},
313    }
314
315    def __init__(
316        self,
317        *,
318        sync_properties: Optional["SyncUpdateProperties"] = None,
319        logging: Optional["LoggingProperties"] = None,
320        client_token_ids: Optional[List[str]] = None,
321        **kwargs
322    ):
323        super(ConnectedRegistryUpdateParameters, self).__init__(**kwargs)
324        self.sync_properties = sync_properties
325        self.logging = logging
326        self.client_token_ids = client_token_ids
327
328
329class EncryptionProperty(msrest.serialization.Model):
330    """EncryptionProperty.
331
332    :param status: Indicates whether or not the encryption is enabled for container registry.
333     Possible values include: "enabled", "disabled".
334    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.EncryptionStatus
335    :param key_vault_properties: Key vault properties.
336    :type key_vault_properties:
337     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.KeyVaultProperties
338    """
339
340    _attribute_map = {
341        'status': {'key': 'status', 'type': 'str'},
342        'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'},
343    }
344
345    def __init__(
346        self,
347        *,
348        status: Optional[Union[str, "EncryptionStatus"]] = None,
349        key_vault_properties: Optional["KeyVaultProperties"] = None,
350        **kwargs
351    ):
352        super(EncryptionProperty, self).__init__(**kwargs)
353        self.status = status
354        self.key_vault_properties = key_vault_properties
355
356
357class ErrorResponse(msrest.serialization.Model):
358    """An error response from the Azure Container Registry service.
359
360    :param error: Azure container registry build API error body.
361    :type error: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ErrorResponseBody
362    """
363
364    _attribute_map = {
365        'error': {'key': 'error', 'type': 'ErrorResponseBody'},
366    }
367
368    def __init__(
369        self,
370        *,
371        error: Optional["ErrorResponseBody"] = None,
372        **kwargs
373    ):
374        super(ErrorResponse, self).__init__(**kwargs)
375        self.error = error
376
377
378class ErrorResponseBody(msrest.serialization.Model):
379    """An error response from the Azure Container Registry service.
380
381    All required parameters must be populated in order to send to Azure.
382
383    :param code: Required. error code.
384    :type code: str
385    :param message: Required. error message.
386    :type message: str
387    :param target: target of the particular error.
388    :type target: str
389    :param details: an array of additional nested error response info objects, as described by this
390     contract.
391    :type details: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.InnerErrorDescription
392    """
393
394    _validation = {
395        'code': {'required': True},
396        'message': {'required': True},
397    }
398
399    _attribute_map = {
400        'code': {'key': 'code', 'type': 'str'},
401        'message': {'key': 'message', 'type': 'str'},
402        'target': {'key': 'target', 'type': 'str'},
403        'details': {'key': 'details', 'type': 'InnerErrorDescription'},
404    }
405
406    def __init__(
407        self,
408        *,
409        code: str,
410        message: str,
411        target: Optional[str] = None,
412        details: Optional["InnerErrorDescription"] = None,
413        **kwargs
414    ):
415        super(ErrorResponseBody, self).__init__(**kwargs)
416        self.code = code
417        self.message = message
418        self.target = target
419        self.details = details
420
421
422class EventInfo(msrest.serialization.Model):
423    """The basic information of an event.
424
425    :param id: The event ID.
426    :type id: str
427    """
428
429    _attribute_map = {
430        'id': {'key': 'id', 'type': 'str'},
431    }
432
433    def __init__(
434        self,
435        *,
436        id: Optional[str] = None,
437        **kwargs
438    ):
439        super(EventInfo, self).__init__(**kwargs)
440        self.id = id
441
442
443class Event(EventInfo):
444    """The event for a webhook.
445
446    :param id: The event ID.
447    :type id: str
448    :param event_request_message: The event request message sent to the service URI.
449    :type event_request_message:
450     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.EventRequestMessage
451    :param event_response_message: The event response message received from the service URI.
452    :type event_response_message:
453     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.EventResponseMessage
454    """
455
456    _attribute_map = {
457        'id': {'key': 'id', 'type': 'str'},
458        'event_request_message': {'key': 'eventRequestMessage', 'type': 'EventRequestMessage'},
459        'event_response_message': {'key': 'eventResponseMessage', 'type': 'EventResponseMessage'},
460    }
461
462    def __init__(
463        self,
464        *,
465        id: Optional[str] = None,
466        event_request_message: Optional["EventRequestMessage"] = None,
467        event_response_message: Optional["EventResponseMessage"] = None,
468        **kwargs
469    ):
470        super(Event, self).__init__(id=id, **kwargs)
471        self.event_request_message = event_request_message
472        self.event_response_message = event_response_message
473
474
475class EventContent(msrest.serialization.Model):
476    """The content of the event request message.
477
478    :param id: The event ID.
479    :type id: str
480    :param timestamp: The time at which the event occurred.
481    :type timestamp: ~datetime.datetime
482    :param action: The action that encompasses the provided event.
483    :type action: str
484    :param target: The target of the event.
485    :type target: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Target
486    :param request: The request that generated the event.
487    :type request: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Request
488    :param actor: The agent that initiated the event. For most situations, this could be from the
489     authorization context of the request.
490    :type actor: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Actor
491    :param source: The registry node that generated the event. Put differently, while the actor
492     initiates the event, the source generates it.
493    :type source: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Source
494    """
495
496    _attribute_map = {
497        'id': {'key': 'id', 'type': 'str'},
498        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
499        'action': {'key': 'action', 'type': 'str'},
500        'target': {'key': 'target', 'type': 'Target'},
501        'request': {'key': 'request', 'type': 'Request'},
502        'actor': {'key': 'actor', 'type': 'Actor'},
503        'source': {'key': 'source', 'type': 'Source'},
504    }
505
506    def __init__(
507        self,
508        *,
509        id: Optional[str] = None,
510        timestamp: Optional[datetime.datetime] = None,
511        action: Optional[str] = None,
512        target: Optional["Target"] = None,
513        request: Optional["Request"] = None,
514        actor: Optional["Actor"] = None,
515        source: Optional["Source"] = None,
516        **kwargs
517    ):
518        super(EventContent, self).__init__(**kwargs)
519        self.id = id
520        self.timestamp = timestamp
521        self.action = action
522        self.target = target
523        self.request = request
524        self.actor = actor
525        self.source = source
526
527
528class EventListResult(msrest.serialization.Model):
529    """The result of a request to list events for a webhook.
530
531    :param value: The list of events. Since this list may be incomplete, the nextLink field should
532     be used to request the next list of events.
533    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Event]
534    :param next_link: The URI that can be used to request the next list of events.
535    :type next_link: str
536    """
537
538    _attribute_map = {
539        'value': {'key': 'value', 'type': '[Event]'},
540        'next_link': {'key': 'nextLink', 'type': 'str'},
541    }
542
543    def __init__(
544        self,
545        *,
546        value: Optional[List["Event"]] = None,
547        next_link: Optional[str] = None,
548        **kwargs
549    ):
550        super(EventListResult, self).__init__(**kwargs)
551        self.value = value
552        self.next_link = next_link
553
554
555class EventRequestMessage(msrest.serialization.Model):
556    """The event request message sent to the service URI.
557
558    :param content: The content of the event request message.
559    :type content: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.EventContent
560    :param headers: The headers of the event request message.
561    :type headers: dict[str, str]
562    :param method: The HTTP method used to send the event request message.
563    :type method: str
564    :param request_uri: The URI used to send the event request message.
565    :type request_uri: str
566    :param version: The HTTP message version.
567    :type version: str
568    """
569
570    _attribute_map = {
571        'content': {'key': 'content', 'type': 'EventContent'},
572        'headers': {'key': 'headers', 'type': '{str}'},
573        'method': {'key': 'method', 'type': 'str'},
574        'request_uri': {'key': 'requestUri', 'type': 'str'},
575        'version': {'key': 'version', 'type': 'str'},
576    }
577
578    def __init__(
579        self,
580        *,
581        content: Optional["EventContent"] = None,
582        headers: Optional[Dict[str, str]] = None,
583        method: Optional[str] = None,
584        request_uri: Optional[str] = None,
585        version: Optional[str] = None,
586        **kwargs
587    ):
588        super(EventRequestMessage, self).__init__(**kwargs)
589        self.content = content
590        self.headers = headers
591        self.method = method
592        self.request_uri = request_uri
593        self.version = version
594
595
596class EventResponseMessage(msrest.serialization.Model):
597    """The event response message received from the service URI.
598
599    :param content: The content of the event response message.
600    :type content: str
601    :param headers: The headers of the event response message.
602    :type headers: dict[str, str]
603    :param reason_phrase: The reason phrase of the event response message.
604    :type reason_phrase: str
605    :param status_code: The status code of the event response message.
606    :type status_code: str
607    :param version: The HTTP message version.
608    :type version: str
609    """
610
611    _attribute_map = {
612        'content': {'key': 'content', 'type': 'str'},
613        'headers': {'key': 'headers', 'type': '{str}'},
614        'reason_phrase': {'key': 'reasonPhrase', 'type': 'str'},
615        'status_code': {'key': 'statusCode', 'type': 'str'},
616        'version': {'key': 'version', 'type': 'str'},
617    }
618
619    def __init__(
620        self,
621        *,
622        content: Optional[str] = None,
623        headers: Optional[Dict[str, str]] = None,
624        reason_phrase: Optional[str] = None,
625        status_code: Optional[str] = None,
626        version: Optional[str] = None,
627        **kwargs
628    ):
629        super(EventResponseMessage, self).__init__(**kwargs)
630        self.content = content
631        self.headers = headers
632        self.reason_phrase = reason_phrase
633        self.status_code = status_code
634        self.version = version
635
636
637class ExportPipeline(ProxyResource):
638    """An object that represents an export pipeline for a container registry.
639
640    Variables are only populated by the server, and will be ignored when sending a request.
641
642    :ivar id: The resource ID.
643    :vartype id: str
644    :ivar name: The name of the resource.
645    :vartype name: str
646    :ivar type: The type of the resource.
647    :vartype type: str
648    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
649    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
650    :param location: The location of the export pipeline.
651    :type location: str
652    :param identity: The identity of the export pipeline.
653    :type identity: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties
654    :param target: The target properties of the export pipeline.
655    :type target:
656     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ExportPipelineTargetProperties
657    :param options: The list of all options configured for the pipeline.
658    :type options: list[str or
659     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineOptions]
660    :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was
661     called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
662     "Canceled".
663    :vartype provisioning_state: str or
664     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
665    """
666
667    _validation = {
668        'id': {'readonly': True},
669        'name': {'readonly': True},
670        'type': {'readonly': True},
671        'system_data': {'readonly': True},
672        'provisioning_state': {'readonly': True},
673    }
674
675    _attribute_map = {
676        'id': {'key': 'id', 'type': 'str'},
677        'name': {'key': 'name', 'type': 'str'},
678        'type': {'key': 'type', 'type': 'str'},
679        'system_data': {'key': 'systemData', 'type': 'SystemData'},
680        'location': {'key': 'location', 'type': 'str'},
681        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
682        'target': {'key': 'properties.target', 'type': 'ExportPipelineTargetProperties'},
683        'options': {'key': 'properties.options', 'type': '[str]'},
684        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
685    }
686
687    def __init__(
688        self,
689        *,
690        location: Optional[str] = None,
691        identity: Optional["IdentityProperties"] = None,
692        target: Optional["ExportPipelineTargetProperties"] = None,
693        options: Optional[List[Union[str, "PipelineOptions"]]] = None,
694        **kwargs
695    ):
696        super(ExportPipeline, self).__init__(**kwargs)
697        self.location = location
698        self.identity = identity
699        self.target = target
700        self.options = options
701        self.provisioning_state = None
702
703
704class ExportPipelineListResult(msrest.serialization.Model):
705    """The result of a request to list export pipelines for a container registry.
706
707    :param value: The list of export pipelines. Since this list may be incomplete, the nextLink
708     field should be used to request the next list of export pipelines.
709    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.ExportPipeline]
710    :param next_link: The URI that can be used to request the next list of pipeline runs.
711    :type next_link: str
712    """
713
714    _attribute_map = {
715        'value': {'key': 'value', 'type': '[ExportPipeline]'},
716        'next_link': {'key': 'nextLink', 'type': 'str'},
717    }
718
719    def __init__(
720        self,
721        *,
722        value: Optional[List["ExportPipeline"]] = None,
723        next_link: Optional[str] = None,
724        **kwargs
725    ):
726        super(ExportPipelineListResult, self).__init__(**kwargs)
727        self.value = value
728        self.next_link = next_link
729
730
731class ExportPipelineTargetProperties(msrest.serialization.Model):
732    """The properties of the export pipeline target.
733
734    All required parameters must be populated in order to send to Azure.
735
736    :param type: The type of target for the export pipeline.
737    :type type: str
738    :param uri: The target uri of the export pipeline.
739     When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName"
740     When 'AzureStorageBlobContainer':  "https://accountName.blob.core.windows.net/containerName".
741    :type uri: str
742    :param key_vault_uri: Required. They key vault secret uri to obtain the target storage SAS
743     token.
744    :type key_vault_uri: str
745    """
746
747    _validation = {
748        'key_vault_uri': {'required': True},
749    }
750
751    _attribute_map = {
752        'type': {'key': 'type', 'type': 'str'},
753        'uri': {'key': 'uri', 'type': 'str'},
754        'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'},
755    }
756
757    def __init__(
758        self,
759        *,
760        key_vault_uri: str,
761        type: Optional[str] = None,
762        uri: Optional[str] = None,
763        **kwargs
764    ):
765        super(ExportPipelineTargetProperties, self).__init__(**kwargs)
766        self.type = type
767        self.uri = uri
768        self.key_vault_uri = key_vault_uri
769
770
771class GenerateCredentialsParameters(msrest.serialization.Model):
772    """The parameters used to generate credentials for a specified token or user of a container registry.
773
774    :param token_id: The resource ID of the token for which credentials have to be generated.
775    :type token_id: str
776    :param expiry: The expiry date of the generated credentials after which the credentials become
777     invalid.
778    :type expiry: ~datetime.datetime
779    :param name: Specifies name of the password which should be regenerated if any -- password1 or
780     password2. Possible values include: "password1", "password2".
781    :type name: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenPasswordName
782    """
783
784    _attribute_map = {
785        'token_id': {'key': 'tokenId', 'type': 'str'},
786        'expiry': {'key': 'expiry', 'type': 'iso-8601'},
787        'name': {'key': 'name', 'type': 'str'},
788    }
789
790    def __init__(
791        self,
792        *,
793        token_id: Optional[str] = None,
794        expiry: Optional[datetime.datetime] = None,
795        name: Optional[Union[str, "TokenPasswordName"]] = None,
796        **kwargs
797    ):
798        super(GenerateCredentialsParameters, self).__init__(**kwargs)
799        self.token_id = token_id
800        self.expiry = expiry
801        self.name = name
802
803
804class GenerateCredentialsResult(msrest.serialization.Model):
805    """The response from the GenerateCredentials operation.
806
807    :param username: The username for a container registry.
808    :type username: str
809    :param passwords: The list of passwords for a container registry.
810    :type passwords: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenPassword]
811    """
812
813    _attribute_map = {
814        'username': {'key': 'username', 'type': 'str'},
815        'passwords': {'key': 'passwords', 'type': '[TokenPassword]'},
816    }
817
818    def __init__(
819        self,
820        *,
821        username: Optional[str] = None,
822        passwords: Optional[List["TokenPassword"]] = None,
823        **kwargs
824    ):
825        super(GenerateCredentialsResult, self).__init__(**kwargs)
826        self.username = username
827        self.passwords = passwords
828
829
830class IdentityProperties(msrest.serialization.Model):
831    """Managed identity for the resource.
832
833    :param principal_id: The principal ID of resource identity.
834    :type principal_id: str
835    :param tenant_id: The tenant ID of resource.
836    :type tenant_id: str
837    :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned",
838     "SystemAssigned, UserAssigned", "None".
839    :type type: str or
840     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ResourceIdentityType
841    :param user_assigned_identities: The list of user identities associated with the resource. The
842     user identity
843     dictionary key references will be ARM resource ids in the form:
844     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
845         providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
846    :type user_assigned_identities: dict[str,
847     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.UserIdentityProperties]
848    """
849
850    _attribute_map = {
851        'principal_id': {'key': 'principalId', 'type': 'str'},
852        'tenant_id': {'key': 'tenantId', 'type': 'str'},
853        'type': {'key': 'type', 'type': 'str'},
854        'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'},
855    }
856
857    def __init__(
858        self,
859        *,
860        principal_id: Optional[str] = None,
861        tenant_id: Optional[str] = None,
862        type: Optional[Union[str, "ResourceIdentityType"]] = None,
863        user_assigned_identities: Optional[Dict[str, "UserIdentityProperties"]] = None,
864        **kwargs
865    ):
866        super(IdentityProperties, self).__init__(**kwargs)
867        self.principal_id = principal_id
868        self.tenant_id = tenant_id
869        self.type = type
870        self.user_assigned_identities = user_assigned_identities
871
872
873class ImportImageParameters(msrest.serialization.Model):
874    """ImportImageParameters.
875
876    All required parameters must be populated in order to send to Azure.
877
878    :param source: Required. The source of the image.
879    :type source: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ImportSource
880    :param target_tags: List of strings of the form repo[:tag]. When tag is omitted the source will
881     be used (or 'latest' if source tag is also omitted).
882    :type target_tags: list[str]
883    :param untagged_target_repositories: List of strings of repository names to do a manifest only
884     copy. No tag will be created.
885    :type untagged_target_repositories: list[str]
886    :param mode: When Force, any existing target tags will be overwritten. When NoForce, any
887     existing target tags will fail the operation before any copying begins. Possible values
888     include: "NoForce", "Force". Default value: "NoForce".
889    :type mode: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ImportMode
890    """
891
892    _validation = {
893        'source': {'required': True},
894    }
895
896    _attribute_map = {
897        'source': {'key': 'source', 'type': 'ImportSource'},
898        'target_tags': {'key': 'targetTags', 'type': '[str]'},
899        'untagged_target_repositories': {'key': 'untaggedTargetRepositories', 'type': '[str]'},
900        'mode': {'key': 'mode', 'type': 'str'},
901    }
902
903    def __init__(
904        self,
905        *,
906        source: "ImportSource",
907        target_tags: Optional[List[str]] = None,
908        untagged_target_repositories: Optional[List[str]] = None,
909        mode: Optional[Union[str, "ImportMode"]] = "NoForce",
910        **kwargs
911    ):
912        super(ImportImageParameters, self).__init__(**kwargs)
913        self.source = source
914        self.target_tags = target_tags
915        self.untagged_target_repositories = untagged_target_repositories
916        self.mode = mode
917
918
919class ImportPipeline(ProxyResource):
920    """An object that represents an import pipeline for a container registry.
921
922    Variables are only populated by the server, and will be ignored when sending a request.
923
924    :ivar id: The resource ID.
925    :vartype id: str
926    :ivar name: The name of the resource.
927    :vartype name: str
928    :ivar type: The type of the resource.
929    :vartype type: str
930    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
931    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
932    :param location: The location of the import pipeline.
933    :type location: str
934    :param identity: The identity of the import pipeline.
935    :type identity: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties
936    :param source: The source properties of the import pipeline.
937    :type source:
938     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ImportPipelineSourceProperties
939    :param trigger: The properties that describe the trigger of the import pipeline.
940    :type trigger:
941     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineTriggerProperties
942    :param options: The list of all options configured for the pipeline.
943    :type options: list[str or
944     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineOptions]
945    :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was
946     called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
947     "Canceled".
948    :vartype provisioning_state: str or
949     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
950    """
951
952    _validation = {
953        'id': {'readonly': True},
954        'name': {'readonly': True},
955        'type': {'readonly': True},
956        'system_data': {'readonly': True},
957        'provisioning_state': {'readonly': True},
958    }
959
960    _attribute_map = {
961        'id': {'key': 'id', 'type': 'str'},
962        'name': {'key': 'name', 'type': 'str'},
963        'type': {'key': 'type', 'type': 'str'},
964        'system_data': {'key': 'systemData', 'type': 'SystemData'},
965        'location': {'key': 'location', 'type': 'str'},
966        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
967        'source': {'key': 'properties.source', 'type': 'ImportPipelineSourceProperties'},
968        'trigger': {'key': 'properties.trigger', 'type': 'PipelineTriggerProperties'},
969        'options': {'key': 'properties.options', 'type': '[str]'},
970        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
971    }
972
973    def __init__(
974        self,
975        *,
976        location: Optional[str] = None,
977        identity: Optional["IdentityProperties"] = None,
978        source: Optional["ImportPipelineSourceProperties"] = None,
979        trigger: Optional["PipelineTriggerProperties"] = None,
980        options: Optional[List[Union[str, "PipelineOptions"]]] = None,
981        **kwargs
982    ):
983        super(ImportPipeline, self).__init__(**kwargs)
984        self.location = location
985        self.identity = identity
986        self.source = source
987        self.trigger = trigger
988        self.options = options
989        self.provisioning_state = None
990
991
992class ImportPipelineListResult(msrest.serialization.Model):
993    """The result of a request to list import pipelines for a container registry.
994
995    :param value: The list of import pipelines. Since this list may be incomplete, the nextLink
996     field should be used to request the next list of import pipelines.
997    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.ImportPipeline]
998    :param next_link: The URI that can be used to request the next list of pipeline runs.
999    :type next_link: str
1000    """
1001
1002    _attribute_map = {
1003        'value': {'key': 'value', 'type': '[ImportPipeline]'},
1004        'next_link': {'key': 'nextLink', 'type': 'str'},
1005    }
1006
1007    def __init__(
1008        self,
1009        *,
1010        value: Optional[List["ImportPipeline"]] = None,
1011        next_link: Optional[str] = None,
1012        **kwargs
1013    ):
1014        super(ImportPipelineListResult, self).__init__(**kwargs)
1015        self.value = value
1016        self.next_link = next_link
1017
1018
1019class ImportPipelineSourceProperties(msrest.serialization.Model):
1020    """The properties of the import pipeline source.
1021
1022    All required parameters must be populated in order to send to Azure.
1023
1024    :param type: The type of source for the import pipeline. Possible values include:
1025     "AzureStorageBlobContainer". Default value: "AzureStorageBlobContainer".
1026    :type type: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineSourceType
1027    :param uri: The source uri of the import pipeline.
1028     When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName"
1029     When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName".
1030    :type uri: str
1031    :param key_vault_uri: Required. They key vault secret uri to obtain the source storage SAS
1032     token.
1033    :type key_vault_uri: str
1034    """
1035
1036    _validation = {
1037        'key_vault_uri': {'required': True},
1038    }
1039
1040    _attribute_map = {
1041        'type': {'key': 'type', 'type': 'str'},
1042        'uri': {'key': 'uri', 'type': 'str'},
1043        'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'},
1044    }
1045
1046    def __init__(
1047        self,
1048        *,
1049        key_vault_uri: str,
1050        type: Optional[Union[str, "PipelineSourceType"]] = "AzureStorageBlobContainer",
1051        uri: Optional[str] = None,
1052        **kwargs
1053    ):
1054        super(ImportPipelineSourceProperties, self).__init__(**kwargs)
1055        self.type = type
1056        self.uri = uri
1057        self.key_vault_uri = key_vault_uri
1058
1059
1060class ImportSource(msrest.serialization.Model):
1061    """ImportSource.
1062
1063    All required parameters must be populated in order to send to Azure.
1064
1065    :param resource_id: The resource identifier of the source Azure Container Registry.
1066    :type resource_id: str
1067    :param registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com').
1068    :type registry_uri: str
1069    :param credentials: Credentials used when importing from a registry uri.
1070    :type credentials:
1071     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ImportSourceCredentials
1072    :param source_image: Required. Repository name of the source image.
1073     Specify an image by repository ('hello-world'). This will use the 'latest' tag.
1074     Specify an image by tag ('hello-world:latest').
1075     Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').
1076    :type source_image: str
1077    """
1078
1079    _validation = {
1080        'source_image': {'required': True},
1081    }
1082
1083    _attribute_map = {
1084        'resource_id': {'key': 'resourceId', 'type': 'str'},
1085        'registry_uri': {'key': 'registryUri', 'type': 'str'},
1086        'credentials': {'key': 'credentials', 'type': 'ImportSourceCredentials'},
1087        'source_image': {'key': 'sourceImage', 'type': 'str'},
1088    }
1089
1090    def __init__(
1091        self,
1092        *,
1093        source_image: str,
1094        resource_id: Optional[str] = None,
1095        registry_uri: Optional[str] = None,
1096        credentials: Optional["ImportSourceCredentials"] = None,
1097        **kwargs
1098    ):
1099        super(ImportSource, self).__init__(**kwargs)
1100        self.resource_id = resource_id
1101        self.registry_uri = registry_uri
1102        self.credentials = credentials
1103        self.source_image = source_image
1104
1105
1106class ImportSourceCredentials(msrest.serialization.Model):
1107    """ImportSourceCredentials.
1108
1109    All required parameters must be populated in order to send to Azure.
1110
1111    :param username: The username to authenticate with the source registry.
1112    :type username: str
1113    :param password: Required. The password used to authenticate with the source registry.
1114    :type password: str
1115    """
1116
1117    _validation = {
1118        'password': {'required': True},
1119    }
1120
1121    _attribute_map = {
1122        'username': {'key': 'username', 'type': 'str'},
1123        'password': {'key': 'password', 'type': 'str'},
1124    }
1125
1126    def __init__(
1127        self,
1128        *,
1129        password: str,
1130        username: Optional[str] = None,
1131        **kwargs
1132    ):
1133        super(ImportSourceCredentials, self).__init__(**kwargs)
1134        self.username = username
1135        self.password = password
1136
1137
1138class InnerErrorDescription(msrest.serialization.Model):
1139    """inner error.
1140
1141    All required parameters must be populated in order to send to Azure.
1142
1143    :param code: Required. error code.
1144    :type code: str
1145    :param message: Required. error message.
1146    :type message: str
1147    :param target: target of the particular error.
1148    :type target: str
1149    """
1150
1151    _validation = {
1152        'code': {'required': True},
1153        'message': {'required': True},
1154    }
1155
1156    _attribute_map = {
1157        'code': {'key': 'code', 'type': 'str'},
1158        'message': {'key': 'message', 'type': 'str'},
1159        'target': {'key': 'target', 'type': 'str'},
1160    }
1161
1162    def __init__(
1163        self,
1164        *,
1165        code: str,
1166        message: str,
1167        target: Optional[str] = None,
1168        **kwargs
1169    ):
1170        super(InnerErrorDescription, self).__init__(**kwargs)
1171        self.code = code
1172        self.message = message
1173        self.target = target
1174
1175
1176class IPRule(msrest.serialization.Model):
1177    """IP rule with specific IP or IP range in CIDR format.
1178
1179    All required parameters must be populated in order to send to Azure.
1180
1181    :param action: The action of IP ACL rule. Possible values include: "Allow".
1182    :type action: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Action
1183    :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR format. Only IPV4
1184     address is allowed.
1185    :type ip_address_or_range: str
1186    """
1187
1188    _validation = {
1189        'ip_address_or_range': {'required': True},
1190    }
1191
1192    _attribute_map = {
1193        'action': {'key': 'action', 'type': 'str'},
1194        'ip_address_or_range': {'key': 'value', 'type': 'str'},
1195    }
1196
1197    def __init__(
1198        self,
1199        *,
1200        ip_address_or_range: str,
1201        action: Optional[Union[str, "Action"]] = None,
1202        **kwargs
1203    ):
1204        super(IPRule, self).__init__(**kwargs)
1205        self.action = action
1206        self.ip_address_or_range = ip_address_or_range
1207
1208
1209class KeyVaultProperties(msrest.serialization.Model):
1210    """KeyVaultProperties.
1211
1212    Variables are only populated by the server, and will be ignored when sending a request.
1213
1214    :param key_identifier: Key vault uri to access the encryption key.
1215    :type key_identifier: str
1216    :ivar versioned_key_identifier: The fully qualified key identifier that includes the version of
1217     the key that is actually used for encryption.
1218    :vartype versioned_key_identifier: str
1219    :param identity: The client id of the identity which will be used to access key vault.
1220    :type identity: str
1221    :ivar key_rotation_enabled: Auto key rotation status for a CMK enabled registry.
1222    :vartype key_rotation_enabled: bool
1223    :ivar last_key_rotation_timestamp: Timestamp of the last successful key rotation.
1224    :vartype last_key_rotation_timestamp: ~datetime.datetime
1225    """
1226
1227    _validation = {
1228        'versioned_key_identifier': {'readonly': True},
1229        'key_rotation_enabled': {'readonly': True},
1230        'last_key_rotation_timestamp': {'readonly': True},
1231    }
1232
1233    _attribute_map = {
1234        'key_identifier': {'key': 'keyIdentifier', 'type': 'str'},
1235        'versioned_key_identifier': {'key': 'versionedKeyIdentifier', 'type': 'str'},
1236        'identity': {'key': 'identity', 'type': 'str'},
1237        'key_rotation_enabled': {'key': 'keyRotationEnabled', 'type': 'bool'},
1238        'last_key_rotation_timestamp': {'key': 'lastKeyRotationTimestamp', 'type': 'iso-8601'},
1239    }
1240
1241    def __init__(
1242        self,
1243        *,
1244        key_identifier: Optional[str] = None,
1245        identity: Optional[str] = None,
1246        **kwargs
1247    ):
1248        super(KeyVaultProperties, self).__init__(**kwargs)
1249        self.key_identifier = key_identifier
1250        self.versioned_key_identifier = None
1251        self.identity = identity
1252        self.key_rotation_enabled = None
1253        self.last_key_rotation_timestamp = None
1254
1255
1256class LoggingProperties(msrest.serialization.Model):
1257    """The logging properties of the connected registry.
1258
1259    :param log_level: The verbosity of logs persisted on the connected registry. Possible values
1260     include: "Debug", "Information", "Warning", "Error", "None". Default value: "Information".
1261    :type log_level: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.LogLevel
1262    :param audit_log_status: Indicates whether audit logs are enabled on the connected registry.
1263     Possible values include: "Enabled", "Disabled". Default value: "Disabled".
1264    :type audit_log_status: str or
1265     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.AuditLogStatus
1266    """
1267
1268    _attribute_map = {
1269        'log_level': {'key': 'logLevel', 'type': 'str'},
1270        'audit_log_status': {'key': 'auditLogStatus', 'type': 'str'},
1271    }
1272
1273    def __init__(
1274        self,
1275        *,
1276        log_level: Optional[Union[str, "LogLevel"]] = "Information",
1277        audit_log_status: Optional[Union[str, "AuditLogStatus"]] = "Disabled",
1278        **kwargs
1279    ):
1280        super(LoggingProperties, self).__init__(**kwargs)
1281        self.log_level = log_level
1282        self.audit_log_status = audit_log_status
1283
1284
1285class LoginServerProperties(msrest.serialization.Model):
1286    """The login server properties of the connected registry.
1287
1288    Variables are only populated by the server, and will be ignored when sending a request.
1289
1290    :ivar host: The host of the connected registry. Can be FQDN or IP.
1291    :vartype host: str
1292    :ivar tls: The TLS properties of the connected registry login server.
1293    :vartype tls: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TlsProperties
1294    """
1295
1296    _validation = {
1297        'host': {'readonly': True},
1298        'tls': {'readonly': True},
1299    }
1300
1301    _attribute_map = {
1302        'host': {'key': 'host', 'type': 'str'},
1303        'tls': {'key': 'tls', 'type': 'TlsProperties'},
1304    }
1305
1306    def __init__(
1307        self,
1308        **kwargs
1309    ):
1310        super(LoginServerProperties, self).__init__(**kwargs)
1311        self.host = None
1312        self.tls = None
1313
1314
1315class NetworkRuleSet(msrest.serialization.Model):
1316    """The network rule set for a container registry.
1317
1318    All required parameters must be populated in order to send to Azure.
1319
1320    :param default_action: Required. The default action of allow or deny when no other rules match.
1321     Possible values include: "Allow", "Deny". Default value: "Allow".
1322    :type default_action: str or
1323     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.DefaultAction
1324    :param virtual_network_rules: The virtual network rules.
1325    :type virtual_network_rules:
1326     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.VirtualNetworkRule]
1327    :param ip_rules: The IP ACL rules.
1328    :type ip_rules: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.IPRule]
1329    """
1330
1331    _validation = {
1332        'default_action': {'required': True},
1333    }
1334
1335    _attribute_map = {
1336        'default_action': {'key': 'defaultAction', 'type': 'str'},
1337        'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
1338        'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'},
1339    }
1340
1341    def __init__(
1342        self,
1343        *,
1344        default_action: Union[str, "DefaultAction"] = "Allow",
1345        virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None,
1346        ip_rules: Optional[List["IPRule"]] = None,
1347        **kwargs
1348    ):
1349        super(NetworkRuleSet, self).__init__(**kwargs)
1350        self.default_action = default_action
1351        self.virtual_network_rules = virtual_network_rules
1352        self.ip_rules = ip_rules
1353
1354
1355class OperationDefinition(msrest.serialization.Model):
1356    """The definition of a container registry operation.
1357
1358    :param origin: The origin information of the container registry operation.
1359    :type origin: str
1360    :param name: Operation name: {provider}/{resource}/{operation}.
1361    :type name: str
1362    :param display: The display information for the container registry operation.
1363    :type display:
1364     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationDisplayDefinition
1365    :param service_specification: The definition of Azure Monitoring service.
1366    :type service_specification:
1367     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationServiceSpecificationDefinition
1368    """
1369
1370    _attribute_map = {
1371        'origin': {'key': 'origin', 'type': 'str'},
1372        'name': {'key': 'name', 'type': 'str'},
1373        'display': {'key': 'display', 'type': 'OperationDisplayDefinition'},
1374        'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecificationDefinition'},
1375    }
1376
1377    def __init__(
1378        self,
1379        *,
1380        origin: Optional[str] = None,
1381        name: Optional[str] = None,
1382        display: Optional["OperationDisplayDefinition"] = None,
1383        service_specification: Optional["OperationServiceSpecificationDefinition"] = None,
1384        **kwargs
1385    ):
1386        super(OperationDefinition, self).__init__(**kwargs)
1387        self.origin = origin
1388        self.name = name
1389        self.display = display
1390        self.service_specification = service_specification
1391
1392
1393class OperationDisplayDefinition(msrest.serialization.Model):
1394    """The display information for a container registry operation.
1395
1396    :param provider: The resource provider name: Microsoft.ContainerRegistry.
1397    :type provider: str
1398    :param resource: The resource on which the operation is performed.
1399    :type resource: str
1400    :param operation: The operation that users can perform.
1401    :type operation: str
1402    :param description: The description for the operation.
1403    :type description: str
1404    """
1405
1406    _attribute_map = {
1407        'provider': {'key': 'provider', 'type': 'str'},
1408        'resource': {'key': 'resource', 'type': 'str'},
1409        'operation': {'key': 'operation', 'type': 'str'},
1410        'description': {'key': 'description', 'type': 'str'},
1411    }
1412
1413    def __init__(
1414        self,
1415        *,
1416        provider: Optional[str] = None,
1417        resource: Optional[str] = None,
1418        operation: Optional[str] = None,
1419        description: Optional[str] = None,
1420        **kwargs
1421    ):
1422        super(OperationDisplayDefinition, self).__init__(**kwargs)
1423        self.provider = provider
1424        self.resource = resource
1425        self.operation = operation
1426        self.description = description
1427
1428
1429class OperationListResult(msrest.serialization.Model):
1430    """The result of a request to list container registry operations.
1431
1432    :param value: The list of container registry operations. Since this list may be incomplete, the
1433     nextLink field should be used to request the next list of operations.
1434    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationDefinition]
1435    :param next_link: The URI that can be used to request the next list of container registry
1436     operations.
1437    :type next_link: str
1438    """
1439
1440    _attribute_map = {
1441        'value': {'key': 'value', 'type': '[OperationDefinition]'},
1442        'next_link': {'key': 'nextLink', 'type': 'str'},
1443    }
1444
1445    def __init__(
1446        self,
1447        *,
1448        value: Optional[List["OperationDefinition"]] = None,
1449        next_link: Optional[str] = None,
1450        **kwargs
1451    ):
1452        super(OperationListResult, self).__init__(**kwargs)
1453        self.value = value
1454        self.next_link = next_link
1455
1456
1457class OperationLogSpecificationDefinition(msrest.serialization.Model):
1458    """The definition of Azure Monitoring log.
1459
1460    :param name: Log name.
1461    :type name: str
1462    :param display_name: Log display name.
1463    :type display_name: str
1464    :param blob_duration: Log blob duration.
1465    :type blob_duration: str
1466    """
1467
1468    _attribute_map = {
1469        'name': {'key': 'name', 'type': 'str'},
1470        'display_name': {'key': 'displayName', 'type': 'str'},
1471        'blob_duration': {'key': 'blobDuration', 'type': 'str'},
1472    }
1473
1474    def __init__(
1475        self,
1476        *,
1477        name: Optional[str] = None,
1478        display_name: Optional[str] = None,
1479        blob_duration: Optional[str] = None,
1480        **kwargs
1481    ):
1482        super(OperationLogSpecificationDefinition, self).__init__(**kwargs)
1483        self.name = name
1484        self.display_name = display_name
1485        self.blob_duration = blob_duration
1486
1487
1488class OperationMetricSpecificationDefinition(msrest.serialization.Model):
1489    """The definition of Azure Monitoring metric.
1490
1491    :param name: Metric name.
1492    :type name: str
1493    :param display_name: Metric display name.
1494    :type display_name: str
1495    :param display_description: Metric description.
1496    :type display_description: str
1497    :param unit: Metric unit.
1498    :type unit: str
1499    :param aggregation_type: Metric aggregation type.
1500    :type aggregation_type: str
1501    :param internal_metric_name: Internal metric name.
1502    :type internal_metric_name: str
1503    """
1504
1505    _attribute_map = {
1506        'name': {'key': 'name', 'type': 'str'},
1507        'display_name': {'key': 'displayName', 'type': 'str'},
1508        'display_description': {'key': 'displayDescription', 'type': 'str'},
1509        'unit': {'key': 'unit', 'type': 'str'},
1510        'aggregation_type': {'key': 'aggregationType', 'type': 'str'},
1511        'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'},
1512    }
1513
1514    def __init__(
1515        self,
1516        *,
1517        name: Optional[str] = None,
1518        display_name: Optional[str] = None,
1519        display_description: Optional[str] = None,
1520        unit: Optional[str] = None,
1521        aggregation_type: Optional[str] = None,
1522        internal_metric_name: Optional[str] = None,
1523        **kwargs
1524    ):
1525        super(OperationMetricSpecificationDefinition, self).__init__(**kwargs)
1526        self.name = name
1527        self.display_name = display_name
1528        self.display_description = display_description
1529        self.unit = unit
1530        self.aggregation_type = aggregation_type
1531        self.internal_metric_name = internal_metric_name
1532
1533
1534class OperationServiceSpecificationDefinition(msrest.serialization.Model):
1535    """The definition of Azure Monitoring list.
1536
1537    :param metric_specifications: A list of Azure Monitoring metrics definition.
1538    :type metric_specifications:
1539     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationMetricSpecificationDefinition]
1540    :param log_specifications: A list of Azure Monitoring log definitions.
1541    :type log_specifications:
1542     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationLogSpecificationDefinition]
1543    """
1544
1545    _attribute_map = {
1546        'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'},
1547        'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'},
1548    }
1549
1550    def __init__(
1551        self,
1552        *,
1553        metric_specifications: Optional[List["OperationMetricSpecificationDefinition"]] = None,
1554        log_specifications: Optional[List["OperationLogSpecificationDefinition"]] = None,
1555        **kwargs
1556    ):
1557        super(OperationServiceSpecificationDefinition, self).__init__(**kwargs)
1558        self.metric_specifications = metric_specifications
1559        self.log_specifications = log_specifications
1560
1561
1562class ParentProperties(msrest.serialization.Model):
1563    """The properties of the connected registry parent.
1564
1565    All required parameters must be populated in order to send to Azure.
1566
1567    :param id: The resource ID of the parent to which the connected registry will be associated.
1568    :type id: str
1569    :param sync_properties: Required. The sync properties of the connected registry with its
1570     parent.
1571    :type sync_properties: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SyncProperties
1572    """
1573
1574    _validation = {
1575        'sync_properties': {'required': True},
1576    }
1577
1578    _attribute_map = {
1579        'id': {'key': 'id', 'type': 'str'},
1580        'sync_properties': {'key': 'syncProperties', 'type': 'SyncProperties'},
1581    }
1582
1583    def __init__(
1584        self,
1585        *,
1586        sync_properties: "SyncProperties",
1587        id: Optional[str] = None,
1588        **kwargs
1589    ):
1590        super(ParentProperties, self).__init__(**kwargs)
1591        self.id = id
1592        self.sync_properties = sync_properties
1593
1594
1595class PipelineRun(ProxyResource):
1596    """An object that represents a pipeline run for a container registry.
1597
1598    Variables are only populated by the server, and will be ignored when sending a request.
1599
1600    :ivar id: The resource ID.
1601    :vartype id: str
1602    :ivar name: The name of the resource.
1603    :vartype name: str
1604    :ivar type: The type of the resource.
1605    :vartype type: str
1606    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1607    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
1608    :ivar provisioning_state: The provisioning state of a pipeline run. Possible values include:
1609     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
1610    :vartype provisioning_state: str or
1611     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
1612    :param request: The request parameters for a pipeline run.
1613    :type request: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRunRequest
1614    :ivar response: The response of a pipeline run.
1615    :vartype response: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRunResponse
1616    :param force_update_tag: How the pipeline run should be forced to recreate even if the pipeline
1617     run configuration has not changed.
1618    :type force_update_tag: str
1619    """
1620
1621    _validation = {
1622        'id': {'readonly': True},
1623        'name': {'readonly': True},
1624        'type': {'readonly': True},
1625        'system_data': {'readonly': True},
1626        'provisioning_state': {'readonly': True},
1627        'response': {'readonly': True},
1628    }
1629
1630    _attribute_map = {
1631        'id': {'key': 'id', 'type': 'str'},
1632        'name': {'key': 'name', 'type': 'str'},
1633        'type': {'key': 'type', 'type': 'str'},
1634        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1635        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1636        'request': {'key': 'properties.request', 'type': 'PipelineRunRequest'},
1637        'response': {'key': 'properties.response', 'type': 'PipelineRunResponse'},
1638        'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
1639    }
1640
1641    def __init__(
1642        self,
1643        *,
1644        request: Optional["PipelineRunRequest"] = None,
1645        force_update_tag: Optional[str] = None,
1646        **kwargs
1647    ):
1648        super(PipelineRun, self).__init__(**kwargs)
1649        self.provisioning_state = None
1650        self.request = request
1651        self.response = None
1652        self.force_update_tag = force_update_tag
1653
1654
1655class PipelineRunListResult(msrest.serialization.Model):
1656    """The result of a request to list pipeline runs for a container registry.
1657
1658    :param value: The list of pipeline runs. Since this list may be incomplete, the nextLink field
1659     should be used to request the next list of pipeline runs.
1660    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRun]
1661    :param next_link: The URI that can be used to request the next list of pipeline runs.
1662    :type next_link: str
1663    """
1664
1665    _attribute_map = {
1666        'value': {'key': 'value', 'type': '[PipelineRun]'},
1667        'next_link': {'key': 'nextLink', 'type': 'str'},
1668    }
1669
1670    def __init__(
1671        self,
1672        *,
1673        value: Optional[List["PipelineRun"]] = None,
1674        next_link: Optional[str] = None,
1675        **kwargs
1676    ):
1677        super(PipelineRunListResult, self).__init__(**kwargs)
1678        self.value = value
1679        self.next_link = next_link
1680
1681
1682class PipelineRunRequest(msrest.serialization.Model):
1683    """The request properties provided for a pipeline run.
1684
1685    :param pipeline_resource_id: The resource ID of the pipeline to run.
1686    :type pipeline_resource_id: str
1687    :param artifacts: List of source artifacts to be transferred by the pipeline.
1688     Specify an image by repository ('hello-world'). This will use the 'latest' tag.
1689     Specify an image by tag ('hello-world:latest').
1690     Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').
1691    :type artifacts: list[str]
1692    :param source: The source properties of the pipeline run.
1693    :type source:
1694     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRunSourceProperties
1695    :param target: The target properties of the pipeline run.
1696    :type target:
1697     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRunTargetProperties
1698    :param catalog_digest: The digest of the tar used to transfer the artifacts.
1699    :type catalog_digest: str
1700    """
1701
1702    _attribute_map = {
1703        'pipeline_resource_id': {'key': 'pipelineResourceId', 'type': 'str'},
1704        'artifacts': {'key': 'artifacts', 'type': '[str]'},
1705        'source': {'key': 'source', 'type': 'PipelineRunSourceProperties'},
1706        'target': {'key': 'target', 'type': 'PipelineRunTargetProperties'},
1707        'catalog_digest': {'key': 'catalogDigest', 'type': 'str'},
1708    }
1709
1710    def __init__(
1711        self,
1712        *,
1713        pipeline_resource_id: Optional[str] = None,
1714        artifacts: Optional[List[str]] = None,
1715        source: Optional["PipelineRunSourceProperties"] = None,
1716        target: Optional["PipelineRunTargetProperties"] = None,
1717        catalog_digest: Optional[str] = None,
1718        **kwargs
1719    ):
1720        super(PipelineRunRequest, self).__init__(**kwargs)
1721        self.pipeline_resource_id = pipeline_resource_id
1722        self.artifacts = artifacts
1723        self.source = source
1724        self.target = target
1725        self.catalog_digest = catalog_digest
1726
1727
1728class PipelineRunResponse(msrest.serialization.Model):
1729    """The response properties returned for a pipeline run.
1730
1731    :param status: The current status of the pipeline run.
1732    :type status: str
1733    :param imported_artifacts: The artifacts imported in the pipeline run.
1734    :type imported_artifacts: list[str]
1735    :param progress: The current progress of the copy operation.
1736    :type progress: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProgressProperties
1737    :param start_time: The time the pipeline run started.
1738    :type start_time: ~datetime.datetime
1739    :param finish_time: The time the pipeline run finished.
1740    :type finish_time: ~datetime.datetime
1741    :param source: The source of the pipeline run.
1742    :type source:
1743     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ImportPipelineSourceProperties
1744    :param target: The target of the pipeline run.
1745    :type target:
1746     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ExportPipelineTargetProperties
1747    :param catalog_digest: The digest of the tar used to transfer the artifacts.
1748    :type catalog_digest: str
1749    :param trigger: The trigger that caused the pipeline run.
1750    :type trigger:
1751     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineTriggerDescriptor
1752    :param pipeline_run_error_message: The detailed error message for the pipeline run in the case
1753     of failure.
1754    :type pipeline_run_error_message: str
1755    """
1756
1757    _attribute_map = {
1758        'status': {'key': 'status', 'type': 'str'},
1759        'imported_artifacts': {'key': 'importedArtifacts', 'type': '[str]'},
1760        'progress': {'key': 'progress', 'type': 'ProgressProperties'},
1761        'start_time': {'key': 'startTime', 'type': 'iso-8601'},
1762        'finish_time': {'key': 'finishTime', 'type': 'iso-8601'},
1763        'source': {'key': 'source', 'type': 'ImportPipelineSourceProperties'},
1764        'target': {'key': 'target', 'type': 'ExportPipelineTargetProperties'},
1765        'catalog_digest': {'key': 'catalogDigest', 'type': 'str'},
1766        'trigger': {'key': 'trigger', 'type': 'PipelineTriggerDescriptor'},
1767        'pipeline_run_error_message': {'key': 'pipelineRunErrorMessage', 'type': 'str'},
1768    }
1769
1770    def __init__(
1771        self,
1772        *,
1773        status: Optional[str] = None,
1774        imported_artifacts: Optional[List[str]] = None,
1775        progress: Optional["ProgressProperties"] = None,
1776        start_time: Optional[datetime.datetime] = None,
1777        finish_time: Optional[datetime.datetime] = None,
1778        source: Optional["ImportPipelineSourceProperties"] = None,
1779        target: Optional["ExportPipelineTargetProperties"] = None,
1780        catalog_digest: Optional[str] = None,
1781        trigger: Optional["PipelineTriggerDescriptor"] = None,
1782        pipeline_run_error_message: Optional[str] = None,
1783        **kwargs
1784    ):
1785        super(PipelineRunResponse, self).__init__(**kwargs)
1786        self.status = status
1787        self.imported_artifacts = imported_artifacts
1788        self.progress = progress
1789        self.start_time = start_time
1790        self.finish_time = finish_time
1791        self.source = source
1792        self.target = target
1793        self.catalog_digest = catalog_digest
1794        self.trigger = trigger
1795        self.pipeline_run_error_message = pipeline_run_error_message
1796
1797
1798class PipelineRunSourceProperties(msrest.serialization.Model):
1799    """PipelineRunSourceProperties.
1800
1801    :param type: The type of the source. Possible values include: "AzureStorageBlob". Default
1802     value: "AzureStorageBlob".
1803    :type type: str or
1804     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRunSourceType
1805    :param name: The name of the source.
1806    :type name: str
1807    """
1808
1809    _attribute_map = {
1810        'type': {'key': 'type', 'type': 'str'},
1811        'name': {'key': 'name', 'type': 'str'},
1812    }
1813
1814    def __init__(
1815        self,
1816        *,
1817        type: Optional[Union[str, "PipelineRunSourceType"]] = "AzureStorageBlob",
1818        name: Optional[str] = None,
1819        **kwargs
1820    ):
1821        super(PipelineRunSourceProperties, self).__init__(**kwargs)
1822        self.type = type
1823        self.name = name
1824
1825
1826class PipelineRunTargetProperties(msrest.serialization.Model):
1827    """PipelineRunTargetProperties.
1828
1829    :param type: The type of the target. Possible values include: "AzureStorageBlob". Default
1830     value: "AzureStorageBlob".
1831    :type type: str or
1832     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineRunTargetType
1833    :param name: The name of the target.
1834    :type name: str
1835    """
1836
1837    _attribute_map = {
1838        'type': {'key': 'type', 'type': 'str'},
1839        'name': {'key': 'name', 'type': 'str'},
1840    }
1841
1842    def __init__(
1843        self,
1844        *,
1845        type: Optional[Union[str, "PipelineRunTargetType"]] = "AzureStorageBlob",
1846        name: Optional[str] = None,
1847        **kwargs
1848    ):
1849        super(PipelineRunTargetProperties, self).__init__(**kwargs)
1850        self.type = type
1851        self.name = name
1852
1853
1854class PipelineSourceTriggerDescriptor(msrest.serialization.Model):
1855    """PipelineSourceTriggerDescriptor.
1856
1857    :param timestamp: The timestamp when the source update happened.
1858    :type timestamp: ~datetime.datetime
1859    """
1860
1861    _attribute_map = {
1862        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
1863    }
1864
1865    def __init__(
1866        self,
1867        *,
1868        timestamp: Optional[datetime.datetime] = None,
1869        **kwargs
1870    ):
1871        super(PipelineSourceTriggerDescriptor, self).__init__(**kwargs)
1872        self.timestamp = timestamp
1873
1874
1875class PipelineSourceTriggerProperties(msrest.serialization.Model):
1876    """PipelineSourceTriggerProperties.
1877
1878    All required parameters must be populated in order to send to Azure.
1879
1880    :param status: Required. The current status of the source trigger. Possible values include:
1881     "Enabled", "Disabled". Default value: "Enabled".
1882    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TriggerStatus
1883    """
1884
1885    _validation = {
1886        'status': {'required': True},
1887    }
1888
1889    _attribute_map = {
1890        'status': {'key': 'status', 'type': 'str'},
1891    }
1892
1893    def __init__(
1894        self,
1895        *,
1896        status: Union[str, "TriggerStatus"] = "Enabled",
1897        **kwargs
1898    ):
1899        super(PipelineSourceTriggerProperties, self).__init__(**kwargs)
1900        self.status = status
1901
1902
1903class PipelineTriggerDescriptor(msrest.serialization.Model):
1904    """PipelineTriggerDescriptor.
1905
1906    :param source_trigger: The source trigger that caused the pipeline run.
1907    :type source_trigger:
1908     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineSourceTriggerDescriptor
1909    """
1910
1911    _attribute_map = {
1912        'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerDescriptor'},
1913    }
1914
1915    def __init__(
1916        self,
1917        *,
1918        source_trigger: Optional["PipelineSourceTriggerDescriptor"] = None,
1919        **kwargs
1920    ):
1921        super(PipelineTriggerDescriptor, self).__init__(**kwargs)
1922        self.source_trigger = source_trigger
1923
1924
1925class PipelineTriggerProperties(msrest.serialization.Model):
1926    """PipelineTriggerProperties.
1927
1928    :param source_trigger: The source trigger properties of the pipeline.
1929    :type source_trigger:
1930     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PipelineSourceTriggerProperties
1931    """
1932
1933    _attribute_map = {
1934        'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerProperties'},
1935    }
1936
1937    def __init__(
1938        self,
1939        *,
1940        source_trigger: Optional["PipelineSourceTriggerProperties"] = None,
1941        **kwargs
1942    ):
1943        super(PipelineTriggerProperties, self).__init__(**kwargs)
1944        self.source_trigger = source_trigger
1945
1946
1947class Policies(msrest.serialization.Model):
1948    """The policies for a container registry.
1949
1950    :param quarantine_policy: The quarantine policy for a container registry.
1951    :type quarantine_policy:
1952     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.QuarantinePolicy
1953    :param trust_policy: The content trust policy for a container registry.
1954    :type trust_policy: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TrustPolicy
1955    :param retention_policy: The retention policy for a container registry.
1956    :type retention_policy:
1957     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.RetentionPolicy
1958    """
1959
1960    _attribute_map = {
1961        'quarantine_policy': {'key': 'quarantinePolicy', 'type': 'QuarantinePolicy'},
1962        'trust_policy': {'key': 'trustPolicy', 'type': 'TrustPolicy'},
1963        'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'},
1964    }
1965
1966    def __init__(
1967        self,
1968        *,
1969        quarantine_policy: Optional["QuarantinePolicy"] = None,
1970        trust_policy: Optional["TrustPolicy"] = None,
1971        retention_policy: Optional["RetentionPolicy"] = None,
1972        **kwargs
1973    ):
1974        super(Policies, self).__init__(**kwargs)
1975        self.quarantine_policy = quarantine_policy
1976        self.trust_policy = trust_policy
1977        self.retention_policy = retention_policy
1978
1979
1980class PrivateEndpoint(msrest.serialization.Model):
1981    """The Private Endpoint resource.
1982
1983    :param id: This is private endpoint resource created with Microsoft.Network resource provider.
1984    :type id: str
1985    """
1986
1987    _attribute_map = {
1988        'id': {'key': 'id', 'type': 'str'},
1989    }
1990
1991    def __init__(
1992        self,
1993        *,
1994        id: Optional[str] = None,
1995        **kwargs
1996    ):
1997        super(PrivateEndpoint, self).__init__(**kwargs)
1998        self.id = id
1999
2000
2001class PrivateEndpointConnection(ProxyResource):
2002    """An object that represents a private endpoint connection for a container registry.
2003
2004    Variables are only populated by the server, and will be ignored when sending a request.
2005
2006    :ivar id: The resource ID.
2007    :vartype id: str
2008    :ivar name: The name of the resource.
2009    :vartype name: str
2010    :ivar type: The type of the resource.
2011    :vartype type: str
2012    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2013    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
2014    :param private_endpoint: The resource of private endpoint.
2015    :type private_endpoint:
2016     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PrivateEndpoint
2017    :param private_link_service_connection_state: A collection of information about the state of
2018     the connection between service consumer and provider.
2019    :type private_link_service_connection_state:
2020     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PrivateLinkServiceConnectionState
2021    :ivar provisioning_state: The provisioning state of private endpoint connection resource.
2022     Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
2023    :vartype provisioning_state: str or
2024     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
2025    """
2026
2027    _validation = {
2028        'id': {'readonly': True},
2029        'name': {'readonly': True},
2030        'type': {'readonly': True},
2031        'system_data': {'readonly': True},
2032        'provisioning_state': {'readonly': True},
2033    }
2034
2035    _attribute_map = {
2036        'id': {'key': 'id', 'type': 'str'},
2037        'name': {'key': 'name', 'type': 'str'},
2038        'type': {'key': 'type', 'type': 'str'},
2039        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2040        'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
2041        'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
2042        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2043    }
2044
2045    def __init__(
2046        self,
2047        *,
2048        private_endpoint: Optional["PrivateEndpoint"] = None,
2049        private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None,
2050        **kwargs
2051    ):
2052        super(PrivateEndpointConnection, self).__init__(**kwargs)
2053        self.private_endpoint = private_endpoint
2054        self.private_link_service_connection_state = private_link_service_connection_state
2055        self.provisioning_state = None
2056
2057
2058class PrivateEndpointConnectionListResult(msrest.serialization.Model):
2059    """The result of a request to list private endpoint connections for a container registry.
2060
2061    :param value: The list of private endpoint connections. Since this list may be incomplete, the
2062     nextLink field should be used to request the next list of private endpoint connections.
2063    :type value:
2064     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.PrivateEndpointConnection]
2065    :param next_link: The URI that can be used to request the next list of private endpoint
2066     connections.
2067    :type next_link: str
2068    """
2069
2070    _attribute_map = {
2071        'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'},
2072        'next_link': {'key': 'nextLink', 'type': 'str'},
2073    }
2074
2075    def __init__(
2076        self,
2077        *,
2078        value: Optional[List["PrivateEndpointConnection"]] = None,
2079        next_link: Optional[str] = None,
2080        **kwargs
2081    ):
2082        super(PrivateEndpointConnectionListResult, self).__init__(**kwargs)
2083        self.value = value
2084        self.next_link = next_link
2085
2086
2087class PrivateLinkResource(msrest.serialization.Model):
2088    """A resource that supports private link capabilities.
2089
2090    Variables are only populated by the server, and will be ignored when sending a request.
2091
2092    :ivar type: The resource type is private link resource.
2093    :vartype type: str
2094    :param id: The resource ID.
2095    :type id: str
2096    :param name: The name of the resource.
2097    :type name: str
2098    :param group_id: The private link resource group id.
2099    :type group_id: str
2100    :param required_members: The private link resource required member names.
2101    :type required_members: list[str]
2102    :param required_zone_names: The private link resource Private link DNS zone name.
2103    :type required_zone_names: list[str]
2104    """
2105
2106    _validation = {
2107        'type': {'readonly': True},
2108    }
2109
2110    _attribute_map = {
2111        'type': {'key': 'type', 'type': 'str'},
2112        'id': {'key': 'id', 'type': 'str'},
2113        'name': {'key': 'name', 'type': 'str'},
2114        'group_id': {'key': 'properties.groupId', 'type': 'str'},
2115        'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'},
2116        'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'},
2117    }
2118
2119    def __init__(
2120        self,
2121        *,
2122        id: Optional[str] = None,
2123        name: Optional[str] = None,
2124        group_id: Optional[str] = None,
2125        required_members: Optional[List[str]] = None,
2126        required_zone_names: Optional[List[str]] = None,
2127        **kwargs
2128    ):
2129        super(PrivateLinkResource, self).__init__(**kwargs)
2130        self.type = None
2131        self.id = id
2132        self.name = name
2133        self.group_id = group_id
2134        self.required_members = required_members
2135        self.required_zone_names = required_zone_names
2136
2137
2138class PrivateLinkResourceListResult(msrest.serialization.Model):
2139    """The result of a request to list private link resources for a container registry.
2140
2141    :param value: The list of private link resources. Since this list may be incomplete, the
2142     nextLink field should be used to request the next list of private link resources.
2143    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.PrivateLinkResource]
2144    :param next_link: The URI that can be used to request the next list of private link resources.
2145    :type next_link: str
2146    """
2147
2148    _attribute_map = {
2149        'value': {'key': 'value', 'type': '[PrivateLinkResource]'},
2150        'next_link': {'key': 'nextLink', 'type': 'str'},
2151    }
2152
2153    def __init__(
2154        self,
2155        *,
2156        value: Optional[List["PrivateLinkResource"]] = None,
2157        next_link: Optional[str] = None,
2158        **kwargs
2159    ):
2160        super(PrivateLinkResourceListResult, self).__init__(**kwargs)
2161        self.value = value
2162        self.next_link = next_link
2163
2164
2165class PrivateLinkServiceConnectionState(msrest.serialization.Model):
2166    """The state of a private link service connection.
2167
2168    :param status: The private link service connection status. Possible values include: "Approved",
2169     "Pending", "Rejected", "Disconnected".
2170    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ConnectionStatus
2171    :param description: The description for connection status. For example if connection is
2172     rejected it can indicate reason for rejection.
2173    :type description: str
2174    :param actions_required: A message indicating if changes on the service provider require any
2175     updates on the consumer. Possible values include: "None", "Recreate".
2176    :type actions_required: str or
2177     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ActionsRequired
2178    """
2179
2180    _attribute_map = {
2181        'status': {'key': 'status', 'type': 'str'},
2182        'description': {'key': 'description', 'type': 'str'},
2183        'actions_required': {'key': 'actionsRequired', 'type': 'str'},
2184    }
2185
2186    def __init__(
2187        self,
2188        *,
2189        status: Optional[Union[str, "ConnectionStatus"]] = None,
2190        description: Optional[str] = None,
2191        actions_required: Optional[Union[str, "ActionsRequired"]] = None,
2192        **kwargs
2193    ):
2194        super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
2195        self.status = status
2196        self.description = description
2197        self.actions_required = actions_required
2198
2199
2200class ProgressProperties(msrest.serialization.Model):
2201    """ProgressProperties.
2202
2203    :param percentage: The percentage complete of the copy operation.
2204    :type percentage: str
2205    """
2206
2207    _attribute_map = {
2208        'percentage': {'key': 'percentage', 'type': 'str'},
2209    }
2210
2211    def __init__(
2212        self,
2213        *,
2214        percentage: Optional[str] = None,
2215        **kwargs
2216    ):
2217        super(ProgressProperties, self).__init__(**kwargs)
2218        self.percentage = percentage
2219
2220
2221class QuarantinePolicy(msrest.serialization.Model):
2222    """The quarantine policy for a container registry.
2223
2224    :param status: The value that indicates whether the policy is enabled or not. Possible values
2225     include: "enabled", "disabled".
2226    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PolicyStatus
2227    """
2228
2229    _attribute_map = {
2230        'status': {'key': 'status', 'type': 'str'},
2231    }
2232
2233    def __init__(
2234        self,
2235        *,
2236        status: Optional[Union[str, "PolicyStatus"]] = None,
2237        **kwargs
2238    ):
2239        super(QuarantinePolicy, self).__init__(**kwargs)
2240        self.status = status
2241
2242
2243class RegenerateCredentialParameters(msrest.serialization.Model):
2244    """The parameters used to regenerate the login credential.
2245
2246    All required parameters must be populated in order to send to Azure.
2247
2248    :param name: Required. Specifies name of the password which should be regenerated -- password
2249     or password2. Possible values include: "password", "password2".
2250    :type name: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PasswordName
2251    """
2252
2253    _validation = {
2254        'name': {'required': True},
2255    }
2256
2257    _attribute_map = {
2258        'name': {'key': 'name', 'type': 'str'},
2259    }
2260
2261    def __init__(
2262        self,
2263        *,
2264        name: Union[str, "PasswordName"],
2265        **kwargs
2266    ):
2267        super(RegenerateCredentialParameters, self).__init__(**kwargs)
2268        self.name = name
2269
2270
2271class Resource(msrest.serialization.Model):
2272    """An Azure resource.
2273
2274    Variables are only populated by the server, and will be ignored when sending a request.
2275
2276    All required parameters must be populated in order to send to Azure.
2277
2278    :ivar id: The resource ID.
2279    :vartype id: str
2280    :ivar name: The name of the resource.
2281    :vartype name: str
2282    :ivar type: The type of the resource.
2283    :vartype type: str
2284    :param location: Required. The location of the resource. This cannot be changed after the
2285     resource is created.
2286    :type location: str
2287    :param tags: A set of tags. The tags of the resource.
2288    :type tags: dict[str, str]
2289    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2290    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
2291    """
2292
2293    _validation = {
2294        'id': {'readonly': True},
2295        'name': {'readonly': True},
2296        'type': {'readonly': True},
2297        'location': {'required': True},
2298        'system_data': {'readonly': True},
2299    }
2300
2301    _attribute_map = {
2302        'id': {'key': 'id', 'type': 'str'},
2303        'name': {'key': 'name', 'type': 'str'},
2304        'type': {'key': 'type', 'type': 'str'},
2305        'location': {'key': 'location', 'type': 'str'},
2306        'tags': {'key': 'tags', 'type': '{str}'},
2307        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2308    }
2309
2310    def __init__(
2311        self,
2312        *,
2313        location: str,
2314        tags: Optional[Dict[str, str]] = None,
2315        **kwargs
2316    ):
2317        super(Resource, self).__init__(**kwargs)
2318        self.id = None
2319        self.name = None
2320        self.type = None
2321        self.location = location
2322        self.tags = tags
2323        self.system_data = None
2324
2325
2326class Registry(Resource):
2327    """An object that represents a container registry.
2328
2329    Variables are only populated by the server, and will be ignored when sending a request.
2330
2331    All required parameters must be populated in order to send to Azure.
2332
2333    :ivar id: The resource ID.
2334    :vartype id: str
2335    :ivar name: The name of the resource.
2336    :vartype name: str
2337    :ivar type: The type of the resource.
2338    :vartype type: str
2339    :param location: Required. The location of the resource. This cannot be changed after the
2340     resource is created.
2341    :type location: str
2342    :param tags: A set of tags. The tags of the resource.
2343    :type tags: dict[str, str]
2344    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2345    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
2346    :param sku: Required. The SKU of the container registry.
2347    :type sku: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Sku
2348    :param identity: The identity of the container registry.
2349    :type identity: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties
2350    :ivar login_server: The URL that can be used to log into the container registry.
2351    :vartype login_server: str
2352    :ivar creation_date: The creation date of the container registry in ISO8601 format.
2353    :vartype creation_date: ~datetime.datetime
2354    :ivar provisioning_state: The provisioning state of the container registry at the time the
2355     operation was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded",
2356     "Failed", "Canceled".
2357    :vartype provisioning_state: str or
2358     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
2359    :ivar status: The status of the container registry at the time the operation was called.
2360    :vartype status: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Status
2361    :param admin_user_enabled: The value that indicates whether the admin user is enabled.
2362    :type admin_user_enabled: bool
2363    :param network_rule_set: The network rule set for a container registry.
2364    :type network_rule_set: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleSet
2365    :param policies: The policies for a container registry.
2366    :type policies: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Policies
2367    :param encryption: The encryption settings of container registry.
2368    :type encryption: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.EncryptionProperty
2369    :param data_endpoint_enabled: Enable a single data endpoint per region for serving data.
2370    :type data_endpoint_enabled: bool
2371    :ivar data_endpoint_host_names: List of host names that will serve data when
2372     dataEndpointEnabled is true.
2373    :vartype data_endpoint_host_names: list[str]
2374    :ivar private_endpoint_connections: List of private endpoint connections for a container
2375     registry.
2376    :vartype private_endpoint_connections:
2377     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.PrivateEndpointConnection]
2378    :param public_network_access: Whether or not public network access is allowed for the container
2379     registry. Possible values include: "Enabled", "Disabled".
2380    :type public_network_access: str or
2381     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PublicNetworkAccess
2382    :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network
2383     restricted registry. Possible values include: "AzureServices", "None".
2384    :type network_rule_bypass_options: str or
2385     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleBypassOptions
2386    :param zone_redundancy: Whether or not zone redundancy is enabled for this container registry.
2387     Possible values include: "Enabled", "Disabled".
2388    :type zone_redundancy: str or
2389     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ZoneRedundancy
2390    :param anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients.
2391    :type anonymous_pull_enabled: bool
2392    """
2393
2394    _validation = {
2395        'id': {'readonly': True},
2396        'name': {'readonly': True},
2397        'type': {'readonly': True},
2398        'location': {'required': True},
2399        'system_data': {'readonly': True},
2400        'sku': {'required': True},
2401        'login_server': {'readonly': True},
2402        'creation_date': {'readonly': True},
2403        'provisioning_state': {'readonly': True},
2404        'status': {'readonly': True},
2405        'data_endpoint_host_names': {'readonly': True},
2406        'private_endpoint_connections': {'readonly': True},
2407    }
2408
2409    _attribute_map = {
2410        'id': {'key': 'id', 'type': 'str'},
2411        'name': {'key': 'name', 'type': 'str'},
2412        'type': {'key': 'type', 'type': 'str'},
2413        'location': {'key': 'location', 'type': 'str'},
2414        'tags': {'key': 'tags', 'type': '{str}'},
2415        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2416        'sku': {'key': 'sku', 'type': 'Sku'},
2417        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2418        'login_server': {'key': 'properties.loginServer', 'type': 'str'},
2419        'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
2420        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2421        'status': {'key': 'properties.status', 'type': 'Status'},
2422        'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
2423        'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
2424        'policies': {'key': 'properties.policies', 'type': 'Policies'},
2425        'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
2426        'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
2427        'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'},
2428        'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
2429        'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
2430        'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
2431        'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'},
2432        'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'},
2433    }
2434
2435    def __init__(
2436        self,
2437        *,
2438        location: str,
2439        sku: "Sku",
2440        tags: Optional[Dict[str, str]] = None,
2441        identity: Optional["IdentityProperties"] = None,
2442        admin_user_enabled: Optional[bool] = False,
2443        network_rule_set: Optional["NetworkRuleSet"] = None,
2444        policies: Optional["Policies"] = None,
2445        encryption: Optional["EncryptionProperty"] = None,
2446        data_endpoint_enabled: Optional[bool] = None,
2447        public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None,
2448        network_rule_bypass_options: Optional[Union[str, "NetworkRuleBypassOptions"]] = None,
2449        zone_redundancy: Optional[Union[str, "ZoneRedundancy"]] = None,
2450        anonymous_pull_enabled: Optional[bool] = False,
2451        **kwargs
2452    ):
2453        super(Registry, self).__init__(location=location, tags=tags, **kwargs)
2454        self.sku = sku
2455        self.identity = identity
2456        self.login_server = None
2457        self.creation_date = None
2458        self.provisioning_state = None
2459        self.status = None
2460        self.admin_user_enabled = admin_user_enabled
2461        self.network_rule_set = network_rule_set
2462        self.policies = policies
2463        self.encryption = encryption
2464        self.data_endpoint_enabled = data_endpoint_enabled
2465        self.data_endpoint_host_names = None
2466        self.private_endpoint_connections = None
2467        self.public_network_access = public_network_access
2468        self.network_rule_bypass_options = network_rule_bypass_options
2469        self.zone_redundancy = zone_redundancy
2470        self.anonymous_pull_enabled = anonymous_pull_enabled
2471
2472
2473class RegistryListCredentialsResult(msrest.serialization.Model):
2474    """The response from the ListCredentials operation.
2475
2476    :param username: The username for a container registry.
2477    :type username: str
2478    :param passwords: The list of passwords for a container registry.
2479    :type passwords:
2480     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.RegistryPassword]
2481    """
2482
2483    _attribute_map = {
2484        'username': {'key': 'username', 'type': 'str'},
2485        'passwords': {'key': 'passwords', 'type': '[RegistryPassword]'},
2486    }
2487
2488    def __init__(
2489        self,
2490        *,
2491        username: Optional[str] = None,
2492        passwords: Optional[List["RegistryPassword"]] = None,
2493        **kwargs
2494    ):
2495        super(RegistryListCredentialsResult, self).__init__(**kwargs)
2496        self.username = username
2497        self.passwords = passwords
2498
2499
2500class RegistryListResult(msrest.serialization.Model):
2501    """The result of a request to list container registries.
2502
2503    :param value: The list of container registries. Since this list may be incomplete, the nextLink
2504     field should be used to request the next list of container registries.
2505    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Registry]
2506    :param next_link: The URI that can be used to request the next list of container registries.
2507    :type next_link: str
2508    """
2509
2510    _attribute_map = {
2511        'value': {'key': 'value', 'type': '[Registry]'},
2512        'next_link': {'key': 'nextLink', 'type': 'str'},
2513    }
2514
2515    def __init__(
2516        self,
2517        *,
2518        value: Optional[List["Registry"]] = None,
2519        next_link: Optional[str] = None,
2520        **kwargs
2521    ):
2522        super(RegistryListResult, self).__init__(**kwargs)
2523        self.value = value
2524        self.next_link = next_link
2525
2526
2527class RegistryNameCheckRequest(msrest.serialization.Model):
2528    """A request to check whether a container registry name is available.
2529
2530    Variables are only populated by the server, and will be ignored when sending a request.
2531
2532    All required parameters must be populated in order to send to Azure.
2533
2534    :param name: Required. The name of the container registry.
2535    :type name: str
2536    :ivar type: The resource type of the container registry. This field must be set to
2537     'Microsoft.ContainerRegistry/registries'. Has constant value:
2538     "Microsoft.ContainerRegistry/registries".
2539    :vartype type: str
2540    """
2541
2542    _validation = {
2543        'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'},
2544        'type': {'required': True, 'constant': True},
2545    }
2546
2547    _attribute_map = {
2548        'name': {'key': 'name', 'type': 'str'},
2549        'type': {'key': 'type', 'type': 'str'},
2550    }
2551
2552    type = "Microsoft.ContainerRegistry/registries"
2553
2554    def __init__(
2555        self,
2556        *,
2557        name: str,
2558        **kwargs
2559    ):
2560        super(RegistryNameCheckRequest, self).__init__(**kwargs)
2561        self.name = name
2562
2563
2564class RegistryNameStatus(msrest.serialization.Model):
2565    """The result of a request to check the availability of a container registry name.
2566
2567    :param name_available: The value that indicates whether the name is available.
2568    :type name_available: bool
2569    :param reason: If any, the reason that the name is not available.
2570    :type reason: str
2571    :param message: If any, the error message that provides more detail for the reason that the
2572     name is not available.
2573    :type message: str
2574    """
2575
2576    _attribute_map = {
2577        'name_available': {'key': 'nameAvailable', 'type': 'bool'},
2578        'reason': {'key': 'reason', 'type': 'str'},
2579        'message': {'key': 'message', 'type': 'str'},
2580    }
2581
2582    def __init__(
2583        self,
2584        *,
2585        name_available: Optional[bool] = None,
2586        reason: Optional[str] = None,
2587        message: Optional[str] = None,
2588        **kwargs
2589    ):
2590        super(RegistryNameStatus, self).__init__(**kwargs)
2591        self.name_available = name_available
2592        self.reason = reason
2593        self.message = message
2594
2595
2596class RegistryPassword(msrest.serialization.Model):
2597    """The login password for the container registry.
2598
2599    :param name: The password name. Possible values include: "password", "password2".
2600    :type name: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PasswordName
2601    :param value: The password value.
2602    :type value: str
2603    """
2604
2605    _attribute_map = {
2606        'name': {'key': 'name', 'type': 'str'},
2607        'value': {'key': 'value', 'type': 'str'},
2608    }
2609
2610    def __init__(
2611        self,
2612        *,
2613        name: Optional[Union[str, "PasswordName"]] = None,
2614        value: Optional[str] = None,
2615        **kwargs
2616    ):
2617        super(RegistryPassword, self).__init__(**kwargs)
2618        self.name = name
2619        self.value = value
2620
2621
2622class RegistryUpdateParameters(msrest.serialization.Model):
2623    """The parameters for updating a container registry.
2624
2625    :param identity: The identity of the container registry.
2626    :type identity: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties
2627    :param tags: A set of tags. The tags for the container registry.
2628    :type tags: dict[str, str]
2629    :param sku: The SKU of the container registry.
2630    :type sku: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Sku
2631    :param admin_user_enabled: The value that indicates whether the admin user is enabled.
2632    :type admin_user_enabled: bool
2633    :param network_rule_set: The network rule set for a container registry.
2634    :type network_rule_set: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleSet
2635    :param policies: The policies for a container registry.
2636    :type policies: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Policies
2637    :param encryption: The encryption settings of container registry.
2638    :type encryption: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.EncryptionProperty
2639    :param data_endpoint_enabled: Enable a single data endpoint per region for serving data.
2640    :type data_endpoint_enabled: bool
2641    :param public_network_access: Whether or not public network access is allowed for the container
2642     registry. Possible values include: "Enabled", "Disabled".
2643    :type public_network_access: str or
2644     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PublicNetworkAccess
2645    :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network
2646     restricted registry. Possible values include: "AzureServices", "None".
2647    :type network_rule_bypass_options: str or
2648     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleBypassOptions
2649    :param anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients.
2650    :type anonymous_pull_enabled: bool
2651    """
2652
2653    _attribute_map = {
2654        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2655        'tags': {'key': 'tags', 'type': '{str}'},
2656        'sku': {'key': 'sku', 'type': 'Sku'},
2657        'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
2658        'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
2659        'policies': {'key': 'properties.policies', 'type': 'Policies'},
2660        'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
2661        'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
2662        'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
2663        'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
2664        'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'},
2665    }
2666
2667    def __init__(
2668        self,
2669        *,
2670        identity: Optional["IdentityProperties"] = None,
2671        tags: Optional[Dict[str, str]] = None,
2672        sku: Optional["Sku"] = None,
2673        admin_user_enabled: Optional[bool] = None,
2674        network_rule_set: Optional["NetworkRuleSet"] = None,
2675        policies: Optional["Policies"] = None,
2676        encryption: Optional["EncryptionProperty"] = None,
2677        data_endpoint_enabled: Optional[bool] = None,
2678        public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None,
2679        network_rule_bypass_options: Optional[Union[str, "NetworkRuleBypassOptions"]] = None,
2680        anonymous_pull_enabled: Optional[bool] = None,
2681        **kwargs
2682    ):
2683        super(RegistryUpdateParameters, self).__init__(**kwargs)
2684        self.identity = identity
2685        self.tags = tags
2686        self.sku = sku
2687        self.admin_user_enabled = admin_user_enabled
2688        self.network_rule_set = network_rule_set
2689        self.policies = policies
2690        self.encryption = encryption
2691        self.data_endpoint_enabled = data_endpoint_enabled
2692        self.public_network_access = public_network_access
2693        self.network_rule_bypass_options = network_rule_bypass_options
2694        self.anonymous_pull_enabled = anonymous_pull_enabled
2695
2696
2697class RegistryUsage(msrest.serialization.Model):
2698    """The quota usage for a container registry.
2699
2700    :param name: The name of the usage.
2701    :type name: str
2702    :param limit: The limit of the usage.
2703    :type limit: long
2704    :param current_value: The current value of the usage.
2705    :type current_value: long
2706    :param unit: The unit of measurement. Possible values include: "Count", "Bytes".
2707    :type unit: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.RegistryUsageUnit
2708    """
2709
2710    _attribute_map = {
2711        'name': {'key': 'name', 'type': 'str'},
2712        'limit': {'key': 'limit', 'type': 'long'},
2713        'current_value': {'key': 'currentValue', 'type': 'long'},
2714        'unit': {'key': 'unit', 'type': 'str'},
2715    }
2716
2717    def __init__(
2718        self,
2719        *,
2720        name: Optional[str] = None,
2721        limit: Optional[int] = None,
2722        current_value: Optional[int] = None,
2723        unit: Optional[Union[str, "RegistryUsageUnit"]] = None,
2724        **kwargs
2725    ):
2726        super(RegistryUsage, self).__init__(**kwargs)
2727        self.name = name
2728        self.limit = limit
2729        self.current_value = current_value
2730        self.unit = unit
2731
2732
2733class RegistryUsageListResult(msrest.serialization.Model):
2734    """The result of a request to get container registry quota usages.
2735
2736    :param value: The list of container registry quota usages.
2737    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.RegistryUsage]
2738    """
2739
2740    _attribute_map = {
2741        'value': {'key': 'value', 'type': '[RegistryUsage]'},
2742    }
2743
2744    def __init__(
2745        self,
2746        *,
2747        value: Optional[List["RegistryUsage"]] = None,
2748        **kwargs
2749    ):
2750        super(RegistryUsageListResult, self).__init__(**kwargs)
2751        self.value = value
2752
2753
2754class Replication(Resource):
2755    """An object that represents a replication for a container registry.
2756
2757    Variables are only populated by the server, and will be ignored when sending a request.
2758
2759    All required parameters must be populated in order to send to Azure.
2760
2761    :ivar id: The resource ID.
2762    :vartype id: str
2763    :ivar name: The name of the resource.
2764    :vartype name: str
2765    :ivar type: The type of the resource.
2766    :vartype type: str
2767    :param location: Required. The location of the resource. This cannot be changed after the
2768     resource is created.
2769    :type location: str
2770    :param tags: A set of tags. The tags of the resource.
2771    :type tags: dict[str, str]
2772    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2773    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
2774    :ivar provisioning_state: The provisioning state of the replication at the time the operation
2775     was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
2776     "Canceled".
2777    :vartype provisioning_state: str or
2778     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
2779    :ivar status: The status of the replication at the time the operation was called.
2780    :vartype status: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Status
2781    :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is
2782     enabled. Requests will not be routed to a replication whose regional endpoint is disabled,
2783     however its data will continue to be synced with other replications.
2784    :type region_endpoint_enabled: bool
2785    :param zone_redundancy: Whether or not zone redundancy is enabled for this container registry
2786     replication. Possible values include: "Enabled", "Disabled".
2787    :type zone_redundancy: str or
2788     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ZoneRedundancy
2789    """
2790
2791    _validation = {
2792        'id': {'readonly': True},
2793        'name': {'readonly': True},
2794        'type': {'readonly': True},
2795        'location': {'required': True},
2796        'system_data': {'readonly': True},
2797        'provisioning_state': {'readonly': True},
2798        'status': {'readonly': True},
2799    }
2800
2801    _attribute_map = {
2802        'id': {'key': 'id', 'type': 'str'},
2803        'name': {'key': 'name', 'type': 'str'},
2804        'type': {'key': 'type', 'type': 'str'},
2805        'location': {'key': 'location', 'type': 'str'},
2806        'tags': {'key': 'tags', 'type': '{str}'},
2807        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2808        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2809        'status': {'key': 'properties.status', 'type': 'Status'},
2810        'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'},
2811        'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'},
2812    }
2813
2814    def __init__(
2815        self,
2816        *,
2817        location: str,
2818        tags: Optional[Dict[str, str]] = None,
2819        region_endpoint_enabled: Optional[bool] = True,
2820        zone_redundancy: Optional[Union[str, "ZoneRedundancy"]] = None,
2821        **kwargs
2822    ):
2823        super(Replication, self).__init__(location=location, tags=tags, **kwargs)
2824        self.provisioning_state = None
2825        self.status = None
2826        self.region_endpoint_enabled = region_endpoint_enabled
2827        self.zone_redundancy = zone_redundancy
2828
2829
2830class ReplicationListResult(msrest.serialization.Model):
2831    """The result of a request to list replications for a container registry.
2832
2833    :param value: The list of replications. Since this list may be incomplete, the nextLink field
2834     should be used to request the next list of replications.
2835    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Replication]
2836    :param next_link: The URI that can be used to request the next list of replications.
2837    :type next_link: str
2838    """
2839
2840    _attribute_map = {
2841        'value': {'key': 'value', 'type': '[Replication]'},
2842        'next_link': {'key': 'nextLink', 'type': 'str'},
2843    }
2844
2845    def __init__(
2846        self,
2847        *,
2848        value: Optional[List["Replication"]] = None,
2849        next_link: Optional[str] = None,
2850        **kwargs
2851    ):
2852        super(ReplicationListResult, self).__init__(**kwargs)
2853        self.value = value
2854        self.next_link = next_link
2855
2856
2857class ReplicationUpdateParameters(msrest.serialization.Model):
2858    """The parameters for updating a replication.
2859
2860    :param tags: A set of tags. The tags for the replication.
2861    :type tags: dict[str, str]
2862    :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is
2863     enabled. Requests will not be routed to a replication whose regional endpoint is disabled,
2864     however its data will continue to be synced with other replications.
2865    :type region_endpoint_enabled: bool
2866    """
2867
2868    _attribute_map = {
2869        'tags': {'key': 'tags', 'type': '{str}'},
2870        'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'},
2871    }
2872
2873    def __init__(
2874        self,
2875        *,
2876        tags: Optional[Dict[str, str]] = None,
2877        region_endpoint_enabled: Optional[bool] = None,
2878        **kwargs
2879    ):
2880        super(ReplicationUpdateParameters, self).__init__(**kwargs)
2881        self.tags = tags
2882        self.region_endpoint_enabled = region_endpoint_enabled
2883
2884
2885class Request(msrest.serialization.Model):
2886    """The request that generated the event.
2887
2888    :param id: The ID of the request that initiated the event.
2889    :type id: str
2890    :param addr: The IP or hostname and possibly port of the client connection that initiated the
2891     event. This is the RemoteAddr from the standard http request.
2892    :type addr: str
2893    :param host: The externally accessible hostname of the registry instance, as specified by the
2894     http host header on incoming requests.
2895    :type host: str
2896    :param method: The request method that generated the event.
2897    :type method: str
2898    :param useragent: The user agent header of the request.
2899    :type useragent: str
2900    """
2901
2902    _attribute_map = {
2903        'id': {'key': 'id', 'type': 'str'},
2904        'addr': {'key': 'addr', 'type': 'str'},
2905        'host': {'key': 'host', 'type': 'str'},
2906        'method': {'key': 'method', 'type': 'str'},
2907        'useragent': {'key': 'useragent', 'type': 'str'},
2908    }
2909
2910    def __init__(
2911        self,
2912        *,
2913        id: Optional[str] = None,
2914        addr: Optional[str] = None,
2915        host: Optional[str] = None,
2916        method: Optional[str] = None,
2917        useragent: Optional[str] = None,
2918        **kwargs
2919    ):
2920        super(Request, self).__init__(**kwargs)
2921        self.id = id
2922        self.addr = addr
2923        self.host = host
2924        self.method = method
2925        self.useragent = useragent
2926
2927
2928class RetentionPolicy(msrest.serialization.Model):
2929    """The retention policy for a container registry.
2930
2931    Variables are only populated by the server, and will be ignored when sending a request.
2932
2933    :param days: The number of days to retain an untagged manifest after which it gets purged.
2934    :type days: int
2935    :ivar last_updated_time: The timestamp when the policy was last updated.
2936    :vartype last_updated_time: ~datetime.datetime
2937    :param status: The value that indicates whether the policy is enabled or not. Possible values
2938     include: "enabled", "disabled".
2939    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PolicyStatus
2940    """
2941
2942    _validation = {
2943        'last_updated_time': {'readonly': True},
2944    }
2945
2946    _attribute_map = {
2947        'days': {'key': 'days', 'type': 'int'},
2948        'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'},
2949        'status': {'key': 'status', 'type': 'str'},
2950    }
2951
2952    def __init__(
2953        self,
2954        *,
2955        days: Optional[int] = 7,
2956        status: Optional[Union[str, "PolicyStatus"]] = None,
2957        **kwargs
2958    ):
2959        super(RetentionPolicy, self).__init__(**kwargs)
2960        self.days = days
2961        self.last_updated_time = None
2962        self.status = status
2963
2964
2965class ScopeMap(ProxyResource):
2966    """An object that represents a scope map for a container registry.
2967
2968    Variables are only populated by the server, and will be ignored when sending a request.
2969
2970    :ivar id: The resource ID.
2971    :vartype id: str
2972    :ivar name: The name of the resource.
2973    :vartype name: str
2974    :ivar type: The type of the resource.
2975    :vartype type: str
2976    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2977    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
2978    :param description: The user friendly description of the scope map.
2979    :type description: str
2980    :ivar type_properties_type: The type of the scope map. E.g. BuildIn scope map.
2981    :vartype type_properties_type: str
2982    :ivar creation_date: The creation date of scope map.
2983    :vartype creation_date: ~datetime.datetime
2984    :ivar provisioning_state: Provisioning state of the resource. Possible values include:
2985     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
2986    :vartype provisioning_state: str or
2987     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
2988    :param actions: The list of scoped permissions for registry artifacts.
2989     E.g. repositories/repository-name/content/read,
2990     repositories/repository-name/metadata/write.
2991    :type actions: list[str]
2992    """
2993
2994    _validation = {
2995        'id': {'readonly': True},
2996        'name': {'readonly': True},
2997        'type': {'readonly': True},
2998        'system_data': {'readonly': True},
2999        'type_properties_type': {'readonly': True},
3000        'creation_date': {'readonly': True},
3001        'provisioning_state': {'readonly': True},
3002    }
3003
3004    _attribute_map = {
3005        'id': {'key': 'id', 'type': 'str'},
3006        'name': {'key': 'name', 'type': 'str'},
3007        'type': {'key': 'type', 'type': 'str'},
3008        'system_data': {'key': 'systemData', 'type': 'SystemData'},
3009        'description': {'key': 'properties.description', 'type': 'str'},
3010        'type_properties_type': {'key': 'properties.type', 'type': 'str'},
3011        'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
3012        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
3013        'actions': {'key': 'properties.actions', 'type': '[str]'},
3014    }
3015
3016    def __init__(
3017        self,
3018        *,
3019        description: Optional[str] = None,
3020        actions: Optional[List[str]] = None,
3021        **kwargs
3022    ):
3023        super(ScopeMap, self).__init__(**kwargs)
3024        self.description = description
3025        self.type_properties_type = None
3026        self.creation_date = None
3027        self.provisioning_state = None
3028        self.actions = actions
3029
3030
3031class ScopeMapListResult(msrest.serialization.Model):
3032    """The result of a request to list scope maps for a container registry.
3033
3034    :param value: The list of scope maps. Since this list may be incomplete, the nextLink field
3035     should be used to request the next list of scope maps.
3036    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.ScopeMap]
3037    :param next_link: The URI that can be used to request the next list of scope maps.
3038    :type next_link: str
3039    """
3040
3041    _attribute_map = {
3042        'value': {'key': 'value', 'type': '[ScopeMap]'},
3043        'next_link': {'key': 'nextLink', 'type': 'str'},
3044    }
3045
3046    def __init__(
3047        self,
3048        *,
3049        value: Optional[List["ScopeMap"]] = None,
3050        next_link: Optional[str] = None,
3051        **kwargs
3052    ):
3053        super(ScopeMapListResult, self).__init__(**kwargs)
3054        self.value = value
3055        self.next_link = next_link
3056
3057
3058class ScopeMapUpdateParameters(msrest.serialization.Model):
3059    """The properties for updating the scope map.
3060
3061    :param description: The user friendly description of the scope map.
3062    :type description: str
3063    :param actions: The list of scope permissions for registry artifacts.
3064     E.g. repositories/repository-name/pull,
3065     repositories/repository-name/delete.
3066    :type actions: list[str]
3067    """
3068
3069    _attribute_map = {
3070        'description': {'key': 'properties.description', 'type': 'str'},
3071        'actions': {'key': 'properties.actions', 'type': '[str]'},
3072    }
3073
3074    def __init__(
3075        self,
3076        *,
3077        description: Optional[str] = None,
3078        actions: Optional[List[str]] = None,
3079        **kwargs
3080    ):
3081        super(ScopeMapUpdateParameters, self).__init__(**kwargs)
3082        self.description = description
3083        self.actions = actions
3084
3085
3086class Sku(msrest.serialization.Model):
3087    """The SKU of a container registry.
3088
3089    Variables are only populated by the server, and will be ignored when sending a request.
3090
3091    All required parameters must be populated in order to send to Azure.
3092
3093    :param name: Required. The SKU name of the container registry. Required for registry creation.
3094     Possible values include: "Classic", "Basic", "Standard", "Premium".
3095    :type name: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SkuName
3096    :ivar tier: The SKU tier based on the SKU name. Possible values include: "Classic", "Basic",
3097     "Standard", "Premium".
3098    :vartype tier: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SkuTier
3099    """
3100
3101    _validation = {
3102        'name': {'required': True},
3103        'tier': {'readonly': True},
3104    }
3105
3106    _attribute_map = {
3107        'name': {'key': 'name', 'type': 'str'},
3108        'tier': {'key': 'tier', 'type': 'str'},
3109    }
3110
3111    def __init__(
3112        self,
3113        *,
3114        name: Union[str, "SkuName"],
3115        **kwargs
3116    ):
3117        super(Sku, self).__init__(**kwargs)
3118        self.name = name
3119        self.tier = None
3120
3121
3122class Source(msrest.serialization.Model):
3123    """The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
3124
3125    :param addr: The IP or hostname and the port of the registry node that generated the event.
3126     Generally, this will be resolved by os.Hostname() along with the running port.
3127    :type addr: str
3128    :param instance_id: The running instance of an application. Changes after each restart.
3129    :type instance_id: str
3130    """
3131
3132    _attribute_map = {
3133        'addr': {'key': 'addr', 'type': 'str'},
3134        'instance_id': {'key': 'instanceID', 'type': 'str'},
3135    }
3136
3137    def __init__(
3138        self,
3139        *,
3140        addr: Optional[str] = None,
3141        instance_id: Optional[str] = None,
3142        **kwargs
3143    ):
3144        super(Source, self).__init__(**kwargs)
3145        self.addr = addr
3146        self.instance_id = instance_id
3147
3148
3149class Status(msrest.serialization.Model):
3150    """The status of an Azure resource at the time the operation was called.
3151
3152    Variables are only populated by the server, and will be ignored when sending a request.
3153
3154    :ivar display_status: The short label for the status.
3155    :vartype display_status: str
3156    :ivar message: The detailed message for the status, including alerts and error messages.
3157    :vartype message: str
3158    :ivar timestamp: The timestamp when the status was changed to the current value.
3159    :vartype timestamp: ~datetime.datetime
3160    """
3161
3162    _validation = {
3163        'display_status': {'readonly': True},
3164        'message': {'readonly': True},
3165        'timestamp': {'readonly': True},
3166    }
3167
3168    _attribute_map = {
3169        'display_status': {'key': 'displayStatus', 'type': 'str'},
3170        'message': {'key': 'message', 'type': 'str'},
3171        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
3172    }
3173
3174    def __init__(
3175        self,
3176        **kwargs
3177    ):
3178        super(Status, self).__init__(**kwargs)
3179        self.display_status = None
3180        self.message = None
3181        self.timestamp = None
3182
3183
3184class StatusDetailProperties(msrest.serialization.Model):
3185    """The status detail properties of the connected registry.
3186
3187    Variables are only populated by the server, and will be ignored when sending a request.
3188
3189    :ivar type: The component of the connected registry corresponding to the status.
3190    :vartype type: str
3191    :ivar code: The code of the status.
3192    :vartype code: str
3193    :ivar description: The description of the status.
3194    :vartype description: str
3195    :ivar timestamp: The timestamp of the status.
3196    :vartype timestamp: ~datetime.datetime
3197    :ivar correlation_id: The correlation ID of the status.
3198    :vartype correlation_id: str
3199    """
3200
3201    _validation = {
3202        'type': {'readonly': True},
3203        'code': {'readonly': True},
3204        'description': {'readonly': True},
3205        'timestamp': {'readonly': True},
3206        'correlation_id': {'readonly': True},
3207    }
3208
3209    _attribute_map = {
3210        'type': {'key': 'type', 'type': 'str'},
3211        'code': {'key': 'code', 'type': 'str'},
3212        'description': {'key': 'description', 'type': 'str'},
3213        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
3214        'correlation_id': {'key': 'correlationId', 'type': 'str'},
3215    }
3216
3217    def __init__(
3218        self,
3219        **kwargs
3220    ):
3221        super(StatusDetailProperties, self).__init__(**kwargs)
3222        self.type = None
3223        self.code = None
3224        self.description = None
3225        self.timestamp = None
3226        self.correlation_id = None
3227
3228
3229class SyncProperties(msrest.serialization.Model):
3230    """The sync properties of the connected registry with its parent.
3231
3232    Variables are only populated by the server, and will be ignored when sending a request.
3233
3234    All required parameters must be populated in order to send to Azure.
3235
3236    :param token_id: Required. The resource ID of the ACR token used to authenticate the connected
3237     registry to its parent during sync.
3238    :type token_id: str
3239    :param schedule: The cron expression indicating the schedule that the connected registry will
3240     sync with its parent.
3241    :type schedule: str
3242    :param sync_window: The time window during which sync is enabled for each schedule occurrence.
3243     Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
3244    :type sync_window: ~datetime.timedelta
3245    :param message_ttl: Required. The period of time for which a message is available to sync
3246     before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per
3247     ISO8601.
3248    :type message_ttl: ~datetime.timedelta
3249    :ivar last_sync_time: The last time a sync occurred between the connected registry and its
3250     parent.
3251    :vartype last_sync_time: ~datetime.datetime
3252    :ivar gateway_endpoint: The gateway endpoint used by the connected registry to communicate with
3253     its parent.
3254    :vartype gateway_endpoint: str
3255    """
3256
3257    _validation = {
3258        'token_id': {'required': True},
3259        'message_ttl': {'required': True},
3260        'last_sync_time': {'readonly': True},
3261        'gateway_endpoint': {'readonly': True},
3262    }
3263
3264    _attribute_map = {
3265        'token_id': {'key': 'tokenId', 'type': 'str'},
3266        'schedule': {'key': 'schedule', 'type': 'str'},
3267        'sync_window': {'key': 'syncWindow', 'type': 'duration'},
3268        'message_ttl': {'key': 'messageTtl', 'type': 'duration'},
3269        'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'},
3270        'gateway_endpoint': {'key': 'gatewayEndpoint', 'type': 'str'},
3271    }
3272
3273    def __init__(
3274        self,
3275        *,
3276        token_id: str,
3277        message_ttl: datetime.timedelta,
3278        schedule: Optional[str] = None,
3279        sync_window: Optional[datetime.timedelta] = None,
3280        **kwargs
3281    ):
3282        super(SyncProperties, self).__init__(**kwargs)
3283        self.token_id = token_id
3284        self.schedule = schedule
3285        self.sync_window = sync_window
3286        self.message_ttl = message_ttl
3287        self.last_sync_time = None
3288        self.gateway_endpoint = None
3289
3290
3291class SyncUpdateProperties(msrest.serialization.Model):
3292    """The parameters for updating the sync properties of the connected registry with its parent.
3293
3294    :param schedule: The cron expression indicating the schedule that the connected registry will
3295     sync with its parent.
3296    :type schedule: str
3297    :param sync_window: The time window during which sync is enabled for each schedule occurrence.
3298     Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
3299    :type sync_window: ~datetime.timedelta
3300    :param message_ttl: The period of time for which a message is available to sync before it is
3301     expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
3302    :type message_ttl: ~datetime.timedelta
3303    """
3304
3305    _attribute_map = {
3306        'schedule': {'key': 'schedule', 'type': 'str'},
3307        'sync_window': {'key': 'syncWindow', 'type': 'duration'},
3308        'message_ttl': {'key': 'messageTtl', 'type': 'duration'},
3309    }
3310
3311    def __init__(
3312        self,
3313        *,
3314        schedule: Optional[str] = None,
3315        sync_window: Optional[datetime.timedelta] = None,
3316        message_ttl: Optional[datetime.timedelta] = None,
3317        **kwargs
3318    ):
3319        super(SyncUpdateProperties, self).__init__(**kwargs)
3320        self.schedule = schedule
3321        self.sync_window = sync_window
3322        self.message_ttl = message_ttl
3323
3324
3325class SystemData(msrest.serialization.Model):
3326    """Metadata pertaining to creation and last modification of the resource.
3327
3328    :param created_by: The identity that created the resource.
3329    :type created_by: str
3330    :param created_by_type: The type of identity that created the resource. Possible values
3331     include: "User", "Application", "ManagedIdentity", "Key".
3332    :type created_by_type: str or
3333     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.CreatedByType
3334    :param created_at: The timestamp of resource creation (UTC).
3335    :type created_at: ~datetime.datetime
3336    :param last_modified_by: The identity that last modified the resource.
3337    :type last_modified_by: str
3338    :param last_modified_by_type: The type of identity that last modified the resource. Possible
3339     values include: "User", "Application", "ManagedIdentity", "Key".
3340    :type last_modified_by_type: str or
3341     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.LastModifiedByType
3342    :param last_modified_at: The timestamp of resource modification (UTC).
3343    :type last_modified_at: ~datetime.datetime
3344    """
3345
3346    _attribute_map = {
3347        'created_by': {'key': 'createdBy', 'type': 'str'},
3348        'created_by_type': {'key': 'createdByType', 'type': 'str'},
3349        'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
3350        'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
3351        'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
3352        'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
3353    }
3354
3355    def __init__(
3356        self,
3357        *,
3358        created_by: Optional[str] = None,
3359        created_by_type: Optional[Union[str, "CreatedByType"]] = None,
3360        created_at: Optional[datetime.datetime] = None,
3361        last_modified_by: Optional[str] = None,
3362        last_modified_by_type: Optional[Union[str, "LastModifiedByType"]] = None,
3363        last_modified_at: Optional[datetime.datetime] = None,
3364        **kwargs
3365    ):
3366        super(SystemData, self).__init__(**kwargs)
3367        self.created_by = created_by
3368        self.created_by_type = created_by_type
3369        self.created_at = created_at
3370        self.last_modified_by = last_modified_by
3371        self.last_modified_by_type = last_modified_by_type
3372        self.last_modified_at = last_modified_at
3373
3374
3375class Target(msrest.serialization.Model):
3376    """The target of the event.
3377
3378    :param media_type: The MIME type of the referenced object.
3379    :type media_type: str
3380    :param size: The number of bytes of the content. Same as Length field.
3381    :type size: long
3382    :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification.
3383    :type digest: str
3384    :param length: The number of bytes of the content. Same as Size field.
3385    :type length: long
3386    :param repository: The repository name.
3387    :type repository: str
3388    :param url: The direct URL to the content.
3389    :type url: str
3390    :param tag: The tag name.
3391    :type tag: str
3392    :param name: The name of the artifact.
3393    :type name: str
3394    :param version: The version of the artifact.
3395    :type version: str
3396    """
3397
3398    _attribute_map = {
3399        'media_type': {'key': 'mediaType', 'type': 'str'},
3400        'size': {'key': 'size', 'type': 'long'},
3401        'digest': {'key': 'digest', 'type': 'str'},
3402        'length': {'key': 'length', 'type': 'long'},
3403        'repository': {'key': 'repository', 'type': 'str'},
3404        'url': {'key': 'url', 'type': 'str'},
3405        'tag': {'key': 'tag', 'type': 'str'},
3406        'name': {'key': 'name', 'type': 'str'},
3407        'version': {'key': 'version', 'type': 'str'},
3408    }
3409
3410    def __init__(
3411        self,
3412        *,
3413        media_type: Optional[str] = None,
3414        size: Optional[int] = None,
3415        digest: Optional[str] = None,
3416        length: Optional[int] = None,
3417        repository: Optional[str] = None,
3418        url: Optional[str] = None,
3419        tag: Optional[str] = None,
3420        name: Optional[str] = None,
3421        version: Optional[str] = None,
3422        **kwargs
3423    ):
3424        super(Target, self).__init__(**kwargs)
3425        self.media_type = media_type
3426        self.size = size
3427        self.digest = digest
3428        self.length = length
3429        self.repository = repository
3430        self.url = url
3431        self.tag = tag
3432        self.name = name
3433        self.version = version
3434
3435
3436class TlsCertificateProperties(msrest.serialization.Model):
3437    """The TLS certificate properties of the connected registry login server.
3438
3439    Variables are only populated by the server, and will be ignored when sending a request.
3440
3441    :ivar type: The type of certificate location. Possible values include: "LocalDirectory".
3442    :vartype type: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.CertificateType
3443    :ivar location: Indicates the location of the certificates.
3444    :vartype location: str
3445    """
3446
3447    _validation = {
3448        'type': {'readonly': True},
3449        'location': {'readonly': True},
3450    }
3451
3452    _attribute_map = {
3453        'type': {'key': 'type', 'type': 'str'},
3454        'location': {'key': 'location', 'type': 'str'},
3455    }
3456
3457    def __init__(
3458        self,
3459        **kwargs
3460    ):
3461        super(TlsCertificateProperties, self).__init__(**kwargs)
3462        self.type = None
3463        self.location = None
3464
3465
3466class TlsProperties(msrest.serialization.Model):
3467    """The TLS properties of the connected registry login server.
3468
3469    Variables are only populated by the server, and will be ignored when sending a request.
3470
3471    :ivar status: Indicates whether HTTPS is enabled for the login server. Possible values include:
3472     "Enabled", "Disabled".
3473    :vartype status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TlsStatus
3474    :ivar certificate: The certificate used to configure HTTPS for the login server.
3475    :vartype certificate:
3476     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TlsCertificateProperties
3477    """
3478
3479    _validation = {
3480        'status': {'readonly': True},
3481        'certificate': {'readonly': True},
3482    }
3483
3484    _attribute_map = {
3485        'status': {'key': 'status', 'type': 'str'},
3486        'certificate': {'key': 'certificate', 'type': 'TlsCertificateProperties'},
3487    }
3488
3489    def __init__(
3490        self,
3491        **kwargs
3492    ):
3493        super(TlsProperties, self).__init__(**kwargs)
3494        self.status = None
3495        self.certificate = None
3496
3497
3498class Token(ProxyResource):
3499    """An object that represents a token for a container registry.
3500
3501    Variables are only populated by the server, and will be ignored when sending a request.
3502
3503    :ivar id: The resource ID.
3504    :vartype id: str
3505    :ivar name: The name of the resource.
3506    :vartype name: str
3507    :ivar type: The type of the resource.
3508    :vartype type: str
3509    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
3510    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
3511    :ivar creation_date: The creation date of scope map.
3512    :vartype creation_date: ~datetime.datetime
3513    :ivar provisioning_state: Provisioning state of the resource. Possible values include:
3514     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
3515    :vartype provisioning_state: str or
3516     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
3517    :param scope_map_id: The resource ID of the scope map to which the token will be associated
3518     with.
3519    :type scope_map_id: str
3520    :param credentials: The credentials that can be used for authenticating the token.
3521    :type credentials:
3522     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenCredentialsProperties
3523    :param status: The status of the token example enabled or disabled. Possible values include:
3524     "enabled", "disabled".
3525    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenStatus
3526    """
3527
3528    _validation = {
3529        'id': {'readonly': True},
3530        'name': {'readonly': True},
3531        'type': {'readonly': True},
3532        'system_data': {'readonly': True},
3533        'creation_date': {'readonly': True},
3534        'provisioning_state': {'readonly': True},
3535    }
3536
3537    _attribute_map = {
3538        'id': {'key': 'id', 'type': 'str'},
3539        'name': {'key': 'name', 'type': 'str'},
3540        'type': {'key': 'type', 'type': 'str'},
3541        'system_data': {'key': 'systemData', 'type': 'SystemData'},
3542        'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
3543        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
3544        'scope_map_id': {'key': 'properties.scopeMapId', 'type': 'str'},
3545        'credentials': {'key': 'properties.credentials', 'type': 'TokenCredentialsProperties'},
3546        'status': {'key': 'properties.status', 'type': 'str'},
3547    }
3548
3549    def __init__(
3550        self,
3551        *,
3552        scope_map_id: Optional[str] = None,
3553        credentials: Optional["TokenCredentialsProperties"] = None,
3554        status: Optional[Union[str, "TokenStatus"]] = None,
3555        **kwargs
3556    ):
3557        super(Token, self).__init__(**kwargs)
3558        self.creation_date = None
3559        self.provisioning_state = None
3560        self.scope_map_id = scope_map_id
3561        self.credentials = credentials
3562        self.status = status
3563
3564
3565class TokenCertificate(msrest.serialization.Model):
3566    """The properties of a certificate used for authenticating a token.
3567
3568    :param name:  Possible values include: "certificate1", "certificate2".
3569    :type name: str or
3570     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenCertificateName
3571    :param expiry: The expiry datetime of the certificate.
3572    :type expiry: ~datetime.datetime
3573    :param thumbprint: The thumbprint of the certificate.
3574    :type thumbprint: str
3575    :param encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM format
3576     that will be used for authenticating the token.
3577    :type encoded_pem_certificate: str
3578    """
3579
3580    _attribute_map = {
3581        'name': {'key': 'name', 'type': 'str'},
3582        'expiry': {'key': 'expiry', 'type': 'iso-8601'},
3583        'thumbprint': {'key': 'thumbprint', 'type': 'str'},
3584        'encoded_pem_certificate': {'key': 'encodedPemCertificate', 'type': 'str'},
3585    }
3586
3587    def __init__(
3588        self,
3589        *,
3590        name: Optional[Union[str, "TokenCertificateName"]] = None,
3591        expiry: Optional[datetime.datetime] = None,
3592        thumbprint: Optional[str] = None,
3593        encoded_pem_certificate: Optional[str] = None,
3594        **kwargs
3595    ):
3596        super(TokenCertificate, self).__init__(**kwargs)
3597        self.name = name
3598        self.expiry = expiry
3599        self.thumbprint = thumbprint
3600        self.encoded_pem_certificate = encoded_pem_certificate
3601
3602
3603class TokenCredentialsProperties(msrest.serialization.Model):
3604    """The properties of the credentials that can be used for authenticating the token.
3605
3606    :param certificates:
3607    :type certificates:
3608     list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenCertificate]
3609    :param passwords:
3610    :type passwords: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenPassword]
3611    """
3612
3613    _attribute_map = {
3614        'certificates': {'key': 'certificates', 'type': '[TokenCertificate]'},
3615        'passwords': {'key': 'passwords', 'type': '[TokenPassword]'},
3616    }
3617
3618    def __init__(
3619        self,
3620        *,
3621        certificates: Optional[List["TokenCertificate"]] = None,
3622        passwords: Optional[List["TokenPassword"]] = None,
3623        **kwargs
3624    ):
3625        super(TokenCredentialsProperties, self).__init__(**kwargs)
3626        self.certificates = certificates
3627        self.passwords = passwords
3628
3629
3630class TokenListResult(msrest.serialization.Model):
3631    """The result of a request to list tokens for a container registry.
3632
3633    :param value: The list of tokens. Since this list may be incomplete, the nextLink field should
3634     be used to request the next list of tokens.
3635    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Token]
3636    :param next_link: The URI that can be used to request the next list of tokens.
3637    :type next_link: str
3638    """
3639
3640    _attribute_map = {
3641        'value': {'key': 'value', 'type': '[Token]'},
3642        'next_link': {'key': 'nextLink', 'type': 'str'},
3643    }
3644
3645    def __init__(
3646        self,
3647        *,
3648        value: Optional[List["Token"]] = None,
3649        next_link: Optional[str] = None,
3650        **kwargs
3651    ):
3652        super(TokenListResult, self).__init__(**kwargs)
3653        self.value = value
3654        self.next_link = next_link
3655
3656
3657class TokenPassword(msrest.serialization.Model):
3658    """The password that will be used for authenticating the token of a container registry.
3659
3660    Variables are only populated by the server, and will be ignored when sending a request.
3661
3662    :param creation_time: The creation datetime of the password.
3663    :type creation_time: ~datetime.datetime
3664    :param expiry: The expiry datetime of the password.
3665    :type expiry: ~datetime.datetime
3666    :param name: The password name "password1" or "password2". Possible values include:
3667     "password1", "password2".
3668    :type name: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenPasswordName
3669    :ivar value: The password value.
3670    :vartype value: str
3671    """
3672
3673    _validation = {
3674        'value': {'readonly': True},
3675    }
3676
3677    _attribute_map = {
3678        'creation_time': {'key': 'creationTime', 'type': 'iso-8601'},
3679        'expiry': {'key': 'expiry', 'type': 'iso-8601'},
3680        'name': {'key': 'name', 'type': 'str'},
3681        'value': {'key': 'value', 'type': 'str'},
3682    }
3683
3684    def __init__(
3685        self,
3686        *,
3687        creation_time: Optional[datetime.datetime] = None,
3688        expiry: Optional[datetime.datetime] = None,
3689        name: Optional[Union[str, "TokenPasswordName"]] = None,
3690        **kwargs
3691    ):
3692        super(TokenPassword, self).__init__(**kwargs)
3693        self.creation_time = creation_time
3694        self.expiry = expiry
3695        self.name = name
3696        self.value = None
3697
3698
3699class TokenUpdateParameters(msrest.serialization.Model):
3700    """The parameters for updating a token.
3701
3702    :param scope_map_id: The resource ID of the scope map to which the token will be associated
3703     with.
3704    :type scope_map_id: str
3705    :param status: The status of the token example enabled or disabled. Possible values include:
3706     "enabled", "disabled".
3707    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenStatus
3708    :param credentials: The credentials that can be used for authenticating the token.
3709    :type credentials:
3710     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TokenCredentialsProperties
3711    """
3712
3713    _attribute_map = {
3714        'scope_map_id': {'key': 'properties.scopeMapId', 'type': 'str'},
3715        'status': {'key': 'properties.status', 'type': 'str'},
3716        'credentials': {'key': 'properties.credentials', 'type': 'TokenCredentialsProperties'},
3717    }
3718
3719    def __init__(
3720        self,
3721        *,
3722        scope_map_id: Optional[str] = None,
3723        status: Optional[Union[str, "TokenStatus"]] = None,
3724        credentials: Optional["TokenCredentialsProperties"] = None,
3725        **kwargs
3726    ):
3727        super(TokenUpdateParameters, self).__init__(**kwargs)
3728        self.scope_map_id = scope_map_id
3729        self.status = status
3730        self.credentials = credentials
3731
3732
3733class TrustPolicy(msrest.serialization.Model):
3734    """The content trust policy for a container registry.
3735
3736    :param type: The type of trust policy. Possible values include: "Notary". Default value:
3737     "Notary".
3738    :type type: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.TrustPolicyType
3739    :param status: The value that indicates whether the policy is enabled or not. Possible values
3740     include: "enabled", "disabled".
3741    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.PolicyStatus
3742    """
3743
3744    _attribute_map = {
3745        'type': {'key': 'type', 'type': 'str'},
3746        'status': {'key': 'status', 'type': 'str'},
3747    }
3748
3749    def __init__(
3750        self,
3751        *,
3752        type: Optional[Union[str, "TrustPolicyType"]] = "Notary",
3753        status: Optional[Union[str, "PolicyStatus"]] = None,
3754        **kwargs
3755    ):
3756        super(TrustPolicy, self).__init__(**kwargs)
3757        self.type = type
3758        self.status = status
3759
3760
3761class UserIdentityProperties(msrest.serialization.Model):
3762    """UserIdentityProperties.
3763
3764    :param principal_id: The principal id of user assigned identity.
3765    :type principal_id: str
3766    :param client_id: The client id of user assigned identity.
3767    :type client_id: str
3768    """
3769
3770    _attribute_map = {
3771        'principal_id': {'key': 'principalId', 'type': 'str'},
3772        'client_id': {'key': 'clientId', 'type': 'str'},
3773    }
3774
3775    def __init__(
3776        self,
3777        *,
3778        principal_id: Optional[str] = None,
3779        client_id: Optional[str] = None,
3780        **kwargs
3781    ):
3782        super(UserIdentityProperties, self).__init__(**kwargs)
3783        self.principal_id = principal_id
3784        self.client_id = client_id
3785
3786
3787class VirtualNetworkRule(msrest.serialization.Model):
3788    """Virtual network rule.
3789
3790    All required parameters must be populated in order to send to Azure.
3791
3792    :param action: The action of virtual network rule. Possible values include: "Allow".
3793    :type action: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Action
3794    :param virtual_network_resource_id: Required. Resource ID of a subnet, for example:
3795     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
3796    :type virtual_network_resource_id: str
3797    """
3798
3799    _validation = {
3800        'virtual_network_resource_id': {'required': True},
3801    }
3802
3803    _attribute_map = {
3804        'action': {'key': 'action', 'type': 'str'},
3805        'virtual_network_resource_id': {'key': 'id', 'type': 'str'},
3806    }
3807
3808    def __init__(
3809        self,
3810        *,
3811        virtual_network_resource_id: str,
3812        action: Optional[Union[str, "Action"]] = None,
3813        **kwargs
3814    ):
3815        super(VirtualNetworkRule, self).__init__(**kwargs)
3816        self.action = action
3817        self.virtual_network_resource_id = virtual_network_resource_id
3818
3819
3820class Webhook(Resource):
3821    """An object that represents a webhook for a container registry.
3822
3823    Variables are only populated by the server, and will be ignored when sending a request.
3824
3825    All required parameters must be populated in order to send to Azure.
3826
3827    :ivar id: The resource ID.
3828    :vartype id: str
3829    :ivar name: The name of the resource.
3830    :vartype name: str
3831    :ivar type: The type of the resource.
3832    :vartype type: str
3833    :param location: Required. The location of the resource. This cannot be changed after the
3834     resource is created.
3835    :type location: str
3836    :param tags: A set of tags. The tags of the resource.
3837    :type tags: dict[str, str]
3838    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
3839    :vartype system_data: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.SystemData
3840    :param status: The status of the webhook at the time the operation was called. Possible values
3841     include: "enabled", "disabled".
3842    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.WebhookStatus
3843    :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*'
3844     means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only.
3845     'foo' is equivalent to 'foo:latest'. Empty means all events.
3846    :type scope: str
3847    :param actions: The list of actions that trigger the webhook to post notifications.
3848    :type actions: list[str or
3849     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.WebhookAction]
3850    :ivar provisioning_state: The provisioning state of the webhook at the time the operation was
3851     called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
3852     "Canceled".
3853    :vartype provisioning_state: str or
3854     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ProvisioningState
3855    """
3856
3857    _validation = {
3858        'id': {'readonly': True},
3859        'name': {'readonly': True},
3860        'type': {'readonly': True},
3861        'location': {'required': True},
3862        'system_data': {'readonly': True},
3863        'provisioning_state': {'readonly': True},
3864    }
3865
3866    _attribute_map = {
3867        'id': {'key': 'id', 'type': 'str'},
3868        'name': {'key': 'name', 'type': 'str'},
3869        'type': {'key': 'type', 'type': 'str'},
3870        'location': {'key': 'location', 'type': 'str'},
3871        'tags': {'key': 'tags', 'type': '{str}'},
3872        'system_data': {'key': 'systemData', 'type': 'SystemData'},
3873        'status': {'key': 'properties.status', 'type': 'str'},
3874        'scope': {'key': 'properties.scope', 'type': 'str'},
3875        'actions': {'key': 'properties.actions', 'type': '[str]'},
3876        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
3877    }
3878
3879    def __init__(
3880        self,
3881        *,
3882        location: str,
3883        tags: Optional[Dict[str, str]] = None,
3884        status: Optional[Union[str, "WebhookStatus"]] = None,
3885        scope: Optional[str] = None,
3886        actions: Optional[List[Union[str, "WebhookAction"]]] = None,
3887        **kwargs
3888    ):
3889        super(Webhook, self).__init__(location=location, tags=tags, **kwargs)
3890        self.status = status
3891        self.scope = scope
3892        self.actions = actions
3893        self.provisioning_state = None
3894
3895
3896class WebhookCreateParameters(msrest.serialization.Model):
3897    """The parameters for creating a webhook.
3898
3899    All required parameters must be populated in order to send to Azure.
3900
3901    :param tags: A set of tags. The tags for the webhook.
3902    :type tags: dict[str, str]
3903    :param location: Required. The location of the webhook. This cannot be changed after the
3904     resource is created.
3905    :type location: str
3906    :param service_uri: The service URI for the webhook to post notifications.
3907    :type service_uri: str
3908    :param custom_headers: Custom headers that will be added to the webhook notifications.
3909    :type custom_headers: dict[str, str]
3910    :param status: The status of the webhook at the time the operation was called. Possible values
3911     include: "enabled", "disabled".
3912    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.WebhookStatus
3913    :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*'
3914     means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only.
3915     'foo' is equivalent to 'foo:latest'. Empty means all events.
3916    :type scope: str
3917    :param actions: The list of actions that trigger the webhook to post notifications.
3918    :type actions: list[str or
3919     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.WebhookAction]
3920    """
3921
3922    _validation = {
3923        'location': {'required': True},
3924    }
3925
3926    _attribute_map = {
3927        'tags': {'key': 'tags', 'type': '{str}'},
3928        'location': {'key': 'location', 'type': 'str'},
3929        'service_uri': {'key': 'properties.serviceUri', 'type': 'str'},
3930        'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'},
3931        'status': {'key': 'properties.status', 'type': 'str'},
3932        'scope': {'key': 'properties.scope', 'type': 'str'},
3933        'actions': {'key': 'properties.actions', 'type': '[str]'},
3934    }
3935
3936    def __init__(
3937        self,
3938        *,
3939        location: str,
3940        tags: Optional[Dict[str, str]] = None,
3941        service_uri: Optional[str] = None,
3942        custom_headers: Optional[Dict[str, str]] = None,
3943        status: Optional[Union[str, "WebhookStatus"]] = None,
3944        scope: Optional[str] = None,
3945        actions: Optional[List[Union[str, "WebhookAction"]]] = None,
3946        **kwargs
3947    ):
3948        super(WebhookCreateParameters, self).__init__(**kwargs)
3949        self.tags = tags
3950        self.location = location
3951        self.service_uri = service_uri
3952        self.custom_headers = custom_headers
3953        self.status = status
3954        self.scope = scope
3955        self.actions = actions
3956
3957
3958class WebhookListResult(msrest.serialization.Model):
3959    """The result of a request to list webhooks for a container registry.
3960
3961    :param value: The list of webhooks. Since this list may be incomplete, the nextLink field
3962     should be used to request the next list of webhooks.
3963    :type value: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.Webhook]
3964    :param next_link: The URI that can be used to request the next list of webhooks.
3965    :type next_link: str
3966    """
3967
3968    _attribute_map = {
3969        'value': {'key': 'value', 'type': '[Webhook]'},
3970        'next_link': {'key': 'nextLink', 'type': 'str'},
3971    }
3972
3973    def __init__(
3974        self,
3975        *,
3976        value: Optional[List["Webhook"]] = None,
3977        next_link: Optional[str] = None,
3978        **kwargs
3979    ):
3980        super(WebhookListResult, self).__init__(**kwargs)
3981        self.value = value
3982        self.next_link = next_link
3983
3984
3985class WebhookUpdateParameters(msrest.serialization.Model):
3986    """The parameters for updating a webhook.
3987
3988    :param tags: A set of tags. The tags for the webhook.
3989    :type tags: dict[str, str]
3990    :param service_uri: The service URI for the webhook to post notifications.
3991    :type service_uri: str
3992    :param custom_headers: Custom headers that will be added to the webhook notifications.
3993    :type custom_headers: dict[str, str]
3994    :param status: The status of the webhook at the time the operation was called. Possible values
3995     include: "enabled", "disabled".
3996    :type status: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.WebhookStatus
3997    :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*'
3998     means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only.
3999     'foo' is equivalent to 'foo:latest'. Empty means all events.
4000    :type scope: str
4001    :param actions: The list of actions that trigger the webhook to post notifications.
4002    :type actions: list[str or
4003     ~azure.mgmt.containerregistry.v2020_11_01_preview.models.WebhookAction]
4004    """
4005
4006    _attribute_map = {
4007        'tags': {'key': 'tags', 'type': '{str}'},
4008        'service_uri': {'key': 'properties.serviceUri', 'type': 'str'},
4009        'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'},
4010        'status': {'key': 'properties.status', 'type': 'str'},
4011        'scope': {'key': 'properties.scope', 'type': 'str'},
4012        'actions': {'key': 'properties.actions', 'type': '[str]'},
4013    }
4014
4015    def __init__(
4016        self,
4017        *,
4018        tags: Optional[Dict[str, str]] = None,
4019        service_uri: Optional[str] = None,
4020        custom_headers: Optional[Dict[str, str]] = None,
4021        status: Optional[Union[str, "WebhookStatus"]] = None,
4022        scope: Optional[str] = None,
4023        actions: Optional[List[Union[str, "WebhookAction"]]] = None,
4024        **kwargs
4025    ):
4026        super(WebhookUpdateParameters, self).__init__(**kwargs)
4027        self.tags = tags
4028        self.service_uri = service_uri
4029        self.custom_headers = custom_headers
4030        self.status = status
4031        self.scope = scope
4032        self.actions = actions
4033