1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# 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. 4 5 6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 7from oci.decorators import init_model_state_from_kwargs 8 9 10@init_model_state_from_kwargs 11class CostAnalysisUI(object): 12 """ 13 The common fields for Cost Analysis UI rendering. 14 """ 15 16 #: A constant which can be used with the graph property of a CostAnalysisUI. 17 #: This constant has a value of "BARS" 18 GRAPH_BARS = "BARS" 19 20 #: A constant which can be used with the graph property of a CostAnalysisUI. 21 #: This constant has a value of "LINES" 22 GRAPH_LINES = "LINES" 23 24 #: A constant which can be used with the graph property of a CostAnalysisUI. 25 #: This constant has a value of "STACKED_LINES" 26 GRAPH_STACKED_LINES = "STACKED_LINES" 27 28 def __init__(self, **kwargs): 29 """ 30 Initializes a new CostAnalysisUI object with values from keyword arguments. 31 The following keyword arguments are supported (corresponding to the getters/setters of this class): 32 33 :param graph: 34 The value to assign to the graph property of this CostAnalysisUI. 35 Allowed values for this property are: "BARS", "LINES", "STACKED_LINES", 'UNKNOWN_ENUM_VALUE'. 36 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 37 :type graph: str 38 39 :param is_cumulative_graph: 40 The value to assign to the is_cumulative_graph property of this CostAnalysisUI. 41 :type is_cumulative_graph: bool 42 43 """ 44 self.swagger_types = { 45 'graph': 'str', 46 'is_cumulative_graph': 'bool' 47 } 48 49 self.attribute_map = { 50 'graph': 'graph', 51 'is_cumulative_graph': 'isCumulativeGraph' 52 } 53 54 self._graph = None 55 self._is_cumulative_graph = None 56 57 @property 58 def graph(self): 59 """ 60 Gets the graph of this CostAnalysisUI. 61 The graph type. 62 63 Allowed values for this property are: "BARS", "LINES", "STACKED_LINES", 'UNKNOWN_ENUM_VALUE'. 64 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 65 66 67 :return: The graph of this CostAnalysisUI. 68 :rtype: str 69 """ 70 return self._graph 71 72 @graph.setter 73 def graph(self, graph): 74 """ 75 Sets the graph of this CostAnalysisUI. 76 The graph type. 77 78 79 :param graph: The graph of this CostAnalysisUI. 80 :type: str 81 """ 82 allowed_values = ["BARS", "LINES", "STACKED_LINES"] 83 if not value_allowed_none_or_none_sentinel(graph, allowed_values): 84 graph = 'UNKNOWN_ENUM_VALUE' 85 self._graph = graph 86 87 @property 88 def is_cumulative_graph(self): 89 """ 90 Gets the is_cumulative_graph of this CostAnalysisUI. 91 A cumulative graph. 92 93 94 :return: The is_cumulative_graph of this CostAnalysisUI. 95 :rtype: bool 96 """ 97 return self._is_cumulative_graph 98 99 @is_cumulative_graph.setter 100 def is_cumulative_graph(self, is_cumulative_graph): 101 """ 102 Sets the is_cumulative_graph of this CostAnalysisUI. 103 A cumulative graph. 104 105 106 :param is_cumulative_graph: The is_cumulative_graph of this CostAnalysisUI. 107 :type: bool 108 """ 109 self._is_cumulative_graph = is_cumulative_graph 110 111 def __repr__(self): 112 return formatted_flat_dict(self) 113 114 def __eq__(self, other): 115 if other is None: 116 return False 117 118 return self.__dict__ == other.__dict__ 119 120 def __ne__(self, other): 121 return not self == other 122