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
5# license information.
6#
7# Code generated by Microsoft (R) AutoRest Code Generator.
8# Changes may cause incorrect behavior and will be lost if the code is
9# regenerated.
10# --------------------------------------------------------------------------
11
12from msrest.serialization import Model
13
14
15class CertificateBundle(Model):
16    """A certificate bundle consists of a certificate (X509) plus its attributes.
17
18    Variables are only populated by the server, and will be ignored when
19    sending a request.
20
21    :ivar id: The certificate id.
22    :vartype id: str
23    :ivar kid: The key id.
24    :vartype kid: str
25    :ivar sid: The secret id.
26    :vartype sid: str
27    :ivar x509_thumbprint: Thumbprint of the certificate.
28    :vartype x509_thumbprint: bytes
29    :ivar policy: The management policy.
30    :vartype policy: ~azure.keyvault.v2016_10_01.models.CertificatePolicy
31    :param cer: CER contents of x509 certificate.
32    :type cer: bytearray
33    :param content_type: The content type of the secret.
34    :type content_type: str
35    :param attributes: The certificate attributes.
36    :type attributes: ~azure.keyvault.v2016_10_01.models.CertificateAttributes
37    :param tags: Application specific metadata in the form of key-value pairs
38    :type tags: dict[str, str]
39    """
40
41    _validation = {
42        'id': {'readonly': True},
43        'kid': {'readonly': True},
44        'sid': {'readonly': True},
45        'x509_thumbprint': {'readonly': True},
46        'policy': {'readonly': True},
47    }
48
49    _attribute_map = {
50        'id': {'key': 'id', 'type': 'str'},
51        'kid': {'key': 'kid', 'type': 'str'},
52        'sid': {'key': 'sid', 'type': 'str'},
53        'x509_thumbprint': {'key': 'x5t', 'type': 'base64'},
54        'policy': {'key': 'policy', 'type': 'CertificatePolicy'},
55        'cer': {'key': 'cer', 'type': 'bytearray'},
56        'content_type': {'key': 'contentType', 'type': 'str'},
57        'attributes': {'key': 'attributes', 'type': 'CertificateAttributes'},
58        'tags': {'key': 'tags', 'type': '{str}'},
59    }
60
61    def __init__(self, *, cer: bytearray=None, content_type: str=None, attributes=None, tags=None, **kwargs) -> None:
62        super(CertificateBundle, self).__init__(**kwargs)
63        self.id = None
64        self.kid = None
65        self.sid = None
66        self.x509_thumbprint = None
67        self.policy = None
68        self.cer = cer
69        self.content_type = content_type
70        self.attributes = attributes
71        self.tags = tags
72