# coding: utf-8

"""
    

    

    OpenAPI spec version: 
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    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.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from pprint import pformat
from six import iteritems
import re


class V1BuildStatus(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """

    operations = [
    ]

    # The key is attribute name
    # and the value is attribute type.
    swagger_types = {
        'phase': 'str',
        'cancelled': 'bool',
        'reason': 'str',
        'message': 'str',
        'start_timestamp': 'str',
        'completion_timestamp': 'str',
        'duration': 'TimeDuration',
        'output_docker_image_reference': 'str',
        'config': 'V1ObjectReference'
    }

    # The key is attribute name
    # and the value is json key in definition.
    attribute_map = {
        'phase': 'phase',
        'cancelled': 'cancelled',
        'reason': 'reason',
        'message': 'message',
        'start_timestamp': 'startTimestamp',
        'completion_timestamp': 'completionTimestamp',
        'duration': 'duration',
        'output_docker_image_reference': 'outputDockerImageReference',
        'config': 'config'
    }

    def __init__(self, phase=None, cancelled=None, reason=None, message=None, start_timestamp=None, completion_timestamp=None, duration=None, output_docker_image_reference=None, config=None):
        """
        V1BuildStatus - a model defined in Swagger

        """

        self._phase = phase
        self._cancelled = cancelled
        self._reason = reason
        self._message = message
        self._start_timestamp = start_timestamp
        self._completion_timestamp = completion_timestamp
        self._duration = duration
        self._output_docker_image_reference = output_docker_image_reference
        self._config = config

    @property
    def phase(self):
        """
        Gets the phase of this V1BuildStatus.
        Phase is the point in the build lifecycle.

        :return: The phase of this V1BuildStatus.
        :rtype: str
        """
        return self._phase

    @phase.setter
    def phase(self, phase):
        """
        Sets the phase of this V1BuildStatus.
        Phase is the point in the build lifecycle.

        :param phase: The phase of this V1BuildStatus.
        :type: str
        """

        self._phase = phase

    @property
    def cancelled(self):
        """
        Gets the cancelled of this V1BuildStatus.
        Cancelled describes if a cancel event was triggered for the build.

        :return: The cancelled of this V1BuildStatus.
        :rtype: bool
        """
        return self._cancelled

    @cancelled.setter
    def cancelled(self, cancelled):
        """
        Sets the cancelled of this V1BuildStatus.
        Cancelled describes if a cancel event was triggered for the build.

        :param cancelled: The cancelled of this V1BuildStatus.
        :type: bool
        """

        self._cancelled = cancelled

    @property
    def reason(self):
        """
        Gets the reason of this V1BuildStatus.
        Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.

        :return: The reason of this V1BuildStatus.
        :rtype: str
        """
        return self._reason

    @reason.setter
    def reason(self, reason):
        """
        Sets the reason of this V1BuildStatus.
        Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.

        :param reason: The reason of this V1BuildStatus.
        :type: str
        """

        self._reason = reason

    @property
    def message(self):
        """
        Gets the message of this V1BuildStatus.
        Message is a human-readable message indicating details about why the build has this status.

        :return: The message of this V1BuildStatus.
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """
        Sets the message of this V1BuildStatus.
        Message is a human-readable message indicating details about why the build has this status.

        :param message: The message of this V1BuildStatus.
        :type: str
        """

        self._message = message

    @property
    def start_timestamp(self):
        """
        Gets the start_timestamp of this V1BuildStatus.
        StartTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC.

        :return: The start_timestamp of this V1BuildStatus.
        :rtype: str
        """
        return self._start_timestamp

    @start_timestamp.setter
    def start_timestamp(self, start_timestamp):
        """
        Sets the start_timestamp of this V1BuildStatus.
        StartTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC.

        :param start_timestamp: The start_timestamp of this V1BuildStatus.
        :type: str
        """

        self._start_timestamp = start_timestamp

    @property
    def completion_timestamp(self):
        """
        Gets the completion_timestamp of this V1BuildStatus.
        CompletionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded.  It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC.

        :return: The completion_timestamp of this V1BuildStatus.
        :rtype: str
        """
        return self._completion_timestamp

    @completion_timestamp.setter
    def completion_timestamp(self, completion_timestamp):
        """
        Sets the completion_timestamp of this V1BuildStatus.
        CompletionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded.  It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC.

        :param completion_timestamp: The completion_timestamp of this V1BuildStatus.
        :type: str
        """

        self._completion_timestamp = completion_timestamp

    @property
    def duration(self):
        """
        Gets the duration of this V1BuildStatus.
        Duration contains time.Duration object describing build time.

        :return: The duration of this V1BuildStatus.
        :rtype: TimeDuration
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """
        Sets the duration of this V1BuildStatus.
        Duration contains time.Duration object describing build time.

        :param duration: The duration of this V1BuildStatus.
        :type: TimeDuration
        """

        self._duration = duration

    @property
    def output_docker_image_reference(self):
        """
        Gets the output_docker_image_reference of this V1BuildStatus.
        OutputDockerImageReference contains a reference to the Docker image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image.

        :return: The output_docker_image_reference of this V1BuildStatus.
        :rtype: str
        """
        return self._output_docker_image_reference

    @output_docker_image_reference.setter
    def output_docker_image_reference(self, output_docker_image_reference):
        """
        Sets the output_docker_image_reference of this V1BuildStatus.
        OutputDockerImageReference contains a reference to the Docker image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image.

        :param output_docker_image_reference: The output_docker_image_reference of this V1BuildStatus.
        :type: str
        """

        self._output_docker_image_reference = output_docker_image_reference

    @property
    def config(self):
        """
        Gets the config of this V1BuildStatus.
        Config is an ObjectReference to the BuildConfig this Build is based on.

        :return: The config of this V1BuildStatus.
        :rtype: V1ObjectReference
        """
        return self._config

    @config.setter
    def config(self, config):
        """
        Sets the config of this V1BuildStatus.
        Config is an ObjectReference to the BuildConfig this Build is based on.

        :param config: The config of this V1BuildStatus.
        :type: V1ObjectReference
        """

        self._config = config

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

        for attr, _ in iteritems(V1BuildStatus.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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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
        """
        return self.__dict__ == other.__dict__

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