schedule_view.py•22.9 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 ScheduleView(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",
"name": "str",
"workflow_id": "str",
"version_id": "str",
"owner_id": "str",
"run_date_time": "str",
"comment": "str",
"enabled": "bool",
"priority": "str",
"worker_tag": "str",
"status": "str",
"credential_id": "str",
"creation_time": "str",
"last_run_time": "str",
"state": "str",
"run_count": "int",
"iteration": "IterationBase",
"frequency": "str",
"last_error": "str",
"cpu_name": "str",
"last_modified_id": "str",
"last_modified_date": "str",
"can_edit": "bool",
"time_zone": "str",
"questions": "list[AppValue]",
}
attribute_map = {
"id": "id",
"name": "name",
"workflow_id": "workflowId",
"version_id": "versionId",
"owner_id": "ownerId",
"run_date_time": "runDateTime",
"comment": "comment",
"enabled": "enabled",
"priority": "priority",
"worker_tag": "workerTag",
"status": "status",
"credential_id": "credentialId",
"creation_time": "creationTime",
"last_run_time": "lastRunTime",
"state": "state",
"run_count": "runCount",
"iteration": "iteration",
"frequency": "frequency",
"last_error": "lastError",
"cpu_name": "cpuName",
"last_modified_id": "lastModifiedId",
"last_modified_date": "lastModifiedDate",
"can_edit": "canEdit",
"time_zone": "timeZone",
"questions": "questions",
}
def __init__(
self,
id=None,
name=None,
workflow_id=None,
version_id=None,
owner_id=None,
run_date_time=None,
comment=None,
enabled=None,
priority=None,
worker_tag=None,
status=None,
credential_id=None,
creation_time=None,
last_run_time=None,
state=None,
run_count=None,
iteration=None,
frequency=None,
last_error=None,
cpu_name=None,
last_modified_id=None,
last_modified_date=None,
can_edit=None,
time_zone=None,
questions=None,
_configuration=None,
): # noqa: E501
"""ScheduleView - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._id = None
self._name = None
self._workflow_id = None
self._version_id = None
self._owner_id = None
self._run_date_time = None
self._comment = None
self._enabled = None
self._priority = None
self._worker_tag = None
self._status = None
self._credential_id = None
self._creation_time = None
self._last_run_time = None
self._state = None
self._run_count = None
self._iteration = None
self._frequency = None
self._last_error = None
self._cpu_name = None
self._last_modified_id = None
self._last_modified_date = None
self._can_edit = None
self._time_zone = None
self._questions = None
self.discriminator = None
self.id = id
self.name = name
self.workflow_id = workflow_id
self.version_id = version_id
self.owner_id = owner_id
self.run_date_time = run_date_time
if comment is not None:
self.comment = comment
self.enabled = enabled
self.priority = priority
if worker_tag is not None:
self.worker_tag = worker_tag
if status is not None:
self.status = status
if credential_id is not None:
self.credential_id = credential_id
self.creation_time = creation_time
if last_run_time is not None:
self.last_run_time = last_run_time
if state is not None:
self.state = state
if run_count is not None:
self.run_count = run_count
self.iteration = iteration
if frequency is not None:
self.frequency = frequency
if last_error is not None:
self.last_error = last_error
if cpu_name is not None:
self.cpu_name = cpu_name
if last_modified_id is not None:
self.last_modified_id = last_modified_id
if last_modified_date is not None:
self.last_modified_date = last_modified_date
self.can_edit = can_edit
self.time_zone = time_zone
if questions is not None:
self.questions = questions
@property
def id(self):
"""Gets the id of this ScheduleView. # noqa: E501
:return: The id of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this ScheduleView.
:param id: The id of this ScheduleView. # 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 name(self):
"""Gets the name of this ScheduleView. # noqa: E501
:return: The name of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this ScheduleView.
:param name: The name of this ScheduleView. # 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 workflow_id(self):
"""Gets the workflow_id of this ScheduleView. # noqa: E501
Will be null if the workflow has been deleted. # noqa: E501
:return: The workflow_id of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._workflow_id
@workflow_id.setter
def workflow_id(self, workflow_id):
"""Sets the workflow_id of this ScheduleView.
Will be null if the workflow has been deleted. # noqa: E501
:param workflow_id: The workflow_id of this ScheduleView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and workflow_id is None:
raise ValueError("Invalid value for `workflow_id`, must not be `None`") # noqa: E501
self._workflow_id = workflow_id
@property
def version_id(self):
"""Gets the version_id of this ScheduleView. # noqa: E501
Will be null if the workflow has been deleted. # noqa: E501
:return: The version_id of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._version_id
@version_id.setter
def version_id(self, version_id):
"""Sets the version_id of this ScheduleView.
Will be null if the workflow has been deleted. # noqa: E501
:param version_id: The version_id of this ScheduleView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and version_id is None:
raise ValueError("Invalid value for `version_id`, must not be `None`") # noqa: E501
self._version_id = version_id
@property
def owner_id(self):
"""Gets the owner_id of this ScheduleView. # noqa: E501
:return: The owner_id of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._owner_id
@owner_id.setter
def owner_id(self, owner_id):
"""Sets the owner_id of this ScheduleView.
:param owner_id: The owner_id of this ScheduleView. # 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 run_date_time(self):
"""Gets the run_date_time of this ScheduleView. # noqa: E501
RunDateTime will either be the next time the schedule will be run, OR the next run time in the specified window
of a search range. UTC-0. # noqa: E501
:return: The run_date_time of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._run_date_time
@run_date_time.setter
def run_date_time(self, run_date_time):
"""Sets the run_date_time of this ScheduleView.
RunDateTime will either be the next time the schedule will be run, OR the next run time in the specified window
of a search range. UTC-0. # noqa: E501
:param run_date_time: The run_date_time of this ScheduleView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and run_date_time is None:
raise ValueError("Invalid value for `run_date_time`, must not be `None`") # noqa: E501
self._run_date_time = run_date_time
@property
def comment(self):
"""Gets the comment of this ScheduleView. # noqa: E501
:return: The comment of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._comment
@comment.setter
def comment(self, comment):
"""Sets the comment of this ScheduleView.
:param comment: The comment of this ScheduleView. # noqa: E501
:type: str
"""
self._comment = comment
@property
def enabled(self):
"""Gets the enabled of this ScheduleView. # noqa: E501
:return: The enabled of this ScheduleView. # noqa: E501
:rtype: bool
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
"""Sets the enabled of this ScheduleView.
:param enabled: The enabled of this ScheduleView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and enabled is None:
raise ValueError("Invalid value for `enabled`, must not be `None`") # noqa: E501
self._enabled = enabled
@property
def priority(self):
"""Gets the priority of this ScheduleView. # noqa: E501
:return: The priority of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._priority
@priority.setter
def priority(self, priority):
"""Sets the priority of this ScheduleView.
:param priority: The priority of this ScheduleView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and priority is None:
raise ValueError("Invalid value for `priority`, must not be `None`") # noqa: E501
allowed_values = ["Default", "Low", "Medium", "High", "Critical"] # noqa: E501
if self._configuration.client_side_validation and priority not in allowed_values:
raise ValueError(
"Invalid value for `priority` ({0}), must be one of {1}".format(priority, allowed_values) # noqa: E501
)
self._priority = priority
@property
def worker_tag(self):
"""Gets the worker_tag of this ScheduleView. # noqa: E501
:return: The worker_tag of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._worker_tag
@worker_tag.setter
def worker_tag(self, worker_tag):
"""Sets the worker_tag of this ScheduleView.
:param worker_tag: The worker_tag of this ScheduleView. # noqa: E501
:type: str
"""
self._worker_tag = worker_tag
@property
def status(self):
"""Gets the status of this ScheduleView. # noqa: E501
:return: The status of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this ScheduleView.
:param status: The status of this ScheduleView. # noqa: E501
:type: str
"""
self._status = status
@property
def credential_id(self):
"""Gets the credential_id of this ScheduleView. # noqa: E501
:return: The credential_id of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._credential_id
@credential_id.setter
def credential_id(self, credential_id):
"""Sets the credential_id of this ScheduleView.
:param credential_id: The credential_id of this ScheduleView. # noqa: E501
:type: str
"""
self._credential_id = credential_id
@property
def creation_time(self):
"""Gets the creation_time of this ScheduleView. # noqa: E501
:return: The creation_time of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._creation_time
@creation_time.setter
def creation_time(self, creation_time):
"""Sets the creation_time of this ScheduleView.
:param creation_time: The creation_time of this ScheduleView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and creation_time is None:
raise ValueError("Invalid value for `creation_time`, must not be `None`") # noqa: E501
self._creation_time = creation_time
@property
def last_run_time(self):
"""Gets the last_run_time of this ScheduleView. # noqa: E501
:return: The last_run_time of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._last_run_time
@last_run_time.setter
def last_run_time(self, last_run_time):
"""Sets the last_run_time of this ScheduleView.
:param last_run_time: The last_run_time of this ScheduleView. # noqa: E501
:type: str
"""
self._last_run_time = last_run_time
@property
def state(self):
"""Gets the state of this ScheduleView. # noqa: E501
:return: The state of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._state
@state.setter
def state(self, state):
"""Sets the state of this ScheduleView.
:param state: The state of this ScheduleView. # noqa: E501
:type: str
"""
self._state = state
@property
def run_count(self):
"""Gets the run_count of this ScheduleView. # noqa: E501
:return: The run_count of this ScheduleView. # noqa: E501
:rtype: int
"""
return self._run_count
@run_count.setter
def run_count(self, run_count):
"""Sets the run_count of this ScheduleView.
:param run_count: The run_count of this ScheduleView. # noqa: E501
:type: int
"""
self._run_count = run_count
@property
def iteration(self):
"""Gets the iteration of this ScheduleView. # noqa: E501
All times are in UTC-0 # noqa: E501
:return: The iteration of this ScheduleView. # noqa: E501
:rtype: IterationBase
"""
return self._iteration
@iteration.setter
def iteration(self, iteration):
"""Sets the iteration of this ScheduleView.
All times are in UTC-0 # noqa: E501
:param iteration: The iteration of this ScheduleView. # noqa: E501
:type: IterationBase
"""
if self._configuration.client_side_validation and iteration is None:
raise ValueError("Invalid value for `iteration`, must not be `None`") # noqa: E501
self._iteration = iteration
@property
def frequency(self):
"""Gets the frequency of this ScheduleView. # noqa: E501
:return: The frequency of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._frequency
@frequency.setter
def frequency(self, frequency):
"""Sets the frequency of this ScheduleView.
:param frequency: The frequency of this ScheduleView. # noqa: E501
:type: str
"""
self._frequency = frequency
@property
def last_error(self):
"""Gets the last_error of this ScheduleView. # noqa: E501
:return: The last_error of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._last_error
@last_error.setter
def last_error(self, last_error):
"""Sets the last_error of this ScheduleView.
:param last_error: The last_error of this ScheduleView. # noqa: E501
:type: str
"""
self._last_error = last_error
@property
def cpu_name(self):
"""Gets the cpu_name of this ScheduleView. # noqa: E501
:return: The cpu_name of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._cpu_name
@cpu_name.setter
def cpu_name(self, cpu_name):
"""Sets the cpu_name of this ScheduleView.
:param cpu_name: The cpu_name of this ScheduleView. # noqa: E501
:type: str
"""
self._cpu_name = cpu_name
@property
def last_modified_id(self):
"""Gets the last_modified_id of this ScheduleView. # noqa: E501
:return: The last_modified_id of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._last_modified_id
@last_modified_id.setter
def last_modified_id(self, last_modified_id):
"""Sets the last_modified_id of this ScheduleView.
:param last_modified_id: The last_modified_id of this ScheduleView. # noqa: E501
:type: str
"""
self._last_modified_id = last_modified_id
@property
def last_modified_date(self):
"""Gets the last_modified_date of this ScheduleView. # noqa: E501
:return: The last_modified_date of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._last_modified_date
@last_modified_date.setter
def last_modified_date(self, last_modified_date):
"""Sets the last_modified_date of this ScheduleView.
:param last_modified_date: The last_modified_date of this ScheduleView. # noqa: E501
:type: str
"""
self._last_modified_date = last_modified_date
@property
def can_edit(self):
"""Gets the can_edit of this ScheduleView. # noqa: E501
:return: The can_edit of this ScheduleView. # noqa: E501
:rtype: bool
"""
return self._can_edit
@can_edit.setter
def can_edit(self, can_edit):
"""Sets the can_edit of this ScheduleView.
:param can_edit: The can_edit of this ScheduleView. # noqa: E501
:type: bool
"""
if self._configuration.client_side_validation and can_edit is None:
raise ValueError("Invalid value for `can_edit`, must not be `None`") # noqa: E501
self._can_edit = can_edit
@property
def time_zone(self):
"""Gets the time_zone of this ScheduleView. # noqa: E501
:return: The time_zone of this ScheduleView. # noqa: E501
:rtype: str
"""
return self._time_zone
@time_zone.setter
def time_zone(self, time_zone):
"""Sets the time_zone of this ScheduleView.
:param time_zone: The time_zone of this ScheduleView. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and time_zone is None:
raise ValueError("Invalid value for `time_zone`, must not be `None`") # noqa: E501
self._time_zone = time_zone
@property
def questions(self):
"""Gets the questions of this ScheduleView. # noqa: E501
Analytic App Question and Answers # noqa: E501
:return: The questions of this ScheduleView. # noqa: E501
:rtype: list[AppValue]
"""
return self._questions
@questions.setter
def questions(self, questions):
"""Sets the questions of this ScheduleView.
Analytic App Question and Answers # noqa: E501
:param questions: The questions of this ScheduleView. # noqa: E501
:type: list[AppValue]
"""
self._questions = questions
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(ScheduleView, 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, ScheduleView):
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, ScheduleView):
return True
return self.to_dict() != other.to_dict()