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
12import msrest.serialization
13
14from ._container_registry_management_client_enums import *
15
16
17class Actor(msrest.serialization.Model):
18    """The agent that initiated the event. For most situations, this could be from the authorization context of the request.
19
20    :param name: The subject or username associated with the request context that generated the
21     event.
22    :type name: str
23    """
24
25    _attribute_map = {
26        'name': {'key': 'name', 'type': 'str'},
27    }
28
29    def __init__(
30        self,
31        *,
32        name: Optional[str] = None,
33        **kwargs
34    ):
35        super(Actor, self).__init__(**kwargs)
36        self.name = name
37
38
39class CallbackConfig(msrest.serialization.Model):
40    """The configuration of service URI and custom headers for the webhook.
41
42    All required parameters must be populated in order to send to Azure.
43
44    :param service_uri: Required. The service URI for the webhook to post notifications.
45    :type service_uri: str
46    :param custom_headers: Custom headers that will be added to the webhook notifications.
47    :type custom_headers: dict[str, str]
48    """
49
50    _validation = {
51        'service_uri': {'required': True},
52    }
53
54    _attribute_map = {
55        'service_uri': {'key': 'serviceUri', 'type': 'str'},
56        'custom_headers': {'key': 'customHeaders', 'type': '{str}'},
57    }
58
59    def __init__(
60        self,
61        *,
62        service_uri: str,
63        custom_headers: Optional[Dict[str, str]] = None,
64        **kwargs
65    ):
66        super(CallbackConfig, self).__init__(**kwargs)
67        self.service_uri = service_uri
68        self.custom_headers = custom_headers
69
70
71class EncryptionProperty(msrest.serialization.Model):
72    """EncryptionProperty.
73
74    :param status: Indicates whether or not the encryption is enabled for container registry.
75     Possible values include: "enabled", "disabled".
76    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.EncryptionStatus
77    :param key_vault_properties: Key vault properties.
78    :type key_vault_properties:
79     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.KeyVaultProperties
80    """
81
82    _attribute_map = {
83        'status': {'key': 'status', 'type': 'str'},
84        'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'},
85    }
86
87    def __init__(
88        self,
89        *,
90        status: Optional[Union[str, "EncryptionStatus"]] = None,
91        key_vault_properties: Optional["KeyVaultProperties"] = None,
92        **kwargs
93    ):
94        super(EncryptionProperty, self).__init__(**kwargs)
95        self.status = status
96        self.key_vault_properties = key_vault_properties
97
98
99class EventInfo(msrest.serialization.Model):
100    """The basic information of an event.
101
102    :param id: The event ID.
103    :type id: str
104    """
105
106    _attribute_map = {
107        'id': {'key': 'id', 'type': 'str'},
108    }
109
110    def __init__(
111        self,
112        *,
113        id: Optional[str] = None,
114        **kwargs
115    ):
116        super(EventInfo, self).__init__(**kwargs)
117        self.id = id
118
119
120class Event(EventInfo):
121    """The event for a webhook.
122
123    :param id: The event ID.
124    :type id: str
125    :param event_request_message: The event request message sent to the service URI.
126    :type event_request_message:
127     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.EventRequestMessage
128    :param event_response_message: The event response message received from the service URI.
129    :type event_response_message:
130     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.EventResponseMessage
131    """
132
133    _attribute_map = {
134        'id': {'key': 'id', 'type': 'str'},
135        'event_request_message': {'key': 'eventRequestMessage', 'type': 'EventRequestMessage'},
136        'event_response_message': {'key': 'eventResponseMessage', 'type': 'EventResponseMessage'},
137    }
138
139    def __init__(
140        self,
141        *,
142        id: Optional[str] = None,
143        event_request_message: Optional["EventRequestMessage"] = None,
144        event_response_message: Optional["EventResponseMessage"] = None,
145        **kwargs
146    ):
147        super(Event, self).__init__(id=id, **kwargs)
148        self.event_request_message = event_request_message
149        self.event_response_message = event_response_message
150
151
152class EventContent(msrest.serialization.Model):
153    """The content of the event request message.
154
155    :param id: The event ID.
156    :type id: str
157    :param timestamp: The time at which the event occurred.
158    :type timestamp: ~datetime.datetime
159    :param action: The action that encompasses the provided event.
160    :type action: str
161    :param target: The target of the event.
162    :type target: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Target
163    :param request: The request that generated the event.
164    :type request: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Request
165    :param actor: The agent that initiated the event. For most situations, this could be from the
166     authorization context of the request.
167    :type actor: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Actor
168    :param source: The registry node that generated the event. Put differently, while the actor
169     initiates the event, the source generates it.
170    :type source: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Source
171    """
172
173    _attribute_map = {
174        'id': {'key': 'id', 'type': 'str'},
175        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
176        'action': {'key': 'action', 'type': 'str'},
177        'target': {'key': 'target', 'type': 'Target'},
178        'request': {'key': 'request', 'type': 'Request'},
179        'actor': {'key': 'actor', 'type': 'Actor'},
180        'source': {'key': 'source', 'type': 'Source'},
181    }
182
183    def __init__(
184        self,
185        *,
186        id: Optional[str] = None,
187        timestamp: Optional[datetime.datetime] = None,
188        action: Optional[str] = None,
189        target: Optional["Target"] = None,
190        request: Optional["Request"] = None,
191        actor: Optional["Actor"] = None,
192        source: Optional["Source"] = None,
193        **kwargs
194    ):
195        super(EventContent, self).__init__(**kwargs)
196        self.id = id
197        self.timestamp = timestamp
198        self.action = action
199        self.target = target
200        self.request = request
201        self.actor = actor
202        self.source = source
203
204
205class EventListResult(msrest.serialization.Model):
206    """The result of a request to list events for a webhook.
207
208    :param value: The list of events. Since this list may be incomplete, the nextLink field should
209     be used to request the next list of events.
210    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.Event]
211    :param next_link: The URI that can be used to request the next list of events.
212    :type next_link: str
213    """
214
215    _attribute_map = {
216        'value': {'key': 'value', 'type': '[Event]'},
217        'next_link': {'key': 'nextLink', 'type': 'str'},
218    }
219
220    def __init__(
221        self,
222        *,
223        value: Optional[List["Event"]] = None,
224        next_link: Optional[str] = None,
225        **kwargs
226    ):
227        super(EventListResult, self).__init__(**kwargs)
228        self.value = value
229        self.next_link = next_link
230
231
232class EventRequestMessage(msrest.serialization.Model):
233    """The event request message sent to the service URI.
234
235    :param content: The content of the event request message.
236    :type content: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.EventContent
237    :param headers: The headers of the event request message.
238    :type headers: dict[str, str]
239    :param method: The HTTP method used to send the event request message.
240    :type method: str
241    :param request_uri: The URI used to send the event request message.
242    :type request_uri: str
243    :param version: The HTTP message version.
244    :type version: str
245    """
246
247    _attribute_map = {
248        'content': {'key': 'content', 'type': 'EventContent'},
249        'headers': {'key': 'headers', 'type': '{str}'},
250        'method': {'key': 'method', 'type': 'str'},
251        'request_uri': {'key': 'requestUri', 'type': 'str'},
252        'version': {'key': 'version', 'type': 'str'},
253    }
254
255    def __init__(
256        self,
257        *,
258        content: Optional["EventContent"] = None,
259        headers: Optional[Dict[str, str]] = None,
260        method: Optional[str] = None,
261        request_uri: Optional[str] = None,
262        version: Optional[str] = None,
263        **kwargs
264    ):
265        super(EventRequestMessage, self).__init__(**kwargs)
266        self.content = content
267        self.headers = headers
268        self.method = method
269        self.request_uri = request_uri
270        self.version = version
271
272
273class EventResponseMessage(msrest.serialization.Model):
274    """The event response message received from the service URI.
275
276    :param content: The content of the event response message.
277    :type content: str
278    :param headers: The headers of the event response message.
279    :type headers: dict[str, str]
280    :param reason_phrase: The reason phrase of the event response message.
281    :type reason_phrase: str
282    :param status_code: The status code of the event response message.
283    :type status_code: str
284    :param version: The HTTP message version.
285    :type version: str
286    """
287
288    _attribute_map = {
289        'content': {'key': 'content', 'type': 'str'},
290        'headers': {'key': 'headers', 'type': '{str}'},
291        'reason_phrase': {'key': 'reasonPhrase', 'type': 'str'},
292        'status_code': {'key': 'statusCode', 'type': 'str'},
293        'version': {'key': 'version', 'type': 'str'},
294    }
295
296    def __init__(
297        self,
298        *,
299        content: Optional[str] = None,
300        headers: Optional[Dict[str, str]] = None,
301        reason_phrase: Optional[str] = None,
302        status_code: Optional[str] = None,
303        version: Optional[str] = None,
304        **kwargs
305    ):
306        super(EventResponseMessage, self).__init__(**kwargs)
307        self.content = content
308        self.headers = headers
309        self.reason_phrase = reason_phrase
310        self.status_code = status_code
311        self.version = version
312
313
314class ProxyResource(msrest.serialization.Model):
315    """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.
316
317    Variables are only populated by the server, and will be ignored when sending a request.
318
319    :ivar id: The resource ID.
320    :vartype id: str
321    :ivar name: The name of the resource.
322    :vartype name: str
323    :ivar type: The type of the resource.
324    :vartype type: str
325    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
326    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
327    """
328
329    _validation = {
330        'id': {'readonly': True},
331        'name': {'readonly': True},
332        'type': {'readonly': True},
333        'system_data': {'readonly': True},
334    }
335
336    _attribute_map = {
337        'id': {'key': 'id', 'type': 'str'},
338        'name': {'key': 'name', 'type': 'str'},
339        'type': {'key': 'type', 'type': 'str'},
340        'system_data': {'key': 'systemData', 'type': 'SystemData'},
341    }
342
343    def __init__(
344        self,
345        **kwargs
346    ):
347        super(ProxyResource, self).__init__(**kwargs)
348        self.id = None
349        self.name = None
350        self.type = None
351        self.system_data = None
352
353
354class ExportPipeline(ProxyResource):
355    """An object that represents an export pipeline for a container registry.
356
357    Variables are only populated by the server, and will be ignored when sending a request.
358
359    :ivar id: The resource ID.
360    :vartype id: str
361    :ivar name: The name of the resource.
362    :vartype name: str
363    :ivar type: The type of the resource.
364    :vartype type: str
365    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
366    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
367    :param location: The location of the export pipeline.
368    :type location: str
369    :param identity: The identity of the export pipeline.
370    :type identity: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
371    :param target: The target properties of the export pipeline.
372    :type target:
373     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ExportPipelineTargetProperties
374    :param options: The list of all options configured for the pipeline.
375    :type options: list[str or
376     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineOptions]
377    :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was
378     called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
379     "Canceled".
380    :vartype provisioning_state: str or
381     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
382    """
383
384    _validation = {
385        'id': {'readonly': True},
386        'name': {'readonly': True},
387        'type': {'readonly': True},
388        'system_data': {'readonly': True},
389        'provisioning_state': {'readonly': True},
390    }
391
392    _attribute_map = {
393        'id': {'key': 'id', 'type': 'str'},
394        'name': {'key': 'name', 'type': 'str'},
395        'type': {'key': 'type', 'type': 'str'},
396        'system_data': {'key': 'systemData', 'type': 'SystemData'},
397        'location': {'key': 'location', 'type': 'str'},
398        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
399        'target': {'key': 'properties.target', 'type': 'ExportPipelineTargetProperties'},
400        'options': {'key': 'properties.options', 'type': '[str]'},
401        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
402    }
403
404    def __init__(
405        self,
406        *,
407        location: Optional[str] = None,
408        identity: Optional["IdentityProperties"] = None,
409        target: Optional["ExportPipelineTargetProperties"] = None,
410        options: Optional[List[Union[str, "PipelineOptions"]]] = None,
411        **kwargs
412    ):
413        super(ExportPipeline, self).__init__(**kwargs)
414        self.location = location
415        self.identity = identity
416        self.target = target
417        self.options = options
418        self.provisioning_state = None
419
420
421class ExportPipelineListResult(msrest.serialization.Model):
422    """The result of a request to list export pipelines for a container registry.
423
424    :param value: The list of export pipelines. Since this list may be incomplete, the nextLink
425     field should be used to request the next list of export pipelines.
426    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.ExportPipeline]
427    :param next_link: The URI that can be used to request the next list of pipeline runs.
428    :type next_link: str
429    """
430
431    _attribute_map = {
432        'value': {'key': 'value', 'type': '[ExportPipeline]'},
433        'next_link': {'key': 'nextLink', 'type': 'str'},
434    }
435
436    def __init__(
437        self,
438        *,
439        value: Optional[List["ExportPipeline"]] = None,
440        next_link: Optional[str] = None,
441        **kwargs
442    ):
443        super(ExportPipelineListResult, self).__init__(**kwargs)
444        self.value = value
445        self.next_link = next_link
446
447
448class ExportPipelineTargetProperties(msrest.serialization.Model):
449    """The properties of the export pipeline target.
450
451    All required parameters must be populated in order to send to Azure.
452
453    :param type: The type of target for the export pipeline.
454    :type type: str
455    :param uri: The target uri of the export pipeline.
456     When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName"
457     When 'AzureStorageBlobContainer':  "https://accountName.blob.core.windows.net/containerName".
458    :type uri: str
459    :param key_vault_uri: Required. They key vault secret uri to obtain the target storage SAS
460     token.
461    :type key_vault_uri: str
462    """
463
464    _validation = {
465        'key_vault_uri': {'required': True},
466    }
467
468    _attribute_map = {
469        'type': {'key': 'type', 'type': 'str'},
470        'uri': {'key': 'uri', 'type': 'str'},
471        'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'},
472    }
473
474    def __init__(
475        self,
476        *,
477        key_vault_uri: str,
478        type: Optional[str] = None,
479        uri: Optional[str] = None,
480        **kwargs
481    ):
482        super(ExportPipelineTargetProperties, self).__init__(**kwargs)
483        self.type = type
484        self.uri = uri
485        self.key_vault_uri = key_vault_uri
486
487
488class IdentityProperties(msrest.serialization.Model):
489    """Managed identity for the resource.
490
491    :param principal_id: The principal ID of resource identity.
492    :type principal_id: str
493    :param tenant_id: The tenant ID of resource.
494    :type tenant_id: str
495    :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned",
496     "SystemAssigned, UserAssigned", "None".
497    :type type: str or
498     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ResourceIdentityType
499    :param user_assigned_identities: The list of user identities associated with the resource. The
500     user identity
501     dictionary key references will be ARM resource ids in the form:
502     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
503         providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
504    :type user_assigned_identities: dict[str,
505     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.UserIdentityProperties]
506    """
507
508    _attribute_map = {
509        'principal_id': {'key': 'principalId', 'type': 'str'},
510        'tenant_id': {'key': 'tenantId', 'type': 'str'},
511        'type': {'key': 'type', 'type': 'str'},
512        'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'},
513    }
514
515    def __init__(
516        self,
517        *,
518        principal_id: Optional[str] = None,
519        tenant_id: Optional[str] = None,
520        type: Optional[Union[str, "ResourceIdentityType"]] = None,
521        user_assigned_identities: Optional[Dict[str, "UserIdentityProperties"]] = None,
522        **kwargs
523    ):
524        super(IdentityProperties, self).__init__(**kwargs)
525        self.principal_id = principal_id
526        self.tenant_id = tenant_id
527        self.type = type
528        self.user_assigned_identities = user_assigned_identities
529
530
531class ImportImageParameters(msrest.serialization.Model):
532    """ImportImageParameters.
533
534    All required parameters must be populated in order to send to Azure.
535
536    :param source: Required. The source of the image.
537    :type source: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ImportSource
538    :param target_tags: List of strings of the form repo[:tag]. When tag is omitted the source will
539     be used (or 'latest' if source tag is also omitted).
540    :type target_tags: list[str]
541    :param untagged_target_repositories: List of strings of repository names to do a manifest only
542     copy. No tag will be created.
543    :type untagged_target_repositories: list[str]
544    :param mode: When Force, any existing target tags will be overwritten. When NoForce, any
545     existing target tags will fail the operation before any copying begins. Possible values
546     include: "NoForce", "Force". Default value: "NoForce".
547    :type mode: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ImportMode
548    """
549
550    _validation = {
551        'source': {'required': True},
552    }
553
554    _attribute_map = {
555        'source': {'key': 'source', 'type': 'ImportSource'},
556        'target_tags': {'key': 'targetTags', 'type': '[str]'},
557        'untagged_target_repositories': {'key': 'untaggedTargetRepositories', 'type': '[str]'},
558        'mode': {'key': 'mode', 'type': 'str'},
559    }
560
561    def __init__(
562        self,
563        *,
564        source: "ImportSource",
565        target_tags: Optional[List[str]] = None,
566        untagged_target_repositories: Optional[List[str]] = None,
567        mode: Optional[Union[str, "ImportMode"]] = "NoForce",
568        **kwargs
569    ):
570        super(ImportImageParameters, self).__init__(**kwargs)
571        self.source = source
572        self.target_tags = target_tags
573        self.untagged_target_repositories = untagged_target_repositories
574        self.mode = mode
575
576
577class ImportPipeline(ProxyResource):
578    """An object that represents an import pipeline for a container registry.
579
580    Variables are only populated by the server, and will be ignored when sending a request.
581
582    :ivar id: The resource ID.
583    :vartype id: str
584    :ivar name: The name of the resource.
585    :vartype name: str
586    :ivar type: The type of the resource.
587    :vartype type: str
588    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
589    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
590    :param location: The location of the import pipeline.
591    :type location: str
592    :param identity: The identity of the import pipeline.
593    :type identity: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
594    :param source: The source properties of the import pipeline.
595    :type source:
596     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ImportPipelineSourceProperties
597    :param trigger: The properties that describe the trigger of the import pipeline.
598    :type trigger:
599     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineTriggerProperties
600    :param options: The list of all options configured for the pipeline.
601    :type options: list[str or
602     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineOptions]
603    :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was
604     called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
605     "Canceled".
606    :vartype provisioning_state: str or
607     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
608    """
609
610    _validation = {
611        'id': {'readonly': True},
612        'name': {'readonly': True},
613        'type': {'readonly': True},
614        'system_data': {'readonly': True},
615        'provisioning_state': {'readonly': True},
616    }
617
618    _attribute_map = {
619        'id': {'key': 'id', 'type': 'str'},
620        'name': {'key': 'name', 'type': 'str'},
621        'type': {'key': 'type', 'type': 'str'},
622        'system_data': {'key': 'systemData', 'type': 'SystemData'},
623        'location': {'key': 'location', 'type': 'str'},
624        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
625        'source': {'key': 'properties.source', 'type': 'ImportPipelineSourceProperties'},
626        'trigger': {'key': 'properties.trigger', 'type': 'PipelineTriggerProperties'},
627        'options': {'key': 'properties.options', 'type': '[str]'},
628        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
629    }
630
631    def __init__(
632        self,
633        *,
634        location: Optional[str] = None,
635        identity: Optional["IdentityProperties"] = None,
636        source: Optional["ImportPipelineSourceProperties"] = None,
637        trigger: Optional["PipelineTriggerProperties"] = None,
638        options: Optional[List[Union[str, "PipelineOptions"]]] = None,
639        **kwargs
640    ):
641        super(ImportPipeline, self).__init__(**kwargs)
642        self.location = location
643        self.identity = identity
644        self.source = source
645        self.trigger = trigger
646        self.options = options
647        self.provisioning_state = None
648
649
650class ImportPipelineListResult(msrest.serialization.Model):
651    """The result of a request to list import pipelines for a container registry.
652
653    :param value: The list of import pipelines. Since this list may be incomplete, the nextLink
654     field should be used to request the next list of import pipelines.
655    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.ImportPipeline]
656    :param next_link: The URI that can be used to request the next list of pipeline runs.
657    :type next_link: str
658    """
659
660    _attribute_map = {
661        'value': {'key': 'value', 'type': '[ImportPipeline]'},
662        'next_link': {'key': 'nextLink', 'type': 'str'},
663    }
664
665    def __init__(
666        self,
667        *,
668        value: Optional[List["ImportPipeline"]] = None,
669        next_link: Optional[str] = None,
670        **kwargs
671    ):
672        super(ImportPipelineListResult, self).__init__(**kwargs)
673        self.value = value
674        self.next_link = next_link
675
676
677class ImportPipelineSourceProperties(msrest.serialization.Model):
678    """The properties of the import pipeline source.
679
680    All required parameters must be populated in order to send to Azure.
681
682    :param type: The type of source for the import pipeline. Possible values include:
683     "AzureStorageBlobContainer". Default value: "AzureStorageBlobContainer".
684    :type type: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineSourceType
685    :param uri: The source uri of the import pipeline.
686     When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName"
687     When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName".
688    :type uri: str
689    :param key_vault_uri: Required. They key vault secret uri to obtain the source storage SAS
690     token.
691    :type key_vault_uri: str
692    """
693
694    _validation = {
695        'key_vault_uri': {'required': True},
696    }
697
698    _attribute_map = {
699        'type': {'key': 'type', 'type': 'str'},
700        'uri': {'key': 'uri', 'type': 'str'},
701        'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'},
702    }
703
704    def __init__(
705        self,
706        *,
707        key_vault_uri: str,
708        type: Optional[Union[str, "PipelineSourceType"]] = "AzureStorageBlobContainer",
709        uri: Optional[str] = None,
710        **kwargs
711    ):
712        super(ImportPipelineSourceProperties, self).__init__(**kwargs)
713        self.type = type
714        self.uri = uri
715        self.key_vault_uri = key_vault_uri
716
717
718class ImportSource(msrest.serialization.Model):
719    """ImportSource.
720
721    All required parameters must be populated in order to send to Azure.
722
723    :param resource_id: The resource identifier of the source Azure Container Registry.
724    :type resource_id: str
725    :param registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com').
726    :type registry_uri: str
727    :param credentials: Credentials used when importing from a registry uri.
728    :type credentials:
729     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ImportSourceCredentials
730    :param source_image: Required. Repository name of the source image.
731     Specify an image by repository ('hello-world'). This will use the 'latest' tag.
732     Specify an image by tag ('hello-world:latest').
733     Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').
734    :type source_image: str
735    """
736
737    _validation = {
738        'source_image': {'required': True},
739    }
740
741    _attribute_map = {
742        'resource_id': {'key': 'resourceId', 'type': 'str'},
743        'registry_uri': {'key': 'registryUri', 'type': 'str'},
744        'credentials': {'key': 'credentials', 'type': 'ImportSourceCredentials'},
745        'source_image': {'key': 'sourceImage', 'type': 'str'},
746    }
747
748    def __init__(
749        self,
750        *,
751        source_image: str,
752        resource_id: Optional[str] = None,
753        registry_uri: Optional[str] = None,
754        credentials: Optional["ImportSourceCredentials"] = None,
755        **kwargs
756    ):
757        super(ImportSource, self).__init__(**kwargs)
758        self.resource_id = resource_id
759        self.registry_uri = registry_uri
760        self.credentials = credentials
761        self.source_image = source_image
762
763
764class ImportSourceCredentials(msrest.serialization.Model):
765    """ImportSourceCredentials.
766
767    All required parameters must be populated in order to send to Azure.
768
769    :param username: The username to authenticate with the source registry.
770    :type username: str
771    :param password: Required. The password used to authenticate with the source registry.
772    :type password: str
773    """
774
775    _validation = {
776        'password': {'required': True},
777    }
778
779    _attribute_map = {
780        'username': {'key': 'username', 'type': 'str'},
781        'password': {'key': 'password', 'type': 'str'},
782    }
783
784    def __init__(
785        self,
786        *,
787        password: str,
788        username: Optional[str] = None,
789        **kwargs
790    ):
791        super(ImportSourceCredentials, self).__init__(**kwargs)
792        self.username = username
793        self.password = password
794
795
796class IPRule(msrest.serialization.Model):
797    """IP rule with specific IP or IP range in CIDR format.
798
799    All required parameters must be populated in order to send to Azure.
800
801    :param action: The action of IP ACL rule. Possible values include: "Allow".
802    :type action: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Action
803    :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR format. Only IPV4
804     address is allowed.
805    :type ip_address_or_range: str
806    """
807
808    _validation = {
809        'ip_address_or_range': {'required': True},
810    }
811
812    _attribute_map = {
813        'action': {'key': 'action', 'type': 'str'},
814        'ip_address_or_range': {'key': 'value', 'type': 'str'},
815    }
816
817    def __init__(
818        self,
819        *,
820        ip_address_or_range: str,
821        action: Optional[Union[str, "Action"]] = None,
822        **kwargs
823    ):
824        super(IPRule, self).__init__(**kwargs)
825        self.action = action
826        self.ip_address_or_range = ip_address_or_range
827
828
829class KeyVaultProperties(msrest.serialization.Model):
830    """KeyVaultProperties.
831
832    Variables are only populated by the server, and will be ignored when sending a request.
833
834    :param key_identifier: Key vault uri to access the encryption key.
835    :type key_identifier: str
836    :ivar versioned_key_identifier: The fully qualified key identifier that includes the version of
837     the key that is actually used for encryption.
838    :vartype versioned_key_identifier: str
839    :param identity: The client id of the identity which will be used to access key vault.
840    :type identity: str
841    :ivar key_rotation_enabled: Auto key rotation status for a CMK enabled registry.
842    :vartype key_rotation_enabled: bool
843    :ivar last_key_rotation_timestamp: Timestamp of the last successful key rotation.
844    :vartype last_key_rotation_timestamp: ~datetime.datetime
845    """
846
847    _validation = {
848        'versioned_key_identifier': {'readonly': True},
849        'key_rotation_enabled': {'readonly': True},
850        'last_key_rotation_timestamp': {'readonly': True},
851    }
852
853    _attribute_map = {
854        'key_identifier': {'key': 'keyIdentifier', 'type': 'str'},
855        'versioned_key_identifier': {'key': 'versionedKeyIdentifier', 'type': 'str'},
856        'identity': {'key': 'identity', 'type': 'str'},
857        'key_rotation_enabled': {'key': 'keyRotationEnabled', 'type': 'bool'},
858        'last_key_rotation_timestamp': {'key': 'lastKeyRotationTimestamp', 'type': 'iso-8601'},
859    }
860
861    def __init__(
862        self,
863        *,
864        key_identifier: Optional[str] = None,
865        identity: Optional[str] = None,
866        **kwargs
867    ):
868        super(KeyVaultProperties, self).__init__(**kwargs)
869        self.key_identifier = key_identifier
870        self.versioned_key_identifier = None
871        self.identity = identity
872        self.key_rotation_enabled = None
873        self.last_key_rotation_timestamp = None
874
875
876class NetworkRuleSet(msrest.serialization.Model):
877    """The network rule set for a container registry.
878
879    All required parameters must be populated in order to send to Azure.
880
881    :param default_action: Required. The default action of allow or deny when no other rules match.
882     Possible values include: "Allow", "Deny". Default value: "Allow".
883    :type default_action: str or
884     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.DefaultAction
885    :param virtual_network_rules: The virtual network rules.
886    :type virtual_network_rules:
887     list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.VirtualNetworkRule]
888    :param ip_rules: The IP ACL rules.
889    :type ip_rules: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.IPRule]
890    """
891
892    _validation = {
893        'default_action': {'required': True},
894    }
895
896    _attribute_map = {
897        'default_action': {'key': 'defaultAction', 'type': 'str'},
898        'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
899        'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'},
900    }
901
902    def __init__(
903        self,
904        *,
905        default_action: Union[str, "DefaultAction"] = "Allow",
906        virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None,
907        ip_rules: Optional[List["IPRule"]] = None,
908        **kwargs
909    ):
910        super(NetworkRuleSet, self).__init__(**kwargs)
911        self.default_action = default_action
912        self.virtual_network_rules = virtual_network_rules
913        self.ip_rules = ip_rules
914
915
916class OperationDefinition(msrest.serialization.Model):
917    """The definition of a container registry operation.
918
919    :param origin: The origin information of the container registry operation.
920    :type origin: str
921    :param name: Operation name: {provider}/{resource}/{operation}.
922    :type name: str
923    :param display: The display information for the container registry operation.
924    :type display:
925     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationDisplayDefinition
926    :param service_specification: The definition of Azure Monitoring service.
927    :type service_specification:
928     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationServiceSpecificationDefinition
929    """
930
931    _attribute_map = {
932        'origin': {'key': 'origin', 'type': 'str'},
933        'name': {'key': 'name', 'type': 'str'},
934        'display': {'key': 'display', 'type': 'OperationDisplayDefinition'},
935        'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecificationDefinition'},
936    }
937
938    def __init__(
939        self,
940        *,
941        origin: Optional[str] = None,
942        name: Optional[str] = None,
943        display: Optional["OperationDisplayDefinition"] = None,
944        service_specification: Optional["OperationServiceSpecificationDefinition"] = None,
945        **kwargs
946    ):
947        super(OperationDefinition, self).__init__(**kwargs)
948        self.origin = origin
949        self.name = name
950        self.display = display
951        self.service_specification = service_specification
952
953
954class OperationDisplayDefinition(msrest.serialization.Model):
955    """The display information for a container registry operation.
956
957    :param provider: The resource provider name: Microsoft.ContainerRegistry.
958    :type provider: str
959    :param resource: The resource on which the operation is performed.
960    :type resource: str
961    :param operation: The operation that users can perform.
962    :type operation: str
963    :param description: The description for the operation.
964    :type description: str
965    """
966
967    _attribute_map = {
968        'provider': {'key': 'provider', 'type': 'str'},
969        'resource': {'key': 'resource', 'type': 'str'},
970        'operation': {'key': 'operation', 'type': 'str'},
971        'description': {'key': 'description', 'type': 'str'},
972    }
973
974    def __init__(
975        self,
976        *,
977        provider: Optional[str] = None,
978        resource: Optional[str] = None,
979        operation: Optional[str] = None,
980        description: Optional[str] = None,
981        **kwargs
982    ):
983        super(OperationDisplayDefinition, self).__init__(**kwargs)
984        self.provider = provider
985        self.resource = resource
986        self.operation = operation
987        self.description = description
988
989
990class OperationListResult(msrest.serialization.Model):
991    """The result of a request to list container registry operations.
992
993    :param value: The list of container registry operations. Since this list may be incomplete, the
994     nextLink field should be used to request the next list of operations.
995    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationDefinition]
996    :param next_link: The URI that can be used to request the next list of container registry
997     operations.
998    :type next_link: str
999    """
1000
1001    _attribute_map = {
1002        'value': {'key': 'value', 'type': '[OperationDefinition]'},
1003        'next_link': {'key': 'nextLink', 'type': 'str'},
1004    }
1005
1006    def __init__(
1007        self,
1008        *,
1009        value: Optional[List["OperationDefinition"]] = None,
1010        next_link: Optional[str] = None,
1011        **kwargs
1012    ):
1013        super(OperationListResult, self).__init__(**kwargs)
1014        self.value = value
1015        self.next_link = next_link
1016
1017
1018class OperationLogSpecificationDefinition(msrest.serialization.Model):
1019    """The definition of Azure Monitoring log.
1020
1021    :param name: Log name.
1022    :type name: str
1023    :param display_name: Log display name.
1024    :type display_name: str
1025    :param blob_duration: Log blob duration.
1026    :type blob_duration: str
1027    """
1028
1029    _attribute_map = {
1030        'name': {'key': 'name', 'type': 'str'},
1031        'display_name': {'key': 'displayName', 'type': 'str'},
1032        'blob_duration': {'key': 'blobDuration', 'type': 'str'},
1033    }
1034
1035    def __init__(
1036        self,
1037        *,
1038        name: Optional[str] = None,
1039        display_name: Optional[str] = None,
1040        blob_duration: Optional[str] = None,
1041        **kwargs
1042    ):
1043        super(OperationLogSpecificationDefinition, self).__init__(**kwargs)
1044        self.name = name
1045        self.display_name = display_name
1046        self.blob_duration = blob_duration
1047
1048
1049class OperationMetricSpecificationDefinition(msrest.serialization.Model):
1050    """The definition of Azure Monitoring metric.
1051
1052    :param name: Metric name.
1053    :type name: str
1054    :param display_name: Metric display name.
1055    :type display_name: str
1056    :param display_description: Metric description.
1057    :type display_description: str
1058    :param unit: Metric unit.
1059    :type unit: str
1060    :param aggregation_type: Metric aggregation type.
1061    :type aggregation_type: str
1062    :param internal_metric_name: Internal metric name.
1063    :type internal_metric_name: str
1064    """
1065
1066    _attribute_map = {
1067        'name': {'key': 'name', 'type': 'str'},
1068        'display_name': {'key': 'displayName', 'type': 'str'},
1069        'display_description': {'key': 'displayDescription', 'type': 'str'},
1070        'unit': {'key': 'unit', 'type': 'str'},
1071        'aggregation_type': {'key': 'aggregationType', 'type': 'str'},
1072        'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'},
1073    }
1074
1075    def __init__(
1076        self,
1077        *,
1078        name: Optional[str] = None,
1079        display_name: Optional[str] = None,
1080        display_description: Optional[str] = None,
1081        unit: Optional[str] = None,
1082        aggregation_type: Optional[str] = None,
1083        internal_metric_name: Optional[str] = None,
1084        **kwargs
1085    ):
1086        super(OperationMetricSpecificationDefinition, self).__init__(**kwargs)
1087        self.name = name
1088        self.display_name = display_name
1089        self.display_description = display_description
1090        self.unit = unit
1091        self.aggregation_type = aggregation_type
1092        self.internal_metric_name = internal_metric_name
1093
1094
1095class OperationServiceSpecificationDefinition(msrest.serialization.Model):
1096    """The definition of Azure Monitoring list.
1097
1098    :param metric_specifications: A list of Azure Monitoring metrics definition.
1099    :type metric_specifications:
1100     list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationMetricSpecificationDefinition]
1101    :param log_specifications: A list of Azure Monitoring log definitions.
1102    :type log_specifications:
1103     list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationLogSpecificationDefinition]
1104    """
1105
1106    _attribute_map = {
1107        'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'},
1108        'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'},
1109    }
1110
1111    def __init__(
1112        self,
1113        *,
1114        metric_specifications: Optional[List["OperationMetricSpecificationDefinition"]] = None,
1115        log_specifications: Optional[List["OperationLogSpecificationDefinition"]] = None,
1116        **kwargs
1117    ):
1118        super(OperationServiceSpecificationDefinition, self).__init__(**kwargs)
1119        self.metric_specifications = metric_specifications
1120        self.log_specifications = log_specifications
1121
1122
1123class PipelineRun(ProxyResource):
1124    """An object that represents a pipeline run for a container registry.
1125
1126    Variables are only populated by the server, and will be ignored when sending a request.
1127
1128    :ivar id: The resource ID.
1129    :vartype id: str
1130    :ivar name: The name of the resource.
1131    :vartype name: str
1132    :ivar type: The type of the resource.
1133    :vartype type: str
1134    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1135    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
1136    :ivar provisioning_state: The provisioning state of a pipeline run. Possible values include:
1137     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
1138    :vartype provisioning_state: str or
1139     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
1140    :param request: The request parameters for a pipeline run.
1141    :type request: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRunRequest
1142    :ivar response: The response of a pipeline run.
1143    :vartype response: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRunResponse
1144    :param force_update_tag: How the pipeline run should be forced to recreate even if the pipeline
1145     run configuration has not changed.
1146    :type force_update_tag: str
1147    """
1148
1149    _validation = {
1150        'id': {'readonly': True},
1151        'name': {'readonly': True},
1152        'type': {'readonly': True},
1153        'system_data': {'readonly': True},
1154        'provisioning_state': {'readonly': True},
1155        'response': {'readonly': True},
1156    }
1157
1158    _attribute_map = {
1159        'id': {'key': 'id', 'type': 'str'},
1160        'name': {'key': 'name', 'type': 'str'},
1161        'type': {'key': 'type', 'type': 'str'},
1162        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1163        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1164        'request': {'key': 'properties.request', 'type': 'PipelineRunRequest'},
1165        'response': {'key': 'properties.response', 'type': 'PipelineRunResponse'},
1166        'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
1167    }
1168
1169    def __init__(
1170        self,
1171        *,
1172        request: Optional["PipelineRunRequest"] = None,
1173        force_update_tag: Optional[str] = None,
1174        **kwargs
1175    ):
1176        super(PipelineRun, self).__init__(**kwargs)
1177        self.provisioning_state = None
1178        self.request = request
1179        self.response = None
1180        self.force_update_tag = force_update_tag
1181
1182
1183class PipelineRunListResult(msrest.serialization.Model):
1184    """The result of a request to list pipeline runs for a container registry.
1185
1186    :param value: The list of pipeline runs. Since this list may be incomplete, the nextLink field
1187     should be used to request the next list of pipeline runs.
1188    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRun]
1189    :param next_link: The URI that can be used to request the next list of pipeline runs.
1190    :type next_link: str
1191    """
1192
1193    _attribute_map = {
1194        'value': {'key': 'value', 'type': '[PipelineRun]'},
1195        'next_link': {'key': 'nextLink', 'type': 'str'},
1196    }
1197
1198    def __init__(
1199        self,
1200        *,
1201        value: Optional[List["PipelineRun"]] = None,
1202        next_link: Optional[str] = None,
1203        **kwargs
1204    ):
1205        super(PipelineRunListResult, self).__init__(**kwargs)
1206        self.value = value
1207        self.next_link = next_link
1208
1209
1210class PipelineRunRequest(msrest.serialization.Model):
1211    """The request properties provided for a pipeline run.
1212
1213    :param pipeline_resource_id: The resource ID of the pipeline to run.
1214    :type pipeline_resource_id: str
1215    :param artifacts: List of source artifacts to be transferred by the pipeline.
1216     Specify an image by repository ('hello-world'). This will use the 'latest' tag.
1217     Specify an image by tag ('hello-world:latest').
1218     Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').
1219    :type artifacts: list[str]
1220    :param source: The source properties of the pipeline run.
1221    :type source:
1222     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRunSourceProperties
1223    :param target: The target properties of the pipeline run.
1224    :type target:
1225     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRunTargetProperties
1226    :param catalog_digest: The digest of the tar used to transfer the artifacts.
1227    :type catalog_digest: str
1228    """
1229
1230    _attribute_map = {
1231        'pipeline_resource_id': {'key': 'pipelineResourceId', 'type': 'str'},
1232        'artifacts': {'key': 'artifacts', 'type': '[str]'},
1233        'source': {'key': 'source', 'type': 'PipelineRunSourceProperties'},
1234        'target': {'key': 'target', 'type': 'PipelineRunTargetProperties'},
1235        'catalog_digest': {'key': 'catalogDigest', 'type': 'str'},
1236    }
1237
1238    def __init__(
1239        self,
1240        *,
1241        pipeline_resource_id: Optional[str] = None,
1242        artifacts: Optional[List[str]] = None,
1243        source: Optional["PipelineRunSourceProperties"] = None,
1244        target: Optional["PipelineRunTargetProperties"] = None,
1245        catalog_digest: Optional[str] = None,
1246        **kwargs
1247    ):
1248        super(PipelineRunRequest, self).__init__(**kwargs)
1249        self.pipeline_resource_id = pipeline_resource_id
1250        self.artifacts = artifacts
1251        self.source = source
1252        self.target = target
1253        self.catalog_digest = catalog_digest
1254
1255
1256class PipelineRunResponse(msrest.serialization.Model):
1257    """The response properties returned for a pipeline run.
1258
1259    :param status: The current status of the pipeline run.
1260    :type status: str
1261    :param imported_artifacts: The artifacts imported in the pipeline run.
1262    :type imported_artifacts: list[str]
1263    :param progress: The current progress of the copy operation.
1264    :type progress: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProgressProperties
1265    :param start_time: The time the pipeline run started.
1266    :type start_time: ~datetime.datetime
1267    :param finish_time: The time the pipeline run finished.
1268    :type finish_time: ~datetime.datetime
1269    :param source: The source of the pipeline run.
1270    :type source:
1271     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ImportPipelineSourceProperties
1272    :param target: The target of the pipeline run.
1273    :type target:
1274     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ExportPipelineTargetProperties
1275    :param catalog_digest: The digest of the tar used to transfer the artifacts.
1276    :type catalog_digest: str
1277    :param trigger: The trigger that caused the pipeline run.
1278    :type trigger:
1279     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineTriggerDescriptor
1280    :param pipeline_run_error_message: The detailed error message for the pipeline run in the case
1281     of failure.
1282    :type pipeline_run_error_message: str
1283    """
1284
1285    _attribute_map = {
1286        'status': {'key': 'status', 'type': 'str'},
1287        'imported_artifacts': {'key': 'importedArtifacts', 'type': '[str]'},
1288        'progress': {'key': 'progress', 'type': 'ProgressProperties'},
1289        'start_time': {'key': 'startTime', 'type': 'iso-8601'},
1290        'finish_time': {'key': 'finishTime', 'type': 'iso-8601'},
1291        'source': {'key': 'source', 'type': 'ImportPipelineSourceProperties'},
1292        'target': {'key': 'target', 'type': 'ExportPipelineTargetProperties'},
1293        'catalog_digest': {'key': 'catalogDigest', 'type': 'str'},
1294        'trigger': {'key': 'trigger', 'type': 'PipelineTriggerDescriptor'},
1295        'pipeline_run_error_message': {'key': 'pipelineRunErrorMessage', 'type': 'str'},
1296    }
1297
1298    def __init__(
1299        self,
1300        *,
1301        status: Optional[str] = None,
1302        imported_artifacts: Optional[List[str]] = None,
1303        progress: Optional["ProgressProperties"] = None,
1304        start_time: Optional[datetime.datetime] = None,
1305        finish_time: Optional[datetime.datetime] = None,
1306        source: Optional["ImportPipelineSourceProperties"] = None,
1307        target: Optional["ExportPipelineTargetProperties"] = None,
1308        catalog_digest: Optional[str] = None,
1309        trigger: Optional["PipelineTriggerDescriptor"] = None,
1310        pipeline_run_error_message: Optional[str] = None,
1311        **kwargs
1312    ):
1313        super(PipelineRunResponse, self).__init__(**kwargs)
1314        self.status = status
1315        self.imported_artifacts = imported_artifacts
1316        self.progress = progress
1317        self.start_time = start_time
1318        self.finish_time = finish_time
1319        self.source = source
1320        self.target = target
1321        self.catalog_digest = catalog_digest
1322        self.trigger = trigger
1323        self.pipeline_run_error_message = pipeline_run_error_message
1324
1325
1326class PipelineRunSourceProperties(msrest.serialization.Model):
1327    """PipelineRunSourceProperties.
1328
1329    :param type: The type of the source. Possible values include: "AzureStorageBlob". Default
1330     value: "AzureStorageBlob".
1331    :type type: str or
1332     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRunSourceType
1333    :param name: The name of the source.
1334    :type name: str
1335    """
1336
1337    _attribute_map = {
1338        'type': {'key': 'type', 'type': 'str'},
1339        'name': {'key': 'name', 'type': 'str'},
1340    }
1341
1342    def __init__(
1343        self,
1344        *,
1345        type: Optional[Union[str, "PipelineRunSourceType"]] = "AzureStorageBlob",
1346        name: Optional[str] = None,
1347        **kwargs
1348    ):
1349        super(PipelineRunSourceProperties, self).__init__(**kwargs)
1350        self.type = type
1351        self.name = name
1352
1353
1354class PipelineRunTargetProperties(msrest.serialization.Model):
1355    """PipelineRunTargetProperties.
1356
1357    :param type: The type of the target. Possible values include: "AzureStorageBlob". Default
1358     value: "AzureStorageBlob".
1359    :type type: str or
1360     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineRunTargetType
1361    :param name: The name of the target.
1362    :type name: str
1363    """
1364
1365    _attribute_map = {
1366        'type': {'key': 'type', 'type': 'str'},
1367        'name': {'key': 'name', 'type': 'str'},
1368    }
1369
1370    def __init__(
1371        self,
1372        *,
1373        type: Optional[Union[str, "PipelineRunTargetType"]] = "AzureStorageBlob",
1374        name: Optional[str] = None,
1375        **kwargs
1376    ):
1377        super(PipelineRunTargetProperties, self).__init__(**kwargs)
1378        self.type = type
1379        self.name = name
1380
1381
1382class PipelineSourceTriggerDescriptor(msrest.serialization.Model):
1383    """PipelineSourceTriggerDescriptor.
1384
1385    :param timestamp: The timestamp when the source update happened.
1386    :type timestamp: ~datetime.datetime
1387    """
1388
1389    _attribute_map = {
1390        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
1391    }
1392
1393    def __init__(
1394        self,
1395        *,
1396        timestamp: Optional[datetime.datetime] = None,
1397        **kwargs
1398    ):
1399        super(PipelineSourceTriggerDescriptor, self).__init__(**kwargs)
1400        self.timestamp = timestamp
1401
1402
1403class PipelineSourceTriggerProperties(msrest.serialization.Model):
1404    """PipelineSourceTriggerProperties.
1405
1406    All required parameters must be populated in order to send to Azure.
1407
1408    :param status: Required. The current status of the source trigger. Possible values include:
1409     "Enabled", "Disabled". Default value: "Enabled".
1410    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.TriggerStatus
1411    """
1412
1413    _validation = {
1414        'status': {'required': True},
1415    }
1416
1417    _attribute_map = {
1418        'status': {'key': 'status', 'type': 'str'},
1419    }
1420
1421    def __init__(
1422        self,
1423        *,
1424        status: Union[str, "TriggerStatus"] = "Enabled",
1425        **kwargs
1426    ):
1427        super(PipelineSourceTriggerProperties, self).__init__(**kwargs)
1428        self.status = status
1429
1430
1431class PipelineTriggerDescriptor(msrest.serialization.Model):
1432    """PipelineTriggerDescriptor.
1433
1434    :param source_trigger: The source trigger that caused the pipeline run.
1435    :type source_trigger:
1436     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineSourceTriggerDescriptor
1437    """
1438
1439    _attribute_map = {
1440        'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerDescriptor'},
1441    }
1442
1443    def __init__(
1444        self,
1445        *,
1446        source_trigger: Optional["PipelineSourceTriggerDescriptor"] = None,
1447        **kwargs
1448    ):
1449        super(PipelineTriggerDescriptor, self).__init__(**kwargs)
1450        self.source_trigger = source_trigger
1451
1452
1453class PipelineTriggerProperties(msrest.serialization.Model):
1454    """PipelineTriggerProperties.
1455
1456    :param source_trigger: The source trigger properties of the pipeline.
1457    :type source_trigger:
1458     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PipelineSourceTriggerProperties
1459    """
1460
1461    _attribute_map = {
1462        'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerProperties'},
1463    }
1464
1465    def __init__(
1466        self,
1467        *,
1468        source_trigger: Optional["PipelineSourceTriggerProperties"] = None,
1469        **kwargs
1470    ):
1471        super(PipelineTriggerProperties, self).__init__(**kwargs)
1472        self.source_trigger = source_trigger
1473
1474
1475class Policies(msrest.serialization.Model):
1476    """The policies for a container registry.
1477
1478    :param quarantine_policy: The quarantine policy for a container registry.
1479    :type quarantine_policy:
1480     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.QuarantinePolicy
1481    :param trust_policy: The content trust policy for a container registry.
1482    :type trust_policy: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.TrustPolicy
1483    :param retention_policy: The retention policy for a container registry.
1484    :type retention_policy:
1485     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.RetentionPolicy
1486    """
1487
1488    _attribute_map = {
1489        'quarantine_policy': {'key': 'quarantinePolicy', 'type': 'QuarantinePolicy'},
1490        'trust_policy': {'key': 'trustPolicy', 'type': 'TrustPolicy'},
1491        'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'},
1492    }
1493
1494    def __init__(
1495        self,
1496        *,
1497        quarantine_policy: Optional["QuarantinePolicy"] = None,
1498        trust_policy: Optional["TrustPolicy"] = None,
1499        retention_policy: Optional["RetentionPolicy"] = None,
1500        **kwargs
1501    ):
1502        super(Policies, self).__init__(**kwargs)
1503        self.quarantine_policy = quarantine_policy
1504        self.trust_policy = trust_policy
1505        self.retention_policy = retention_policy
1506
1507
1508class PrivateEndpoint(msrest.serialization.Model):
1509    """The Private Endpoint resource.
1510
1511    :param id: This is private endpoint resource created with Microsoft.Network resource provider.
1512    :type id: str
1513    """
1514
1515    _attribute_map = {
1516        'id': {'key': 'id', 'type': 'str'},
1517    }
1518
1519    def __init__(
1520        self,
1521        *,
1522        id: Optional[str] = None,
1523        **kwargs
1524    ):
1525        super(PrivateEndpoint, self).__init__(**kwargs)
1526        self.id = id
1527
1528
1529class PrivateEndpointConnection(ProxyResource):
1530    """An object that represents a private endpoint connection for a container registry.
1531
1532    Variables are only populated by the server, and will be ignored when sending a request.
1533
1534    :ivar id: The resource ID.
1535    :vartype id: str
1536    :ivar name: The name of the resource.
1537    :vartype name: str
1538    :ivar type: The type of the resource.
1539    :vartype type: str
1540    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1541    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
1542    :param private_endpoint: The resource of private endpoint.
1543    :type private_endpoint:
1544     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpoint
1545    :param private_link_service_connection_state: A collection of information about the state of
1546     the connection between service consumer and provider.
1547    :type private_link_service_connection_state:
1548     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateLinkServiceConnectionState
1549    :ivar provisioning_state: The provisioning state of private endpoint connection resource.
1550     Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
1551    :vartype provisioning_state: str or
1552     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
1553    """
1554
1555    _validation = {
1556        'id': {'readonly': True},
1557        'name': {'readonly': True},
1558        'type': {'readonly': True},
1559        'system_data': {'readonly': True},
1560        'provisioning_state': {'readonly': True},
1561    }
1562
1563    _attribute_map = {
1564        'id': {'key': 'id', 'type': 'str'},
1565        'name': {'key': 'name', 'type': 'str'},
1566        'type': {'key': 'type', 'type': 'str'},
1567        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1568        'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
1569        'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
1570        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1571    }
1572
1573    def __init__(
1574        self,
1575        *,
1576        private_endpoint: Optional["PrivateEndpoint"] = None,
1577        private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None,
1578        **kwargs
1579    ):
1580        super(PrivateEndpointConnection, self).__init__(**kwargs)
1581        self.private_endpoint = private_endpoint
1582        self.private_link_service_connection_state = private_link_service_connection_state
1583        self.provisioning_state = None
1584
1585
1586class PrivateEndpointConnectionListResult(msrest.serialization.Model):
1587    """The result of a request to list private endpoint connections for a container registry.
1588
1589    :param value: The list of private endpoint connections. Since this list may be incomplete, the
1590     nextLink field should be used to request the next list of private endpoint connections.
1591    :type value:
1592     list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpointConnection]
1593    :param next_link: The URI that can be used to request the next list of private endpoint
1594     connections.
1595    :type next_link: str
1596    """
1597
1598    _attribute_map = {
1599        'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'},
1600        'next_link': {'key': 'nextLink', 'type': 'str'},
1601    }
1602
1603    def __init__(
1604        self,
1605        *,
1606        value: Optional[List["PrivateEndpointConnection"]] = None,
1607        next_link: Optional[str] = None,
1608        **kwargs
1609    ):
1610        super(PrivateEndpointConnectionListResult, self).__init__(**kwargs)
1611        self.value = value
1612        self.next_link = next_link
1613
1614
1615class PrivateLinkResource(msrest.serialization.Model):
1616    """A resource that supports private link capabilities.
1617
1618    Variables are only populated by the server, and will be ignored when sending a request.
1619
1620    :ivar type: The resource type is private link resource.
1621    :vartype type: str
1622    :param id: The resource ID.
1623    :type id: str
1624    :param name: The name of the resource.
1625    :type name: str
1626    :param group_id: The private link resource group id.
1627    :type group_id: str
1628    :param required_members: The private link resource required member names.
1629    :type required_members: list[str]
1630    :param required_zone_names: The private link resource Private link DNS zone name.
1631    :type required_zone_names: list[str]
1632    """
1633
1634    _validation = {
1635        'type': {'readonly': True},
1636    }
1637
1638    _attribute_map = {
1639        'type': {'key': 'type', 'type': 'str'},
1640        'id': {'key': 'id', 'type': 'str'},
1641        'name': {'key': 'name', 'type': 'str'},
1642        'group_id': {'key': 'properties.groupId', 'type': 'str'},
1643        'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'},
1644        'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'},
1645    }
1646
1647    def __init__(
1648        self,
1649        *,
1650        id: Optional[str] = None,
1651        name: Optional[str] = None,
1652        group_id: Optional[str] = None,
1653        required_members: Optional[List[str]] = None,
1654        required_zone_names: Optional[List[str]] = None,
1655        **kwargs
1656    ):
1657        super(PrivateLinkResource, self).__init__(**kwargs)
1658        self.type = None
1659        self.id = id
1660        self.name = name
1661        self.group_id = group_id
1662        self.required_members = required_members
1663        self.required_zone_names = required_zone_names
1664
1665
1666class PrivateLinkResourceListResult(msrest.serialization.Model):
1667    """The result of a request to list private link resources for a container registry.
1668
1669    :param value: The list of private link resources. Since this list may be incomplete, the
1670     nextLink field should be used to request the next list of private link resources.
1671    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateLinkResource]
1672    :param next_link: The URI that can be used to request the next list of private link resources.
1673    :type next_link: str
1674    """
1675
1676    _attribute_map = {
1677        'value': {'key': 'value', 'type': '[PrivateLinkResource]'},
1678        'next_link': {'key': 'nextLink', 'type': 'str'},
1679    }
1680
1681    def __init__(
1682        self,
1683        *,
1684        value: Optional[List["PrivateLinkResource"]] = None,
1685        next_link: Optional[str] = None,
1686        **kwargs
1687    ):
1688        super(PrivateLinkResourceListResult, self).__init__(**kwargs)
1689        self.value = value
1690        self.next_link = next_link
1691
1692
1693class PrivateLinkServiceConnectionState(msrest.serialization.Model):
1694    """The state of a private link service connection.
1695
1696    :param status: The private link service connection status. Possible values include: "Approved",
1697     "Pending", "Rejected", "Disconnected".
1698    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ConnectionStatus
1699    :param description: The description for connection status. For example if connection is
1700     rejected it can indicate reason for rejection.
1701    :type description: str
1702    :param actions_required: A message indicating if changes on the service provider require any
1703     updates on the consumer. Possible values include: "None", "Recreate".
1704    :type actions_required: str or
1705     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ActionsRequired
1706    """
1707
1708    _attribute_map = {
1709        'status': {'key': 'status', 'type': 'str'},
1710        'description': {'key': 'description', 'type': 'str'},
1711        'actions_required': {'key': 'actionsRequired', 'type': 'str'},
1712    }
1713
1714    def __init__(
1715        self,
1716        *,
1717        status: Optional[Union[str, "ConnectionStatus"]] = None,
1718        description: Optional[str] = None,
1719        actions_required: Optional[Union[str, "ActionsRequired"]] = None,
1720        **kwargs
1721    ):
1722        super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
1723        self.status = status
1724        self.description = description
1725        self.actions_required = actions_required
1726
1727
1728class ProgressProperties(msrest.serialization.Model):
1729    """ProgressProperties.
1730
1731    :param percentage: The percentage complete of the copy operation.
1732    :type percentage: str
1733    """
1734
1735    _attribute_map = {
1736        'percentage': {'key': 'percentage', 'type': 'str'},
1737    }
1738
1739    def __init__(
1740        self,
1741        *,
1742        percentage: Optional[str] = None,
1743        **kwargs
1744    ):
1745        super(ProgressProperties, self).__init__(**kwargs)
1746        self.percentage = percentage
1747
1748
1749class QuarantinePolicy(msrest.serialization.Model):
1750    """The quarantine policy for a container registry.
1751
1752    :param status: The value that indicates whether the policy is enabled or not. Possible values
1753     include: "enabled", "disabled".
1754    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PolicyStatus
1755    """
1756
1757    _attribute_map = {
1758        'status': {'key': 'status', 'type': 'str'},
1759    }
1760
1761    def __init__(
1762        self,
1763        *,
1764        status: Optional[Union[str, "PolicyStatus"]] = None,
1765        **kwargs
1766    ):
1767        super(QuarantinePolicy, self).__init__(**kwargs)
1768        self.status = status
1769
1770
1771class RegenerateCredentialParameters(msrest.serialization.Model):
1772    """The parameters used to regenerate the login credential.
1773
1774    All required parameters must be populated in order to send to Azure.
1775
1776    :param name: Required. Specifies name of the password which should be regenerated -- password
1777     or password2. Possible values include: "password", "password2".
1778    :type name: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PasswordName
1779    """
1780
1781    _validation = {
1782        'name': {'required': True},
1783    }
1784
1785    _attribute_map = {
1786        'name': {'key': 'name', 'type': 'str'},
1787    }
1788
1789    def __init__(
1790        self,
1791        *,
1792        name: Union[str, "PasswordName"],
1793        **kwargs
1794    ):
1795        super(RegenerateCredentialParameters, self).__init__(**kwargs)
1796        self.name = name
1797
1798
1799class Resource(msrest.serialization.Model):
1800    """An Azure resource.
1801
1802    Variables are only populated by the server, and will be ignored when sending a request.
1803
1804    All required parameters must be populated in order to send to Azure.
1805
1806    :ivar id: The resource ID.
1807    :vartype id: str
1808    :ivar name: The name of the resource.
1809    :vartype name: str
1810    :ivar type: The type of the resource.
1811    :vartype type: str
1812    :param location: Required. The location of the resource. This cannot be changed after the
1813     resource is created.
1814    :type location: str
1815    :param tags: A set of tags. The tags of the resource.
1816    :type tags: dict[str, str]
1817    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1818    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
1819    """
1820
1821    _validation = {
1822        'id': {'readonly': True},
1823        'name': {'readonly': True},
1824        'type': {'readonly': True},
1825        'location': {'required': True},
1826        'system_data': {'readonly': True},
1827    }
1828
1829    _attribute_map = {
1830        'id': {'key': 'id', 'type': 'str'},
1831        'name': {'key': 'name', 'type': 'str'},
1832        'type': {'key': 'type', 'type': 'str'},
1833        'location': {'key': 'location', 'type': 'str'},
1834        'tags': {'key': 'tags', 'type': '{str}'},
1835        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1836    }
1837
1838    def __init__(
1839        self,
1840        *,
1841        location: str,
1842        tags: Optional[Dict[str, str]] = None,
1843        **kwargs
1844    ):
1845        super(Resource, self).__init__(**kwargs)
1846        self.id = None
1847        self.name = None
1848        self.type = None
1849        self.location = location
1850        self.tags = tags
1851        self.system_data = None
1852
1853
1854class Registry(Resource):
1855    """An object that represents a container registry.
1856
1857    Variables are only populated by the server, and will be ignored when sending a request.
1858
1859    All required parameters must be populated in order to send to Azure.
1860
1861    :ivar id: The resource ID.
1862    :vartype id: str
1863    :ivar name: The name of the resource.
1864    :vartype name: str
1865    :ivar type: The type of the resource.
1866    :vartype type: str
1867    :param location: Required. The location of the resource. This cannot be changed after the
1868     resource is created.
1869    :type location: str
1870    :param tags: A set of tags. The tags of the resource.
1871    :type tags: dict[str, str]
1872    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1873    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
1874    :param sku: Required. The SKU of the container registry.
1875    :type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku
1876    :param identity: The identity of the container registry.
1877    :type identity: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
1878    :ivar login_server: The URL that can be used to log into the container registry.
1879    :vartype login_server: str
1880    :ivar creation_date: The creation date of the container registry in ISO8601 format.
1881    :vartype creation_date: ~datetime.datetime
1882    :ivar provisioning_state: The provisioning state of the container registry at the time the
1883     operation was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded",
1884     "Failed", "Canceled".
1885    :vartype provisioning_state: str or
1886     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
1887    :ivar status: The status of the container registry at the time the operation was called.
1888    :vartype status: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Status
1889    :param admin_user_enabled: The value that indicates whether the admin user is enabled.
1890    :type admin_user_enabled: bool
1891    :param network_rule_set: The network rule set for a container registry.
1892    :type network_rule_set: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleSet
1893    :param policies: The policies for a container registry.
1894    :type policies: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Policies
1895    :param encryption: The encryption settings of container registry.
1896    :type encryption: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.EncryptionProperty
1897    :param data_endpoint_enabled: Enable a single data endpoint per region for serving data.
1898    :type data_endpoint_enabled: bool
1899    :ivar data_endpoint_host_names: List of host names that will serve data when
1900     dataEndpointEnabled is true.
1901    :vartype data_endpoint_host_names: list[str]
1902    :ivar private_endpoint_connections: List of private endpoint connections for a container
1903     registry.
1904    :vartype private_endpoint_connections:
1905     list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.PrivateEndpointConnection]
1906    :param public_network_access: Whether or not public network access is allowed for the container
1907     registry. Possible values include: "Enabled", "Disabled".
1908    :type public_network_access: str or
1909     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
1910    :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network
1911     restricted registry. Possible values include: "AzureServices", "None".
1912    :type network_rule_bypass_options: str or
1913     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
1914    """
1915
1916    _validation = {
1917        'id': {'readonly': True},
1918        'name': {'readonly': True},
1919        'type': {'readonly': True},
1920        'location': {'required': True},
1921        'system_data': {'readonly': True},
1922        'sku': {'required': True},
1923        'login_server': {'readonly': True},
1924        'creation_date': {'readonly': True},
1925        'provisioning_state': {'readonly': True},
1926        'status': {'readonly': True},
1927        'data_endpoint_host_names': {'readonly': True},
1928        'private_endpoint_connections': {'readonly': True},
1929    }
1930
1931    _attribute_map = {
1932        'id': {'key': 'id', 'type': 'str'},
1933        'name': {'key': 'name', 'type': 'str'},
1934        'type': {'key': 'type', 'type': 'str'},
1935        'location': {'key': 'location', 'type': 'str'},
1936        'tags': {'key': 'tags', 'type': '{str}'},
1937        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1938        'sku': {'key': 'sku', 'type': 'Sku'},
1939        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
1940        'login_server': {'key': 'properties.loginServer', 'type': 'str'},
1941        'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
1942        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1943        'status': {'key': 'properties.status', 'type': 'Status'},
1944        'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
1945        'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
1946        'policies': {'key': 'properties.policies', 'type': 'Policies'},
1947        'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
1948        'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
1949        'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'},
1950        'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
1951        'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
1952        'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
1953    }
1954
1955    def __init__(
1956        self,
1957        *,
1958        location: str,
1959        sku: "Sku",
1960        tags: Optional[Dict[str, str]] = None,
1961        identity: Optional["IdentityProperties"] = None,
1962        admin_user_enabled: Optional[bool] = False,
1963        network_rule_set: Optional["NetworkRuleSet"] = None,
1964        policies: Optional["Policies"] = None,
1965        encryption: Optional["EncryptionProperty"] = None,
1966        data_endpoint_enabled: Optional[bool] = None,
1967        public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None,
1968        network_rule_bypass_options: Optional[Union[str, "NetworkRuleBypassOptions"]] = None,
1969        **kwargs
1970    ):
1971        super(Registry, self).__init__(location=location, tags=tags, **kwargs)
1972        self.sku = sku
1973        self.identity = identity
1974        self.login_server = None
1975        self.creation_date = None
1976        self.provisioning_state = None
1977        self.status = None
1978        self.admin_user_enabled = admin_user_enabled
1979        self.network_rule_set = network_rule_set
1980        self.policies = policies
1981        self.encryption = encryption
1982        self.data_endpoint_enabled = data_endpoint_enabled
1983        self.data_endpoint_host_names = None
1984        self.private_endpoint_connections = None
1985        self.public_network_access = public_network_access
1986        self.network_rule_bypass_options = network_rule_bypass_options
1987
1988
1989class RegistryListCredentialsResult(msrest.serialization.Model):
1990    """The response from the ListCredentials operation.
1991
1992    :param username: The username for a container registry.
1993    :type username: str
1994    :param passwords: The list of passwords for a container registry.
1995    :type passwords:
1996     list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.RegistryPassword]
1997    """
1998
1999    _attribute_map = {
2000        'username': {'key': 'username', 'type': 'str'},
2001        'passwords': {'key': 'passwords', 'type': '[RegistryPassword]'},
2002    }
2003
2004    def __init__(
2005        self,
2006        *,
2007        username: Optional[str] = None,
2008        passwords: Optional[List["RegistryPassword"]] = None,
2009        **kwargs
2010    ):
2011        super(RegistryListCredentialsResult, self).__init__(**kwargs)
2012        self.username = username
2013        self.passwords = passwords
2014
2015
2016class RegistryListResult(msrest.serialization.Model):
2017    """The result of a request to list container registries.
2018
2019    :param value: The list of container registries. Since this list may be incomplete, the nextLink
2020     field should be used to request the next list of container registries.
2021    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.Registry]
2022    :param next_link: The URI that can be used to request the next list of container registries.
2023    :type next_link: str
2024    """
2025
2026    _attribute_map = {
2027        'value': {'key': 'value', 'type': '[Registry]'},
2028        'next_link': {'key': 'nextLink', 'type': 'str'},
2029    }
2030
2031    def __init__(
2032        self,
2033        *,
2034        value: Optional[List["Registry"]] = None,
2035        next_link: Optional[str] = None,
2036        **kwargs
2037    ):
2038        super(RegistryListResult, self).__init__(**kwargs)
2039        self.value = value
2040        self.next_link = next_link
2041
2042
2043class RegistryNameCheckRequest(msrest.serialization.Model):
2044    """A request to check whether a container registry name is available.
2045
2046    Variables are only populated by the server, and will be ignored when sending a request.
2047
2048    All required parameters must be populated in order to send to Azure.
2049
2050    :param name: Required. The name of the container registry.
2051    :type name: str
2052    :ivar type: The resource type of the container registry. This field must be set to
2053     'Microsoft.ContainerRegistry/registries'. Has constant value:
2054     "Microsoft.ContainerRegistry/registries".
2055    :vartype type: str
2056    """
2057
2058    _validation = {
2059        'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'},
2060        'type': {'required': True, 'constant': True},
2061    }
2062
2063    _attribute_map = {
2064        'name': {'key': 'name', 'type': 'str'},
2065        'type': {'key': 'type', 'type': 'str'},
2066    }
2067
2068    type = "Microsoft.ContainerRegistry/registries"
2069
2070    def __init__(
2071        self,
2072        *,
2073        name: str,
2074        **kwargs
2075    ):
2076        super(RegistryNameCheckRequest, self).__init__(**kwargs)
2077        self.name = name
2078
2079
2080class RegistryNameStatus(msrest.serialization.Model):
2081    """The result of a request to check the availability of a container registry name.
2082
2083    :param name_available: The value that indicates whether the name is available.
2084    :type name_available: bool
2085    :param reason: If any, the reason that the name is not available.
2086    :type reason: str
2087    :param message: If any, the error message that provides more detail for the reason that the
2088     name is not available.
2089    :type message: str
2090    """
2091
2092    _attribute_map = {
2093        'name_available': {'key': 'nameAvailable', 'type': 'bool'},
2094        'reason': {'key': 'reason', 'type': 'str'},
2095        'message': {'key': 'message', 'type': 'str'},
2096    }
2097
2098    def __init__(
2099        self,
2100        *,
2101        name_available: Optional[bool] = None,
2102        reason: Optional[str] = None,
2103        message: Optional[str] = None,
2104        **kwargs
2105    ):
2106        super(RegistryNameStatus, self).__init__(**kwargs)
2107        self.name_available = name_available
2108        self.reason = reason
2109        self.message = message
2110
2111
2112class RegistryPassword(msrest.serialization.Model):
2113    """The login password for the container registry.
2114
2115    :param name: The password name. Possible values include: "password", "password2".
2116    :type name: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PasswordName
2117    :param value: The password value.
2118    :type value: str
2119    """
2120
2121    _attribute_map = {
2122        'name': {'key': 'name', 'type': 'str'},
2123        'value': {'key': 'value', 'type': 'str'},
2124    }
2125
2126    def __init__(
2127        self,
2128        *,
2129        name: Optional[Union[str, "PasswordName"]] = None,
2130        value: Optional[str] = None,
2131        **kwargs
2132    ):
2133        super(RegistryPassword, self).__init__(**kwargs)
2134        self.name = name
2135        self.value = value
2136
2137
2138class RegistryUpdateParameters(msrest.serialization.Model):
2139    """The parameters for updating a container registry.
2140
2141    :param identity: The identity of the container registry.
2142    :type identity: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
2143    :param tags: A set of tags. The tags for the container registry.
2144    :type tags: dict[str, str]
2145    :param sku: The SKU of the container registry.
2146    :type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku
2147    :param admin_user_enabled: The value that indicates whether the admin user is enabled.
2148    :type admin_user_enabled: bool
2149    :param network_rule_set: The network rule set for a container registry.
2150    :type network_rule_set: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleSet
2151    :param policies: The policies for a container registry.
2152    :type policies: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Policies
2153    :param encryption: The encryption settings of container registry.
2154    :type encryption: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.EncryptionProperty
2155    :param data_endpoint_enabled: Enable a single data endpoint per region for serving data.
2156    :type data_endpoint_enabled: bool
2157    :param public_network_access: Whether or not public network access is allowed for the container
2158     registry. Possible values include: "Enabled", "Disabled".
2159    :type public_network_access: str or
2160     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
2161    :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network
2162     restricted registry. Possible values include: "AzureServices", "None".
2163    :type network_rule_bypass_options: str or
2164     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
2165    """
2166
2167    _attribute_map = {
2168        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2169        'tags': {'key': 'tags', 'type': '{str}'},
2170        'sku': {'key': 'sku', 'type': 'Sku'},
2171        'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
2172        'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
2173        'policies': {'key': 'properties.policies', 'type': 'Policies'},
2174        'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
2175        'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
2176        'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
2177        'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
2178    }
2179
2180    def __init__(
2181        self,
2182        *,
2183        identity: Optional["IdentityProperties"] = None,
2184        tags: Optional[Dict[str, str]] = None,
2185        sku: Optional["Sku"] = None,
2186        admin_user_enabled: Optional[bool] = None,
2187        network_rule_set: Optional["NetworkRuleSet"] = None,
2188        policies: Optional["Policies"] = None,
2189        encryption: Optional["EncryptionProperty"] = None,
2190        data_endpoint_enabled: Optional[bool] = None,
2191        public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None,
2192        network_rule_bypass_options: Optional[Union[str, "NetworkRuleBypassOptions"]] = None,
2193        **kwargs
2194    ):
2195        super(RegistryUpdateParameters, self).__init__(**kwargs)
2196        self.identity = identity
2197        self.tags = tags
2198        self.sku = sku
2199        self.admin_user_enabled = admin_user_enabled
2200        self.network_rule_set = network_rule_set
2201        self.policies = policies
2202        self.encryption = encryption
2203        self.data_endpoint_enabled = data_endpoint_enabled
2204        self.public_network_access = public_network_access
2205        self.network_rule_bypass_options = network_rule_bypass_options
2206
2207
2208class RegistryUsage(msrest.serialization.Model):
2209    """The quota usage for a container registry.
2210
2211    :param name: The name of the usage.
2212    :type name: str
2213    :param limit: The limit of the usage.
2214    :type limit: long
2215    :param current_value: The current value of the usage.
2216    :type current_value: long
2217    :param unit: The unit of measurement. Possible values include: "Count", "Bytes".
2218    :type unit: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.RegistryUsageUnit
2219    """
2220
2221    _attribute_map = {
2222        'name': {'key': 'name', 'type': 'str'},
2223        'limit': {'key': 'limit', 'type': 'long'},
2224        'current_value': {'key': 'currentValue', 'type': 'long'},
2225        'unit': {'key': 'unit', 'type': 'str'},
2226    }
2227
2228    def __init__(
2229        self,
2230        *,
2231        name: Optional[str] = None,
2232        limit: Optional[int] = None,
2233        current_value: Optional[int] = None,
2234        unit: Optional[Union[str, "RegistryUsageUnit"]] = None,
2235        **kwargs
2236    ):
2237        super(RegistryUsage, self).__init__(**kwargs)
2238        self.name = name
2239        self.limit = limit
2240        self.current_value = current_value
2241        self.unit = unit
2242
2243
2244class RegistryUsageListResult(msrest.serialization.Model):
2245    """The result of a request to get container registry quota usages.
2246
2247    :param value: The list of container registry quota usages.
2248    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.RegistryUsage]
2249    """
2250
2251    _attribute_map = {
2252        'value': {'key': 'value', 'type': '[RegistryUsage]'},
2253    }
2254
2255    def __init__(
2256        self,
2257        *,
2258        value: Optional[List["RegistryUsage"]] = None,
2259        **kwargs
2260    ):
2261        super(RegistryUsageListResult, self).__init__(**kwargs)
2262        self.value = value
2263
2264
2265class Replication(Resource):
2266    """An object that represents a replication for a container registry.
2267
2268    Variables are only populated by the server, and will be ignored when sending a request.
2269
2270    All required parameters must be populated in order to send to Azure.
2271
2272    :ivar id: The resource ID.
2273    :vartype id: str
2274    :ivar name: The name of the resource.
2275    :vartype name: str
2276    :ivar type: The type of the resource.
2277    :vartype type: str
2278    :param location: Required. The location of the resource. This cannot be changed after the
2279     resource is created.
2280    :type location: str
2281    :param tags: A set of tags. The tags of the resource.
2282    :type tags: dict[str, str]
2283    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2284    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
2285    :ivar provisioning_state: The provisioning state of the replication at the time the operation
2286     was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
2287     "Canceled".
2288    :vartype provisioning_state: str or
2289     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
2290    :ivar status: The status of the replication at the time the operation was called.
2291    :vartype status: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Status
2292    :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is
2293     enabled. Requests will not be routed to a replication whose regional endpoint is disabled,
2294     however its data will continue to be synced with other replications.
2295    :type region_endpoint_enabled: bool
2296    """
2297
2298    _validation = {
2299        'id': {'readonly': True},
2300        'name': {'readonly': True},
2301        'type': {'readonly': True},
2302        'location': {'required': True},
2303        'system_data': {'readonly': True},
2304        'provisioning_state': {'readonly': True},
2305        'status': {'readonly': True},
2306    }
2307
2308    _attribute_map = {
2309        'id': {'key': 'id', 'type': 'str'},
2310        'name': {'key': 'name', 'type': 'str'},
2311        'type': {'key': 'type', 'type': 'str'},
2312        'location': {'key': 'location', 'type': 'str'},
2313        'tags': {'key': 'tags', 'type': '{str}'},
2314        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2315        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2316        'status': {'key': 'properties.status', 'type': 'Status'},
2317        'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'},
2318    }
2319
2320    def __init__(
2321        self,
2322        *,
2323        location: str,
2324        tags: Optional[Dict[str, str]] = None,
2325        region_endpoint_enabled: Optional[bool] = True,
2326        **kwargs
2327    ):
2328        super(Replication, self).__init__(location=location, tags=tags, **kwargs)
2329        self.provisioning_state = None
2330        self.status = None
2331        self.region_endpoint_enabled = region_endpoint_enabled
2332
2333
2334class ReplicationListResult(msrest.serialization.Model):
2335    """The result of a request to list replications for a container registry.
2336
2337    :param value: The list of replications. Since this list may be incomplete, the nextLink field
2338     should be used to request the next list of replications.
2339    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.Replication]
2340    :param next_link: The URI that can be used to request the next list of replications.
2341    :type next_link: str
2342    """
2343
2344    _attribute_map = {
2345        'value': {'key': 'value', 'type': '[Replication]'},
2346        'next_link': {'key': 'nextLink', 'type': 'str'},
2347    }
2348
2349    def __init__(
2350        self,
2351        *,
2352        value: Optional[List["Replication"]] = None,
2353        next_link: Optional[str] = None,
2354        **kwargs
2355    ):
2356        super(ReplicationListResult, self).__init__(**kwargs)
2357        self.value = value
2358        self.next_link = next_link
2359
2360
2361class ReplicationUpdateParameters(msrest.serialization.Model):
2362    """The parameters for updating a replication.
2363
2364    :param tags: A set of tags. The tags for the replication.
2365    :type tags: dict[str, str]
2366    :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is
2367     enabled. Requests will not be routed to a replication whose regional endpoint is disabled,
2368     however its data will continue to be synced with other replications.
2369    :type region_endpoint_enabled: bool
2370    """
2371
2372    _attribute_map = {
2373        'tags': {'key': 'tags', 'type': '{str}'},
2374        'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'},
2375    }
2376
2377    def __init__(
2378        self,
2379        *,
2380        tags: Optional[Dict[str, str]] = None,
2381        region_endpoint_enabled: Optional[bool] = None,
2382        **kwargs
2383    ):
2384        super(ReplicationUpdateParameters, self).__init__(**kwargs)
2385        self.tags = tags
2386        self.region_endpoint_enabled = region_endpoint_enabled
2387
2388
2389class Request(msrest.serialization.Model):
2390    """The request that generated the event.
2391
2392    :param id: The ID of the request that initiated the event.
2393    :type id: str
2394    :param addr: The IP or hostname and possibly port of the client connection that initiated the
2395     event. This is the RemoteAddr from the standard http request.
2396    :type addr: str
2397    :param host: The externally accessible hostname of the registry instance, as specified by the
2398     http host header on incoming requests.
2399    :type host: str
2400    :param method: The request method that generated the event.
2401    :type method: str
2402    :param useragent: The user agent header of the request.
2403    :type useragent: str
2404    """
2405
2406    _attribute_map = {
2407        'id': {'key': 'id', 'type': 'str'},
2408        'addr': {'key': 'addr', 'type': 'str'},
2409        'host': {'key': 'host', 'type': 'str'},
2410        'method': {'key': 'method', 'type': 'str'},
2411        'useragent': {'key': 'useragent', 'type': 'str'},
2412    }
2413
2414    def __init__(
2415        self,
2416        *,
2417        id: Optional[str] = None,
2418        addr: Optional[str] = None,
2419        host: Optional[str] = None,
2420        method: Optional[str] = None,
2421        useragent: Optional[str] = None,
2422        **kwargs
2423    ):
2424        super(Request, self).__init__(**kwargs)
2425        self.id = id
2426        self.addr = addr
2427        self.host = host
2428        self.method = method
2429        self.useragent = useragent
2430
2431
2432class RetentionPolicy(msrest.serialization.Model):
2433    """The retention policy for a container registry.
2434
2435    Variables are only populated by the server, and will be ignored when sending a request.
2436
2437    :param days: The number of days to retain an untagged manifest after which it gets purged.
2438    :type days: int
2439    :ivar last_updated_time: The timestamp when the policy was last updated.
2440    :vartype last_updated_time: ~datetime.datetime
2441    :param status: The value that indicates whether the policy is enabled or not. Possible values
2442     include: "enabled", "disabled".
2443    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PolicyStatus
2444    """
2445
2446    _validation = {
2447        'last_updated_time': {'readonly': True},
2448    }
2449
2450    _attribute_map = {
2451        'days': {'key': 'days', 'type': 'int'},
2452        'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'},
2453        'status': {'key': 'status', 'type': 'str'},
2454    }
2455
2456    def __init__(
2457        self,
2458        *,
2459        days: Optional[int] = 7,
2460        status: Optional[Union[str, "PolicyStatus"]] = None,
2461        **kwargs
2462    ):
2463        super(RetentionPolicy, self).__init__(**kwargs)
2464        self.days = days
2465        self.last_updated_time = None
2466        self.status = status
2467
2468
2469class Sku(msrest.serialization.Model):
2470    """The SKU of a container registry.
2471
2472    Variables are only populated by the server, and will be ignored when sending a request.
2473
2474    All required parameters must be populated in order to send to Azure.
2475
2476    :param name: Required. The SKU name of the container registry. Required for registry creation.
2477     Possible values include: "Classic", "Basic", "Standard", "Premium".
2478    :type name: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SkuName
2479    :ivar tier: The SKU tier based on the SKU name. Possible values include: "Classic", "Basic",
2480     "Standard", "Premium".
2481    :vartype tier: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SkuTier
2482    """
2483
2484    _validation = {
2485        'name': {'required': True},
2486        'tier': {'readonly': True},
2487    }
2488
2489    _attribute_map = {
2490        'name': {'key': 'name', 'type': 'str'},
2491        'tier': {'key': 'tier', 'type': 'str'},
2492    }
2493
2494    def __init__(
2495        self,
2496        *,
2497        name: Union[str, "SkuName"],
2498        **kwargs
2499    ):
2500        super(Sku, self).__init__(**kwargs)
2501        self.name = name
2502        self.tier = None
2503
2504
2505class Source(msrest.serialization.Model):
2506    """The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
2507
2508    :param addr: The IP or hostname and the port of the registry node that generated the event.
2509     Generally, this will be resolved by os.Hostname() along with the running port.
2510    :type addr: str
2511    :param instance_id: The running instance of an application. Changes after each restart.
2512    :type instance_id: str
2513    """
2514
2515    _attribute_map = {
2516        'addr': {'key': 'addr', 'type': 'str'},
2517        'instance_id': {'key': 'instanceID', 'type': 'str'},
2518    }
2519
2520    def __init__(
2521        self,
2522        *,
2523        addr: Optional[str] = None,
2524        instance_id: Optional[str] = None,
2525        **kwargs
2526    ):
2527        super(Source, self).__init__(**kwargs)
2528        self.addr = addr
2529        self.instance_id = instance_id
2530
2531
2532class Status(msrest.serialization.Model):
2533    """The status of an Azure resource at the time the operation was called.
2534
2535    Variables are only populated by the server, and will be ignored when sending a request.
2536
2537    :ivar display_status: The short label for the status.
2538    :vartype display_status: str
2539    :ivar message: The detailed message for the status, including alerts and error messages.
2540    :vartype message: str
2541    :ivar timestamp: The timestamp when the status was changed to the current value.
2542    :vartype timestamp: ~datetime.datetime
2543    """
2544
2545    _validation = {
2546        'display_status': {'readonly': True},
2547        'message': {'readonly': True},
2548        'timestamp': {'readonly': True},
2549    }
2550
2551    _attribute_map = {
2552        'display_status': {'key': 'displayStatus', 'type': 'str'},
2553        'message': {'key': 'message', 'type': 'str'},
2554        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
2555    }
2556
2557    def __init__(
2558        self,
2559        **kwargs
2560    ):
2561        super(Status, self).__init__(**kwargs)
2562        self.display_status = None
2563        self.message = None
2564        self.timestamp = None
2565
2566
2567class SystemData(msrest.serialization.Model):
2568    """Metadata pertaining to creation and last modification of the resource.
2569
2570    :param created_by: The identity that created the resource.
2571    :type created_by: str
2572    :param created_by_type: The type of identity that created the resource. Possible values
2573     include: "User", "Application", "ManagedIdentity", "Key".
2574    :type created_by_type: str or
2575     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.CreatedByType
2576    :param created_at: The timestamp of resource creation (UTC).
2577    :type created_at: ~datetime.datetime
2578    :param last_modified_by: The identity that last modified the resource.
2579    :type last_modified_by: str
2580    :param last_modified_by_type: The type of identity that last modified the resource. Possible
2581     values include: "User", "Application", "ManagedIdentity", "Key".
2582    :type last_modified_by_type: str or
2583     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.LastModifiedByType
2584    :param last_modified_at: The timestamp of resource modification (UTC).
2585    :type last_modified_at: ~datetime.datetime
2586    """
2587
2588    _attribute_map = {
2589        'created_by': {'key': 'createdBy', 'type': 'str'},
2590        'created_by_type': {'key': 'createdByType', 'type': 'str'},
2591        'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
2592        'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
2593        'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
2594        'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
2595    }
2596
2597    def __init__(
2598        self,
2599        *,
2600        created_by: Optional[str] = None,
2601        created_by_type: Optional[Union[str, "CreatedByType"]] = None,
2602        created_at: Optional[datetime.datetime] = None,
2603        last_modified_by: Optional[str] = None,
2604        last_modified_by_type: Optional[Union[str, "LastModifiedByType"]] = None,
2605        last_modified_at: Optional[datetime.datetime] = None,
2606        **kwargs
2607    ):
2608        super(SystemData, self).__init__(**kwargs)
2609        self.created_by = created_by
2610        self.created_by_type = created_by_type
2611        self.created_at = created_at
2612        self.last_modified_by = last_modified_by
2613        self.last_modified_by_type = last_modified_by_type
2614        self.last_modified_at = last_modified_at
2615
2616
2617class Target(msrest.serialization.Model):
2618    """The target of the event.
2619
2620    :param media_type: The MIME type of the referenced object.
2621    :type media_type: str
2622    :param size: The number of bytes of the content. Same as Length field.
2623    :type size: long
2624    :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification.
2625    :type digest: str
2626    :param length: The number of bytes of the content. Same as Size field.
2627    :type length: long
2628    :param repository: The repository name.
2629    :type repository: str
2630    :param url: The direct URL to the content.
2631    :type url: str
2632    :param tag: The tag name.
2633    :type tag: str
2634    :param name: The name of the artifact.
2635    :type name: str
2636    :param version: The version of the artifact.
2637    :type version: str
2638    """
2639
2640    _attribute_map = {
2641        'media_type': {'key': 'mediaType', 'type': 'str'},
2642        'size': {'key': 'size', 'type': 'long'},
2643        'digest': {'key': 'digest', 'type': 'str'},
2644        'length': {'key': 'length', 'type': 'long'},
2645        'repository': {'key': 'repository', 'type': 'str'},
2646        'url': {'key': 'url', 'type': 'str'},
2647        'tag': {'key': 'tag', 'type': 'str'},
2648        'name': {'key': 'name', 'type': 'str'},
2649        'version': {'key': 'version', 'type': 'str'},
2650    }
2651
2652    def __init__(
2653        self,
2654        *,
2655        media_type: Optional[str] = None,
2656        size: Optional[int] = None,
2657        digest: Optional[str] = None,
2658        length: Optional[int] = None,
2659        repository: Optional[str] = None,
2660        url: Optional[str] = None,
2661        tag: Optional[str] = None,
2662        name: Optional[str] = None,
2663        version: Optional[str] = None,
2664        **kwargs
2665    ):
2666        super(Target, self).__init__(**kwargs)
2667        self.media_type = media_type
2668        self.size = size
2669        self.digest = digest
2670        self.length = length
2671        self.repository = repository
2672        self.url = url
2673        self.tag = tag
2674        self.name = name
2675        self.version = version
2676
2677
2678class TrustPolicy(msrest.serialization.Model):
2679    """The content trust policy for a container registry.
2680
2681    :param type: The type of trust policy. Possible values include: "Notary". Default value:
2682     "Notary".
2683    :type type: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.TrustPolicyType
2684    :param status: The value that indicates whether the policy is enabled or not. Possible values
2685     include: "enabled", "disabled".
2686    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PolicyStatus
2687    """
2688
2689    _attribute_map = {
2690        'type': {'key': 'type', 'type': 'str'},
2691        'status': {'key': 'status', 'type': 'str'},
2692    }
2693
2694    def __init__(
2695        self,
2696        *,
2697        type: Optional[Union[str, "TrustPolicyType"]] = "Notary",
2698        status: Optional[Union[str, "PolicyStatus"]] = None,
2699        **kwargs
2700    ):
2701        super(TrustPolicy, self).__init__(**kwargs)
2702        self.type = type
2703        self.status = status
2704
2705
2706class UserIdentityProperties(msrest.serialization.Model):
2707    """UserIdentityProperties.
2708
2709    :param principal_id: The principal id of user assigned identity.
2710    :type principal_id: str
2711    :param client_id: The client id of user assigned identity.
2712    :type client_id: str
2713    """
2714
2715    _attribute_map = {
2716        'principal_id': {'key': 'principalId', 'type': 'str'},
2717        'client_id': {'key': 'clientId', 'type': 'str'},
2718    }
2719
2720    def __init__(
2721        self,
2722        *,
2723        principal_id: Optional[str] = None,
2724        client_id: Optional[str] = None,
2725        **kwargs
2726    ):
2727        super(UserIdentityProperties, self).__init__(**kwargs)
2728        self.principal_id = principal_id
2729        self.client_id = client_id
2730
2731
2732class VirtualNetworkRule(msrest.serialization.Model):
2733    """Virtual network rule.
2734
2735    All required parameters must be populated in order to send to Azure.
2736
2737    :param action: The action of virtual network rule. Possible values include: "Allow".
2738    :type action: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Action
2739    :param virtual_network_resource_id: Required. Resource ID of a subnet, for example:
2740     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
2741    :type virtual_network_resource_id: str
2742    """
2743
2744    _validation = {
2745        'virtual_network_resource_id': {'required': True},
2746    }
2747
2748    _attribute_map = {
2749        'action': {'key': 'action', 'type': 'str'},
2750        'virtual_network_resource_id': {'key': 'id', 'type': 'str'},
2751    }
2752
2753    def __init__(
2754        self,
2755        *,
2756        virtual_network_resource_id: str,
2757        action: Optional[Union[str, "Action"]] = None,
2758        **kwargs
2759    ):
2760        super(VirtualNetworkRule, self).__init__(**kwargs)
2761        self.action = action
2762        self.virtual_network_resource_id = virtual_network_resource_id
2763
2764
2765class Webhook(Resource):
2766    """An object that represents a webhook for a container registry.
2767
2768    Variables are only populated by the server, and will be ignored when sending a request.
2769
2770    All required parameters must be populated in order to send to Azure.
2771
2772    :ivar id: The resource ID.
2773    :vartype id: str
2774    :ivar name: The name of the resource.
2775    :vartype name: str
2776    :ivar type: The type of the resource.
2777    :vartype type: str
2778    :param location: Required. The location of the resource. This cannot be changed after the
2779     resource is created.
2780    :type location: str
2781    :param tags: A set of tags. The tags of the resource.
2782    :type tags: dict[str, str]
2783    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2784    :vartype system_data: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.SystemData
2785    :param status: The status of the webhook at the time the operation was called. Possible values
2786     include: "enabled", "disabled".
2787    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.WebhookStatus
2788    :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*'
2789     means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only.
2790     'foo' is equivalent to 'foo:latest'. Empty means all events.
2791    :type scope: str
2792    :param actions: The list of actions that trigger the webhook to post notifications.
2793    :type actions: list[str or
2794     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.WebhookAction]
2795    :ivar provisioning_state: The provisioning state of the webhook at the time the operation was
2796     called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed",
2797     "Canceled".
2798    :vartype provisioning_state: str or
2799     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.ProvisioningState
2800    """
2801
2802    _validation = {
2803        'id': {'readonly': True},
2804        'name': {'readonly': True},
2805        'type': {'readonly': True},
2806        'location': {'required': True},
2807        'system_data': {'readonly': True},
2808        'provisioning_state': {'readonly': True},
2809    }
2810
2811    _attribute_map = {
2812        'id': {'key': 'id', 'type': 'str'},
2813        'name': {'key': 'name', 'type': 'str'},
2814        'type': {'key': 'type', 'type': 'str'},
2815        'location': {'key': 'location', 'type': 'str'},
2816        'tags': {'key': 'tags', 'type': '{str}'},
2817        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2818        'status': {'key': 'properties.status', 'type': 'str'},
2819        'scope': {'key': 'properties.scope', 'type': 'str'},
2820        'actions': {'key': 'properties.actions', 'type': '[str]'},
2821        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2822    }
2823
2824    def __init__(
2825        self,
2826        *,
2827        location: str,
2828        tags: Optional[Dict[str, str]] = None,
2829        status: Optional[Union[str, "WebhookStatus"]] = None,
2830        scope: Optional[str] = None,
2831        actions: Optional[List[Union[str, "WebhookAction"]]] = None,
2832        **kwargs
2833    ):
2834        super(Webhook, self).__init__(location=location, tags=tags, **kwargs)
2835        self.status = status
2836        self.scope = scope
2837        self.actions = actions
2838        self.provisioning_state = None
2839
2840
2841class WebhookCreateParameters(msrest.serialization.Model):
2842    """The parameters for creating a webhook.
2843
2844    All required parameters must be populated in order to send to Azure.
2845
2846    :param tags: A set of tags. The tags for the webhook.
2847    :type tags: dict[str, str]
2848    :param location: Required. The location of the webhook. This cannot be changed after the
2849     resource is created.
2850    :type location: str
2851    :param service_uri: The service URI for the webhook to post notifications.
2852    :type service_uri: str
2853    :param custom_headers: Custom headers that will be added to the webhook notifications.
2854    :type custom_headers: dict[str, str]
2855    :param status: The status of the webhook at the time the operation was called. Possible values
2856     include: "enabled", "disabled".
2857    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.WebhookStatus
2858    :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*'
2859     means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only.
2860     'foo' is equivalent to 'foo:latest'. Empty means all events.
2861    :type scope: str
2862    :param actions: The list of actions that trigger the webhook to post notifications.
2863    :type actions: list[str or
2864     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.WebhookAction]
2865    """
2866
2867    _validation = {
2868        'location': {'required': True},
2869    }
2870
2871    _attribute_map = {
2872        'tags': {'key': 'tags', 'type': '{str}'},
2873        'location': {'key': 'location', 'type': 'str'},
2874        'service_uri': {'key': 'properties.serviceUri', 'type': 'str'},
2875        'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'},
2876        'status': {'key': 'properties.status', 'type': 'str'},
2877        'scope': {'key': 'properties.scope', 'type': 'str'},
2878        'actions': {'key': 'properties.actions', 'type': '[str]'},
2879    }
2880
2881    def __init__(
2882        self,
2883        *,
2884        location: str,
2885        tags: Optional[Dict[str, str]] = None,
2886        service_uri: Optional[str] = None,
2887        custom_headers: Optional[Dict[str, str]] = None,
2888        status: Optional[Union[str, "WebhookStatus"]] = None,
2889        scope: Optional[str] = None,
2890        actions: Optional[List[Union[str, "WebhookAction"]]] = None,
2891        **kwargs
2892    ):
2893        super(WebhookCreateParameters, self).__init__(**kwargs)
2894        self.tags = tags
2895        self.location = location
2896        self.service_uri = service_uri
2897        self.custom_headers = custom_headers
2898        self.status = status
2899        self.scope = scope
2900        self.actions = actions
2901
2902
2903class WebhookListResult(msrest.serialization.Model):
2904    """The result of a request to list webhooks for a container registry.
2905
2906    :param value: The list of webhooks. Since this list may be incomplete, the nextLink field
2907     should be used to request the next list of webhooks.
2908    :type value: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.Webhook]
2909    :param next_link: The URI that can be used to request the next list of webhooks.
2910    :type next_link: str
2911    """
2912
2913    _attribute_map = {
2914        'value': {'key': 'value', 'type': '[Webhook]'},
2915        'next_link': {'key': 'nextLink', 'type': 'str'},
2916    }
2917
2918    def __init__(
2919        self,
2920        *,
2921        value: Optional[List["Webhook"]] = None,
2922        next_link: Optional[str] = None,
2923        **kwargs
2924    ):
2925        super(WebhookListResult, self).__init__(**kwargs)
2926        self.value = value
2927        self.next_link = next_link
2928
2929
2930class WebhookUpdateParameters(msrest.serialization.Model):
2931    """The parameters for updating a webhook.
2932
2933    :param tags: A set of tags. The tags for the webhook.
2934    :type tags: dict[str, str]
2935    :param service_uri: The service URI for the webhook to post notifications.
2936    :type service_uri: str
2937    :param custom_headers: Custom headers that will be added to the webhook notifications.
2938    :type custom_headers: dict[str, str]
2939    :param status: The status of the webhook at the time the operation was called. Possible values
2940     include: "enabled", "disabled".
2941    :type status: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.WebhookStatus
2942    :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*'
2943     means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only.
2944     'foo' is equivalent to 'foo:latest'. Empty means all events.
2945    :type scope: str
2946    :param actions: The list of actions that trigger the webhook to post notifications.
2947    :type actions: list[str or
2948     ~azure.mgmt.containerregistry.v2019_12_01_preview.models.WebhookAction]
2949    """
2950
2951    _attribute_map = {
2952        'tags': {'key': 'tags', 'type': '{str}'},
2953        'service_uri': {'key': 'properties.serviceUri', 'type': 'str'},
2954        'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'},
2955        'status': {'key': 'properties.status', 'type': 'str'},
2956        'scope': {'key': 'properties.scope', 'type': 'str'},
2957        'actions': {'key': 'properties.actions', 'type': '[str]'},
2958    }
2959
2960    def __init__(
2961        self,
2962        *,
2963        tags: Optional[Dict[str, str]] = None,
2964        service_uri: Optional[str] = None,
2965        custom_headers: Optional[Dict[str, str]] = None,
2966        status: Optional[Union[str, "WebhookStatus"]] = None,
2967        scope: Optional[str] = None,
2968        actions: Optional[List[Union[str, "WebhookAction"]]] = None,
2969        **kwargs
2970    ):
2971        super(WebhookUpdateParameters, self).__init__(**kwargs)
2972        self.tags = tags
2973        self.service_uri = service_uri
2974        self.custom_headers = custom_headers
2975        self.status = status
2976        self.scope = scope
2977        self.actions = actions
2978