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 CreateViewDetails(object): 12 """ 13 The body for defining a new view. 14 15 **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. 16 """ 17 18 def __init__(self, **kwargs): 19 """ 20 Initializes a new CreateViewDetails object with values from keyword arguments. 21 The following keyword arguments are supported (corresponding to the getters/setters of this class): 22 23 :param compartment_id: 24 The value to assign to the compartment_id property of this CreateViewDetails. 25 :type compartment_id: str 26 27 :param display_name: 28 The value to assign to the display_name property of this CreateViewDetails. 29 :type display_name: str 30 31 :param freeform_tags: 32 The value to assign to the freeform_tags property of this CreateViewDetails. 33 :type freeform_tags: dict(str, str) 34 35 :param defined_tags: 36 The value to assign to the defined_tags property of this CreateViewDetails. 37 :type defined_tags: dict(str, dict(str, object)) 38 39 """ 40 self.swagger_types = { 41 'compartment_id': 'str', 42 'display_name': 'str', 43 'freeform_tags': 'dict(str, str)', 44 'defined_tags': 'dict(str, dict(str, object))' 45 } 46 47 self.attribute_map = { 48 'compartment_id': 'compartmentId', 49 'display_name': 'displayName', 50 'freeform_tags': 'freeformTags', 51 'defined_tags': 'definedTags' 52 } 53 54 self._compartment_id = None 55 self._display_name = None 56 self._freeform_tags = None 57 self._defined_tags = None 58 59 @property 60 def compartment_id(self): 61 """ 62 **[Required]** Gets the compartment_id of this CreateViewDetails. 63 The OCID of the owning compartment. 64 65 66 :return: The compartment_id of this CreateViewDetails. 67 :rtype: str 68 """ 69 return self._compartment_id 70 71 @compartment_id.setter 72 def compartment_id(self, compartment_id): 73 """ 74 Sets the compartment_id of this CreateViewDetails. 75 The OCID of the owning compartment. 76 77 78 :param compartment_id: The compartment_id of this CreateViewDetails. 79 :type: str 80 """ 81 self._compartment_id = compartment_id 82 83 @property 84 def display_name(self): 85 """ 86 Gets the display_name of this CreateViewDetails. 87 The display name of the view. 88 89 90 :return: The display_name of this CreateViewDetails. 91 :rtype: str 92 """ 93 return self._display_name 94 95 @display_name.setter 96 def display_name(self, display_name): 97 """ 98 Sets the display_name of this CreateViewDetails. 99 The display name of the view. 100 101 102 :param display_name: The display_name of this CreateViewDetails. 103 :type: str 104 """ 105 self._display_name = display_name 106 107 @property 108 def freeform_tags(self): 109 """ 110 Gets the freeform_tags of this CreateViewDetails. 111 Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. 112 For more information, see `Resource Tags`__. 113 114 115 **Example:** `{\"Department\": \"Finance\"}` 116 117 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 118 119 120 :return: The freeform_tags of this CreateViewDetails. 121 :rtype: dict(str, str) 122 """ 123 return self._freeform_tags 124 125 @freeform_tags.setter 126 def freeform_tags(self, freeform_tags): 127 """ 128 Sets the freeform_tags of this CreateViewDetails. 129 Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. 130 For more information, see `Resource Tags`__. 131 132 133 **Example:** `{\"Department\": \"Finance\"}` 134 135 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 136 137 138 :param freeform_tags: The freeform_tags of this CreateViewDetails. 139 :type: dict(str, str) 140 """ 141 self._freeform_tags = freeform_tags 142 143 @property 144 def defined_tags(self): 145 """ 146 Gets the defined_tags of this CreateViewDetails. 147 Defined tags for this resource. Each key is predefined and scoped to a namespace. 148 For more information, see `Resource Tags`__. 149 150 151 **Example:** `{\"Operations\": {\"CostCenter\": \"42\"}}` 152 153 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 154 155 156 :return: The defined_tags of this CreateViewDetails. 157 :rtype: dict(str, dict(str, object)) 158 """ 159 return self._defined_tags 160 161 @defined_tags.setter 162 def defined_tags(self, defined_tags): 163 """ 164 Sets the defined_tags of this CreateViewDetails. 165 Defined tags for this resource. Each key is predefined and scoped to a namespace. 166 For more information, see `Resource Tags`__. 167 168 169 **Example:** `{\"Operations\": {\"CostCenter\": \"42\"}}` 170 171 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 172 173 174 :param defined_tags: The defined_tags of this CreateViewDetails. 175 :type: dict(str, dict(str, object)) 176 """ 177 self._defined_tags = defined_tags 178 179 def __repr__(self): 180 return formatted_flat_dict(self) 181 182 def __eq__(self, other): 183 if other is None: 184 return False 185 186 return self.__dict__ == other.__dict__ 187 188 def __ne__(self, other): 189 return not self == other 190