-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathpartial_application_key_attributes.py
More file actions
85 lines (73 loc) · 2.42 KB
/
partial_application_key_attributes.py
File metadata and controls
85 lines (73 loc) · 2.42 KB
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
76
77
78
79
80
81
82
83
84
85
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations
from typing import List, Union
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)
class PartialApplicationKeyAttributes(ModelNormal):
validations = {
"last4": {
"max_length": 4,
"min_length": 4,
},
}
@cached_property
def openapi_types(_):
return {
"created_at": (str,),
"last4": (str,),
"last_used_at": (str, none_type),
"name": (str,),
"scopes": ([str], none_type),
}
attribute_map = {
"created_at": "created_at",
"last4": "last4",
"last_used_at": "last_used_at",
"name": "name",
"scopes": "scopes",
}
read_only_vars = {
"created_at",
"last4",
"last_used_at",
}
def __init__(
self_,
created_at: Union[str, UnsetType] = unset,
last4: Union[str, UnsetType] = unset,
last_used_at: Union[str, none_type, UnsetType] = unset,
name: Union[str, UnsetType] = unset,
scopes: Union[List[str], none_type, UnsetType] = unset,
**kwargs,
):
"""
Attributes of a partial application key.
:param created_at: Creation date of the application key.
:type created_at: str, optional
:param last4: The last four characters of the application key.
:type last4: str, optional
:param last_used_at: Last usage timestamp of the application key.
:type last_used_at: str, none_type, optional
:param name: Name of the application key.
:type name: str, optional
:param scopes: Array of scopes to grant the application key.
:type scopes: [str], none_type, optional
"""
if created_at is not unset:
kwargs["created_at"] = created_at
if last4 is not unset:
kwargs["last4"] = last4
if last_used_at is not unset:
kwargs["last_used_at"] = last_used_at
if name is not unset:
kwargs["name"] = name
if scopes is not unset:
kwargs["scopes"] = scopes
super().__init__(kwargs)