File: certificate.py

package info (click to toggle)
python-azure 2.0.0~rc6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 269,052 kB
  • ctags: 9,428
  • sloc: python: 81,857; makefile: 149
file content (75 lines) | stat: -rw-r--r-- 3,781 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Certificate(Model):
    """A certificate that can be installed on compute nodes and can be used to
    authenticate operations on the machine.

    :param thumbprint: The X.509 thumbprint of the certificate. This is a
     sequence of up to 40 hex digits (it may include spaces but these are
     removed).
    :type thumbprint: str
    :param thumbprint_algorithm: The algorithm used to derive the thumbprint.
     This must be sha1.
    :type thumbprint_algorithm: str
    :param url: The URL of the certificate.
    :type url: str
    :param state: The current state of the certificate. Possible values
     include: 'active', 'deleting', 'deletefailed'
    :type state: str or :class:`CertificateState
     <azure.batch.models.CertificateState>`
    :param state_transition_time: The time at which the certificate entered
     its current state.
    :type state_transition_time: datetime
    :param previous_state: The previous state of the certificate. This
     property is not set if the certificate is in its initial Active state.
     Possible values include: 'active', 'deleting', 'deletefailed'
    :type previous_state: str or :class:`CertificateState
     <azure.batch.models.CertificateState>`
    :param previous_state_transition_time: The time at which the certificate
     entered its previous state. This property is not set if the certificate
     is in its initial Active state.
    :type previous_state_transition_time: datetime
    :param public_data: The public part of the certificate as a base-64
     encoded .cer file.
    :type public_data: str
    :param delete_certificate_error: The error that occurred on the last
     attempt to delete this certificate.  This property is set only if the
     certificate is in the DeleteFailed state.
    :type delete_certificate_error: :class:`DeleteCertificateError
     <azure.batch.models.DeleteCertificateError>`
    """ 

    _attribute_map = {
        'thumbprint': {'key': 'thumbprint', 'type': 'str'},
        'thumbprint_algorithm': {'key': 'thumbprintAlgorithm', 'type': 'str'},
        'url': {'key': 'url', 'type': 'str'},
        'state': {'key': 'state', 'type': 'CertificateState'},
        'state_transition_time': {'key': 'stateTransitionTime', 'type': 'iso-8601'},
        'previous_state': {'key': 'previousState', 'type': 'CertificateState'},
        'previous_state_transition_time': {'key': 'previousStateTransitionTime', 'type': 'iso-8601'},
        'public_data': {'key': 'publicData', 'type': 'str'},
        'delete_certificate_error': {'key': 'deleteCertificateError', 'type': 'DeleteCertificateError'},
    }

    def __init__(self, thumbprint=None, thumbprint_algorithm=None, url=None, state=None, state_transition_time=None, previous_state=None, previous_state_transition_time=None, public_data=None, delete_certificate_error=None):
        self.thumbprint = thumbprint
        self.thumbprint_algorithm = thumbprint_algorithm
        self.url = url
        self.state = state
        self.state_transition_time = state_transition_time
        self.previous_state = previous_state
        self.previous_state_transition_time = previous_state_transition_time
        self.public_data = public_data
        self.delete_certificate_error = delete_certificate_error