Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions src/conductor/client/http/models/authorization_request.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import pprint
import re # noqa: F401
from typing import List, Optional
from dataclasses import dataclass, field, InitVar
from deprecated import deprecated

import six


class AuthorizationRequest(object):
@dataclass
class AuthorizationRequest:
"""NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'subject': 'SubjectRef',
'target': 'TargetRef',
Expand All @@ -28,6 +21,14 @@ class AuthorizationRequest(object):
'access': 'access'
}

subject: InitVar[Optional['SubjectRef']] = None
target: InitVar[Optional['TargetRef']] = None
access: InitVar[Optional[List[str]]] = field(default_factory=list)

_subject: Optional['SubjectRef'] = field(init=False, default=None)
_target: Optional['TargetRef'] = field(init=False, default=None)
_access: Optional[List[str]] = field(init=False, default=None)

def __init__(self, subject=None, target=None, access=None): # noqa: E501
"""AuthorizationRequest - a model defined in Swagger""" # noqa: E501
self._subject = None
Expand All @@ -38,11 +39,15 @@ def __init__(self, subject=None, target=None, access=None): # noqa: E501
self.target = target
self.access = access

def __post_init__(self, subject, target, access):
self.subject = subject
self.target = target
self.access = access

@property
def subject(self):
"""Gets the subject of this AuthorizationRequest. # noqa: E501


:return: The subject of this AuthorizationRequest. # noqa: E501
:rtype: SubjectRef
"""
Expand All @@ -52,7 +57,6 @@ def subject(self):
def subject(self, subject):
"""Sets the subject of this AuthorizationRequest.


:param subject: The subject of this AuthorizationRequest. # noqa: E501
:type: SubjectRef
"""
Expand All @@ -62,7 +66,6 @@ def subject(self, subject):
def target(self):
"""Gets the target of this AuthorizationRequest. # noqa: E501


:return: The target of this AuthorizationRequest. # noqa: E501
:rtype: TargetRef
"""
Expand All @@ -72,7 +75,6 @@ def target(self):
def target(self, target):
"""Sets the target of this AuthorizationRequest.


:param target: The target of this AuthorizationRequest. # noqa: E501
:type: TargetRef
"""
Expand Down Expand Up @@ -105,14 +107,13 @@ def access(self, access):
.format(", ".join(map(str, set(access) - set(allowed_values))), # noqa: E501
", ".join(map(str, allowed_values)))
)

self._access = access

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

for attr, _ in six.iteritems(self.swagger_types):
for attr, _ in self.swagger_types.items():
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
Expand Down Expand Up @@ -152,4 +153,4 @@ def __eq__(self, other):

def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
return not self == other
Loading
Loading