update_schedule_contract.py•13.4 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 UpdateScheduleContract(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 = {
"workflow_id": "str",
"owner_id": "str",
"iteration": "IterationContract",
"name": "str",
"comment": "str",
"priority": "str",
"worker_tag": "str",
"enabled": "bool",
"credential_id": "str",
"time_zone": "str",
"questions": "list[AppValue]",
}
attribute_map = {
"workflow_id": "workflowId",
"owner_id": "ownerId",
"iteration": "iteration",
"name": "name",
"comment": "comment",
"priority": "priority",
"worker_tag": "workerTag",
"enabled": "enabled",
"credential_id": "credentialId",
"time_zone": "timeZone",
"questions": "questions",
}
def __init__(
self,
workflow_id=None,
owner_id=None,
iteration=None,
name=None,
comment=None,
priority=None,
worker_tag=None,
enabled=None,
credential_id=None,
time_zone=None,
questions=None,
_configuration=None,
): # noqa: E501
"""UpdateScheduleContract - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._workflow_id = None
self._owner_id = None
self._iteration = None
self._name = None
self._comment = None
self._priority = None
self._worker_tag = None
self._enabled = None
self._credential_id = None
self._time_zone = None
self._questions = None
self.discriminator = None
self.workflow_id = workflow_id
self.owner_id = owner_id
self.iteration = iteration
self.name = name
self.comment = comment
self.priority = priority
self.worker_tag = worker_tag
self.enabled = enabled
self.credential_id = credential_id
if time_zone is not None:
self.time_zone = time_zone
if questions is not None:
self.questions = questions
@property
def workflow_id(self):
"""Gets the workflow_id of this UpdateScheduleContract. # noqa: E501
:return: The workflow_id of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._workflow_id
@workflow_id.setter
def workflow_id(self, workflow_id):
"""Sets the workflow_id of this UpdateScheduleContract.
:param workflow_id: The workflow_id of this UpdateScheduleContract. # 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 owner_id(self):
"""Gets the owner_id of this UpdateScheduleContract. # noqa: E501
:return: The owner_id of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._owner_id
@owner_id.setter
def owner_id(self, owner_id):
"""Sets the owner_id of this UpdateScheduleContract.
:param owner_id: The owner_id of this UpdateScheduleContract. # 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 iteration(self):
"""Gets the iteration of this UpdateScheduleContract. # noqa: E501
Contains properties for each IterationType value # noqa: E501
:return: The iteration of this UpdateScheduleContract. # noqa: E501
:rtype: IterationContract
"""
return self._iteration
@iteration.setter
def iteration(self, iteration):
"""Sets the iteration of this UpdateScheduleContract.
Contains properties for each IterationType value # noqa: E501
:param iteration: The iteration of this UpdateScheduleContract. # noqa: E501
:type: IterationContract
"""
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 name(self):
"""Gets the name of this UpdateScheduleContract. # noqa: E501
:return: The name of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this UpdateScheduleContract.
:param name: The name of this UpdateScheduleContract. # 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
if self._configuration.client_side_validation and name is not None and len(name) > 256:
raise ValueError("Invalid value for `name`, length must be less than or equal to `256`") # noqa: E501
if self._configuration.client_side_validation and name is not None and len(name) < 0:
raise ValueError("Invalid value for `name`, length must be greater than or equal to `0`") # noqa: E501
self._name = name
@property
def comment(self):
"""Gets the comment of this UpdateScheduleContract. # noqa: E501
:return: The comment of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._comment
@comment.setter
def comment(self, comment):
"""Sets the comment of this UpdateScheduleContract.
:param comment: The comment of this UpdateScheduleContract. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and comment is None:
raise ValueError("Invalid value for `comment`, must not be `None`") # noqa: E501
if self._configuration.client_side_validation and comment is not None and len(comment) > 1024:
raise ValueError("Invalid value for `comment`, length must be less than or equal to `1024`") # noqa: E501
if self._configuration.client_side_validation and comment is not None and len(comment) < 0:
raise ValueError("Invalid value for `comment`, length must be greater than or equal to `0`") # noqa: E501
self._comment = comment
@property
def priority(self):
"""Gets the priority of this UpdateScheduleContract. # noqa: E501
:return: The priority of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._priority
@priority.setter
def priority(self, priority):
"""Sets the priority of this UpdateScheduleContract.
:param priority: The priority of this UpdateScheduleContract. # 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 UpdateScheduleContract. # noqa: E501
:return: The worker_tag of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._worker_tag
@worker_tag.setter
def worker_tag(self, worker_tag):
"""Sets the worker_tag of this UpdateScheduleContract.
:param worker_tag: The worker_tag of this UpdateScheduleContract. # 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 enabled(self):
"""Gets the enabled of this UpdateScheduleContract. # noqa: E501
:return: The enabled of this UpdateScheduleContract. # noqa: E501
:rtype: bool
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
"""Sets the enabled of this UpdateScheduleContract.
:param enabled: The enabled of this UpdateScheduleContract. # 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 credential_id(self):
"""Gets the credential_id of this UpdateScheduleContract. # noqa: E501
:return: The credential_id of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._credential_id
@credential_id.setter
def credential_id(self, credential_id):
"""Sets the credential_id of this UpdateScheduleContract.
:param credential_id: The credential_id of this UpdateScheduleContract. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and credential_id is None:
raise ValueError("Invalid value for `credential_id`, must not be `None`") # noqa: E501
self._credential_id = credential_id
@property
def time_zone(self):
"""Gets the time_zone of this UpdateScheduleContract. # noqa: E501
Optional TimeZone to be used for schedule execution. # noqa: E501
:return: The time_zone of this UpdateScheduleContract. # noqa: E501
:rtype: str
"""
return self._time_zone
@time_zone.setter
def time_zone(self, time_zone):
"""Sets the time_zone of this UpdateScheduleContract.
Optional TimeZone to be used for schedule execution. # noqa: E501
:param time_zone: The time_zone of this UpdateScheduleContract. # noqa: E501
:type: str
"""
self._time_zone = time_zone
@property
def questions(self):
"""Gets the questions of this UpdateScheduleContract. # noqa: E501
:return: The questions of this UpdateScheduleContract. # noqa: E501
:rtype: list[AppValue]
"""
return self._questions
@questions.setter
def questions(self, questions):
"""Sets the questions of this UpdateScheduleContract.
:param questions: The questions of this UpdateScheduleContract. # 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(UpdateScheduleContract, 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, UpdateScheduleContract):
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, UpdateScheduleContract):
return True
return self.to_dict() != other.to_dict()