workflow_view.py•19.2 kB
# coding: utf-8
"""
Alteryx Server API V3
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from src.server_client.configuration import Configuration
class WorkflowView(object):
"""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 = {
"id": "str",
"source_app_id": "str",
"date_created": "datetime",
"run_count": "int",
"versions": "list[WorkflowVersionView]",
"name": "str",
"owner_id": "str",
"worker_tag": "str",
"district_tags": "list[str]",
"comments": "str",
"is_public": "bool",
"is_ready_for_migration": "bool",
"published_version_id": "str",
"others_may_download": "bool",
"others_can_view_history": "bool",
"others_can_execute": "bool",
"execution_mode": "str",
"has_private_data_exemption": "bool",
}
attribute_map = {
"id": "id",
"source_app_id": "sourceAppId",
"date_created": "dateCreated",
"run_count": "runCount",
"versions": "versions",
"name": "name",
"owner_id": "ownerId",
"worker_tag": "workerTag",
"district_tags": "districtTags",
"comments": "comments",
"is_public": "isPublic",
"is_ready_for_migration": "isReadyForMigration",
"published_version_id": "publishedVersionId",
"others_may_download": "othersMayDownload",
"others_can_view_history": "othersCanViewHistory",
"others_can_execute": "othersCanExecute",
"execution_mode": "executionMode",
"has_private_data_exemption": "hasPrivateDataExemption",
}
def __init__(
self,
id=None,
source_app_id=None,
date_created=None,
run_count=None,
versions=None,
name=None,
owner_id=None,
worker_tag=None,
district_tags=None,
comments=None,
is_public=None,
is_ready_for_migration=None,
published_version_id=None,
others_may_download=None,
others_can_view_history=None,
others_can_execute=None,
execution_mode=None,
has_private_data_exemption=None,
_configuration=None,
): # noqa: E501
"""WorkflowView - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._id = None
self._source_app_id = None
self._date_created = None
self._run_count = None
self._versions = None
self._name = None
self._owner_id = None
self._worker_tag = None
self._district_tags = None
self._comments = None
self._is_public = None
self._is_ready_for_migration = None
self._published_version_id = None
self._others_may_download = None
self._others_can_view_history = None
self._others_can_execute = None
self._execution_mode = None
self._has_private_data_exemption = None
self.discriminator = None
self.id = id
self.source_app_id = source_app_id
self.date_created = date_created
self.run_count = run_count
self.versions = versions
self.name = name
self.owner_id = owner_id
self.worker_tag = worker_tag
self.district_tags = district_tags
self.comments = comments
self.is_public = is_public
self.is_ready_for_migration = is_ready_for_migration
self.published_version_id = published_version_id
self.others_may_download = others_may_download
self.others_can_view_history = others_can_view_history
self.others_can_execute = others_can_execute
if execution_mode is not None:
self.execution_mode = execution_mode
if has_private_data_exemption is not None:
self.has_private_data_exemption = has_private_data_exemption
@property
def id(self):
"""Gets the id of this WorkflowView. # noqa: E501
:return: The id of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this WorkflowView.
:param id: The id of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and id is None:
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
self._id = id
@property
def source_app_id(self):
"""Gets the source_app_id of this WorkflowView. # noqa: E501
:return: The source_app_id of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._source_app_id
@source_app_id.setter
def source_app_id(self, source_app_id):
"""Sets the source_app_id of this WorkflowView.
:param source_app_id: The source_app_id of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and source_app_id is None:
raise ValueError("Invalid value for `source_app_id`, must not be `None`") # noqa: E501
self._source_app_id = source_app_id
@property
def date_created(self):
"""Gets the date_created of this WorkflowView. # noqa: E501
:return: The date_created of this WorkflowView. # noqa: E501
:rtype: datetime
"""
return self._date_created
@date_created.setter
def date_created(self, date_created):
"""Sets the date_created of this WorkflowView.
:param date_created: The date_created of this WorkflowView. # noqa: E501
:type: datetime
"""
if self._configuration.client_side_validation and date_created is None:
raise ValueError("Invalid value for `date_created`, must not be `None`") # noqa: E501
self._date_created = date_created
@property
def run_count(self):
"""Gets the run_count of this WorkflowView. # noqa: E501
:return: The run_count of this WorkflowView. # noqa: E501
:rtype: int
"""
return self._run_count
@run_count.setter
def run_count(self, run_count):
"""Sets the run_count of this WorkflowView.
:param run_count: The run_count of this WorkflowView. # noqa: E501
:type: int
"""
if self._configuration.client_side_validation and run_count is None:
raise ValueError("Invalid value for `run_count`, must not be `None`") # noqa: E501
self._run_count = run_count
@property
def versions(self):
"""Gets the versions of this WorkflowView. # noqa: E501
:return: The versions of this WorkflowView. # noqa: E501
:rtype: list[WorkflowVersionView]
"""
return self._versions
@versions.setter
def versions(self, versions):
"""Sets the versions of this WorkflowView.
:param versions: The versions of this WorkflowView. # noqa: E501
:type: list[WorkflowVersionView]
"""
if self._configuration.client_side_validation and versions is None:
raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501
self._versions = versions
@property
def name(self):
"""Gets the name of this WorkflowView. # noqa: E501
:return: The name of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this WorkflowView.
:param name: The name of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@property
def owner_id(self):
"""Gets the owner_id of this WorkflowView. # noqa: E501
:return: The owner_id of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._owner_id
@owner_id.setter
def owner_id(self, owner_id):
"""Sets the owner_id of this WorkflowView.
:param owner_id: The owner_id of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and owner_id is None:
raise ValueError("Invalid value for `owner_id`, must not be `None`") # noqa: E501
self._owner_id = owner_id
@property
def worker_tag(self):
"""Gets the worker_tag of this WorkflowView. # noqa: E501
:return: The worker_tag of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._worker_tag
@worker_tag.setter
def worker_tag(self, worker_tag):
"""Sets the worker_tag of this WorkflowView.
:param worker_tag: The worker_tag of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and worker_tag is None:
raise ValueError("Invalid value for `worker_tag`, must not be `None`") # noqa: E501
self._worker_tag = worker_tag
@property
def district_tags(self):
"""Gets the district_tags of this WorkflowView. # noqa: E501
:return: The district_tags of this WorkflowView. # noqa: E501
:rtype: list[str]
"""
return self._district_tags
@district_tags.setter
def district_tags(self, district_tags):
"""Sets the district_tags of this WorkflowView.
:param district_tags: The district_tags of this WorkflowView. # noqa: E501
:type: list[str]
"""
if self._configuration.client_side_validation and district_tags is None:
raise ValueError("Invalid value for `district_tags`, must not be `None`") # noqa: E501
self._district_tags = district_tags
@property
def comments(self):
"""Gets the comments of this WorkflowView. # noqa: E501
:return: The comments of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._comments
@comments.setter
def comments(self, comments):
"""Sets the comments of this WorkflowView.
:param comments: The comments of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and comments is None:
raise ValueError("Invalid value for `comments`, must not be `None`") # noqa: E501
self._comments = comments
@property
def is_public(self):
"""Gets the is_public of this WorkflowView. # noqa: E501
:return: The is_public of this WorkflowView. # noqa: E501
:rtype: bool
"""
return self._is_public
@is_public.setter
def is_public(self, is_public):
"""Sets the is_public of this WorkflowView.
:param is_public: The is_public of this WorkflowView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and is_public is None:
raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501
self._is_public = is_public
@property
def is_ready_for_migration(self):
"""Gets the is_ready_for_migration of this WorkflowView. # noqa: E501
:return: The is_ready_for_migration of this WorkflowView. # noqa: E501
:rtype: bool
"""
return self._is_ready_for_migration
@is_ready_for_migration.setter
def is_ready_for_migration(self, is_ready_for_migration):
"""Sets the is_ready_for_migration of this WorkflowView.
:param is_ready_for_migration: The is_ready_for_migration of this WorkflowView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and is_ready_for_migration is None:
raise ValueError("Invalid value for `is_ready_for_migration`, must not be `None`") # noqa: E501
self._is_ready_for_migration = is_ready_for_migration
@property
def published_version_id(self):
"""Gets the published_version_id of this WorkflowView. # noqa: E501
:return: The published_version_id of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._published_version_id
@published_version_id.setter
def published_version_id(self, published_version_id):
"""Sets the published_version_id of this WorkflowView.
:param published_version_id: The published_version_id of this WorkflowView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and published_version_id is None:
raise ValueError("Invalid value for `published_version_id`, must not be `None`") # noqa: E501
self._published_version_id = published_version_id
@property
def others_may_download(self):
"""Gets the others_may_download of this WorkflowView. # noqa: E501
:return: The others_may_download of this WorkflowView. # noqa: E501
:rtype: bool
"""
return self._others_may_download
@others_may_download.setter
def others_may_download(self, others_may_download):
"""Sets the others_may_download of this WorkflowView.
:param others_may_download: The others_may_download of this WorkflowView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and others_may_download is None:
raise ValueError("Invalid value for `others_may_download`, must not be `None`") # noqa: E501
self._others_may_download = others_may_download
@property
def others_can_view_history(self):
"""Gets the others_can_view_history of this WorkflowView. # noqa: E501
:return: The others_can_view_history of this WorkflowView. # noqa: E501
:rtype: bool
"""
return self._others_can_view_history
@others_can_view_history.setter
def others_can_view_history(self, others_can_view_history):
"""Sets the others_can_view_history of this WorkflowView.
:param others_can_view_history: The others_can_view_history of this WorkflowView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and others_can_view_history is None:
raise ValueError("Invalid value for `others_can_view_history`, must not be `None`") # noqa: E501
self._others_can_view_history = others_can_view_history
@property
def others_can_execute(self):
"""Gets the others_can_execute of this WorkflowView. # noqa: E501
:return: The others_can_execute of this WorkflowView. # noqa: E501
:rtype: bool
"""
return self._others_can_execute
@others_can_execute.setter
def others_can_execute(self, others_can_execute):
"""Sets the others_can_execute of this WorkflowView.
:param others_can_execute: The others_can_execute of this WorkflowView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and others_can_execute is None:
raise ValueError("Invalid value for `others_can_execute`, must not be `None`") # noqa: E501
self._others_can_execute = others_can_execute
@property
def execution_mode(self):
"""Gets the execution_mode of this WorkflowView. # noqa: E501
:return: The execution_mode of this WorkflowView. # noqa: E501
:rtype: str
"""
return self._execution_mode
@execution_mode.setter
def execution_mode(self, execution_mode):
"""Sets the execution_mode of this WorkflowView.
:param execution_mode: The execution_mode of this WorkflowView. # noqa: E501
:type: str
"""
allowed_values = ["Safe", "SemiSafe", "Standard"] # noqa: E501
if self._configuration.client_side_validation and execution_mode not in allowed_values:
raise ValueError(
"Invalid value for `execution_mode` ({0}), must be one of {1}".format(execution_mode, allowed_values) # noqa: E501
)
self._execution_mode = execution_mode
@property
def has_private_data_exemption(self):
"""Gets the has_private_data_exemption of this WorkflowView. # noqa: E501
:return: The has_private_data_exemption of this WorkflowView. # noqa: E501
:rtype: bool
"""
return self._has_private_data_exemption
@has_private_data_exemption.setter
def has_private_data_exemption(self, has_private_data_exemption):
"""Sets the has_private_data_exemption of this WorkflowView.
:param has_private_data_exemption: The has_private_data_exemption of this WorkflowView. # noqa: E501
:type: bool
"""
self._has_private_data_exemption = has_private_data_exemption
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(
map(
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
value.items(),
)
)
else:
result[attr] = value
if issubclass(WorkflowView, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, WorkflowView):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, WorkflowView):
return True
return self.to_dict() != other.to_dict()