ruạṛ
# coding: utf-8 # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230831 from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ComponentProperties(object): """ The properties of the task. """ #: A constant which can be used with the action_on_failure property of a ComponentProperties. #: This constant has a value of "ABORT" ACTION_ON_FAILURE_ABORT = "ABORT" #: A constant which can be used with the action_on_failure property of a ComponentProperties. #: This constant has a value of "CONTINUE" ACTION_ON_FAILURE_CONTINUE = "CONTINUE" #: A constant which can be used with the action_on_failure property of a ComponentProperties. #: This constant has a value of "ROLLBACK" ACTION_ON_FAILURE_ROLLBACK = "ROLLBACK" def __init__(self, **kwargs): """ Initializes a new ComponentProperties object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param run_on: The value to assign to the run_on property of this ComponentProperties. :type run_on: str :param condition: The value to assign to the condition property of this ComponentProperties. :type condition: str :param action_on_failure: The value to assign to the action_on_failure property of this ComponentProperties. Allowed values for this property are: "ABORT", "CONTINUE", "ROLLBACK", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type action_on_failure: str """ self.swagger_types = { 'run_on': 'str', 'condition': 'str', 'action_on_failure': 'str' } self.attribute_map = { 'run_on': 'runOn', 'condition': 'condition', 'action_on_failure': 'actionOnFailure' } self._run_on = None self._condition = None self._action_on_failure = None @property def run_on(self): """ Gets the run_on of this ComponentProperties. The hosts to execute on. :return: The run_on of this ComponentProperties. :rtype: str """ return self._run_on @run_on.setter def run_on(self, run_on): """ Sets the run_on of this ComponentProperties. The hosts to execute on. :param run_on: The run_on of this ComponentProperties. :type: str """ self._run_on = run_on @property def condition(self): """ Gets the condition of this ComponentProperties. The condition in which the task is to be executed. :return: The condition of this ComponentProperties. :rtype: str """ return self._condition @condition.setter def condition(self, condition): """ Sets the condition of this ComponentProperties. The condition in which the task is to be executed. :param condition: The condition of this ComponentProperties. :type: str """ self._condition = condition @property def action_on_failure(self): """ **[Required]** Gets the action_on_failure of this ComponentProperties. The action to be taken in case of task failure. Allowed values for this property are: "ABORT", "CONTINUE", "ROLLBACK", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The action_on_failure of this ComponentProperties. :rtype: str """ return self._action_on_failure @action_on_failure.setter def action_on_failure(self, action_on_failure): """ Sets the action_on_failure of this ComponentProperties. The action to be taken in case of task failure. :param action_on_failure: The action_on_failure of this ComponentProperties. :type: str """ allowed_values = ["ABORT", "CONTINUE", "ROLLBACK"] if not value_allowed_none_or_none_sentinel(action_on_failure, allowed_values): action_on_failure = 'UNKNOWN_ENUM_VALUE' self._action_on_failure = action_on_failure def __repr__(self): return formatted_flat_dict(self) def __eq__(self, other): if other is None: return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other
cải xoăn