# coding: utf-8 # Copyright 2023 Ant Group CO., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under the License # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # or implied. """ knext No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from knext.rest.configuration import Configuration class BuilderJobInst(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_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. """ openapi_types = { "job_inst_id": "str", "job_id": "str", "project_id": "str", "status": "str", "start_time": "str", "end_time": "str", "result": "BaseBuilderResult", "progress": "str", "log_info": "str", "external_job_inst_id": "str", } attribute_map = { "job_inst_id": "jobInstId", "job_id": "jobId", "project_id": "projectId", "status": "status", "start_time": "startTime", "end_time": "endTime", "result": "result", "progress": "progress", "log_info": "logInfo", "external_job_inst_id": "externalJobInstId", } def __init__( self, job_inst_id=None, job_id=None, project_id=None, status=None, start_time=None, end_time=None, result=None, progress=None, log_info=None, external_job_inst_id=None, local_vars_configuration=None, ): # noqa: E501 """BuilderJobInst - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._job_inst_id = None self._job_id = None self._project_id = None self._status = None self._start_time = None self._end_time = None self._result = None self._progress = None self._log_info = None self._external_job_inst_id = None self.discriminator = None if job_inst_id is not None: self.job_inst_id = job_inst_id if job_id is not None: self.job_id = job_id if project_id is not None: self.project_id = project_id if status is not None: self.status = status if start_time is not None: self.start_time = start_time if end_time is not None: self.end_time = end_time if result is not None: self.result = result if progress is not None: self.progress = progress if log_info is not None: self.log_info = log_info if external_job_inst_id is not None: self.external_job_inst_id = external_job_inst_id @property def job_inst_id(self): """Gets the job_inst_id of this BuilderJobInst. # noqa: E501 :return: The job_inst_id of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._job_inst_id @job_inst_id.setter def job_inst_id(self, job_inst_id): """Sets the job_inst_id of this BuilderJobInst. :param job_inst_id: The job_inst_id of this BuilderJobInst. # noqa: E501 :type: str """ self._job_inst_id = job_inst_id @property def job_id(self): """Gets the job_id of this BuilderJobInst. # noqa: E501 :return: The job_id of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._job_id @job_id.setter def job_id(self, job_id): """Sets the job_id of this BuilderJobInst. :param job_id: The job_id of this BuilderJobInst. # noqa: E501 :type: str """ self._job_id = job_id @property def project_id(self): """Gets the project_id of this BuilderJobInst. # noqa: E501 :return: The project_id of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._project_id @project_id.setter def project_id(self, project_id): """Sets the project_id of this BuilderJobInst. :param project_id: The project_id of this BuilderJobInst. # noqa: E501 :type: str """ self._project_id = project_id @property def status(self): """Gets the status of this BuilderJobInst. # noqa: E501 :return: The status of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this BuilderJobInst. :param status: The status of this BuilderJobInst. # noqa: E501 :type: str """ allowed_values = [ "INIT", "QUEUE", "RUNNING", "CANCEL", "FAILURE", "SUCCESS", ] # noqa: E501 if ( self.local_vars_configuration.client_side_validation and status not in allowed_values ): # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501 status, allowed_values ) ) self._status = status @property def start_time(self): """Gets the start_time of this BuilderJobInst. # noqa: E501 :return: The start_time of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._start_time @start_time.setter def start_time(self, start_time): """Sets the start_time of this BuilderJobInst. :param start_time: The start_time of this BuilderJobInst. # noqa: E501 :type: str """ self._start_time = start_time @property def end_time(self): """Gets the end_time of this BuilderJobInst. # noqa: E501 :return: The end_time of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._end_time @end_time.setter def end_time(self, end_time): """Sets the end_time of this BuilderJobInst. :param end_time: The end_time of this BuilderJobInst. # noqa: E501 :type: str """ self._end_time = end_time @property def result(self): """Gets the result of this BuilderJobInst. # noqa: E501 :return: The result of this BuilderJobInst. # noqa: E501 :rtype: BaseBuilderResult """ return self._result @result.setter def result(self, result): """Sets the result of this BuilderJobInst. :param result: The result of this BuilderJobInst. # noqa: E501 :type: BaseBuilderResult """ self._result = result @property def progress(self): """Gets the progress of this BuilderJobInst. # noqa: E501 :return: The progress of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._progress @progress.setter def progress(self, progress): """Sets the progress of this BuilderJobInst. :param progress: The progress of this BuilderJobInst. # noqa: E501 :type: str """ self._progress = progress @property def log_info(self): """Gets the log_info of this BuilderJobInst. # noqa: E501 :return: The log_info of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._log_info @log_info.setter def log_info(self, log_info): """Sets the log_info of this BuilderJobInst. :param log_info: The log_info of this BuilderJobInst. # noqa: E501 :type: str """ self._log_info = log_info @property def external_job_inst_id(self): """Gets the external_job_inst_id of this BuilderJobInst. # noqa: E501 :return: The external_job_inst_id of this BuilderJobInst. # noqa: E501 :rtype: str """ return self._external_job_inst_id @external_job_inst_id.setter def external_job_inst_id(self, external_job_inst_id): """Sets the external_job_inst_id of this BuilderJobInst. :param external_job_inst_id: The external_job_inst_id of this BuilderJobInst. # noqa: E501 :type: str """ self._external_job_inst_id = external_job_inst_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_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 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, BuilderJobInst): 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, BuilderJobInst): return True return self.to_dict() != other.to_dict()