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 CreateDataPumpParameters(object): 12 """ 13 Optional parameters for Data Pump Export and Import. Refer to `Configuring Optional Initial Load Advanced Settings`__ 14 15 __ https://docs.us.oracle.com/en/cloud/paas/database-migration/dmsus/working-migration-resources.html#GUID-24BD3054-FDF8-48FF-8492-636C1D4B71ED 16 """ 17 18 #: A constant which can be used with the estimate property of a CreateDataPumpParameters. 19 #: This constant has a value of "BLOCKS" 20 ESTIMATE_BLOCKS = "BLOCKS" 21 22 #: A constant which can be used with the estimate property of a CreateDataPumpParameters. 23 #: This constant has a value of "STATISTICS" 24 ESTIMATE_STATISTICS = "STATISTICS" 25 26 #: A constant which can be used with the table_exists_action property of a CreateDataPumpParameters. 27 #: This constant has a value of "TRUNCATE" 28 TABLE_EXISTS_ACTION_TRUNCATE = "TRUNCATE" 29 30 #: A constant which can be used with the table_exists_action property of a CreateDataPumpParameters. 31 #: This constant has a value of "REPLACE" 32 TABLE_EXISTS_ACTION_REPLACE = "REPLACE" 33 34 #: A constant which can be used with the table_exists_action property of a CreateDataPumpParameters. 35 #: This constant has a value of "APPEND" 36 TABLE_EXISTS_ACTION_APPEND = "APPEND" 37 38 #: A constant which can be used with the table_exists_action property of a CreateDataPumpParameters. 39 #: This constant has a value of "SKIP" 40 TABLE_EXISTS_ACTION_SKIP = "SKIP" 41 42 def __init__(self, **kwargs): 43 """ 44 Initializes a new CreateDataPumpParameters object with values from keyword arguments. 45 The following keyword arguments are supported (corresponding to the getters/setters of this class): 46 47 :param is_cluster: 48 The value to assign to the is_cluster property of this CreateDataPumpParameters. 49 :type is_cluster: bool 50 51 :param estimate: 52 The value to assign to the estimate property of this CreateDataPumpParameters. 53 Allowed values for this property are: "BLOCKS", "STATISTICS" 54 :type estimate: str 55 56 :param table_exists_action: 57 The value to assign to the table_exists_action property of this CreateDataPumpParameters. 58 Allowed values for this property are: "TRUNCATE", "REPLACE", "APPEND", "SKIP" 59 :type table_exists_action: str 60 61 :param exclude_parameters: 62 The value to assign to the exclude_parameters property of this CreateDataPumpParameters. 63 :type exclude_parameters: list[oci.database_migration.models.DataPumpExcludeParameters] 64 65 :param import_parallelism_degree: 66 The value to assign to the import_parallelism_degree property of this CreateDataPumpParameters. 67 :type import_parallelism_degree: int 68 69 :param export_parallelism_degree: 70 The value to assign to the export_parallelism_degree property of this CreateDataPumpParameters. 71 :type export_parallelism_degree: int 72 73 """ 74 self.swagger_types = { 75 'is_cluster': 'bool', 76 'estimate': 'str', 77 'table_exists_action': 'str', 78 'exclude_parameters': 'list[DataPumpExcludeParameters]', 79 'import_parallelism_degree': 'int', 80 'export_parallelism_degree': 'int' 81 } 82 83 self.attribute_map = { 84 'is_cluster': 'isCluster', 85 'estimate': 'estimate', 86 'table_exists_action': 'tableExistsAction', 87 'exclude_parameters': 'excludeParameters', 88 'import_parallelism_degree': 'importParallelismDegree', 89 'export_parallelism_degree': 'exportParallelismDegree' 90 } 91 92 self._is_cluster = None 93 self._estimate = None 94 self._table_exists_action = None 95 self._exclude_parameters = None 96 self._import_parallelism_degree = None 97 self._export_parallelism_degree = None 98 99 @property 100 def is_cluster(self): 101 """ 102 Gets the is_cluster of this CreateDataPumpParameters. 103 Set to false to force Data Pump worker process to run on one instance. 104 105 106 :return: The is_cluster of this CreateDataPumpParameters. 107 :rtype: bool 108 """ 109 return self._is_cluster 110 111 @is_cluster.setter 112 def is_cluster(self, is_cluster): 113 """ 114 Sets the is_cluster of this CreateDataPumpParameters. 115 Set to false to force Data Pump worker process to run on one instance. 116 117 118 :param is_cluster: The is_cluster of this CreateDataPumpParameters. 119 :type: bool 120 """ 121 self._is_cluster = is_cluster 122 123 @property 124 def estimate(self): 125 """ 126 Gets the estimate of this CreateDataPumpParameters. 127 Estimate size of dumps that will be generated. 128 129 Allowed values for this property are: "BLOCKS", "STATISTICS" 130 131 132 :return: The estimate of this CreateDataPumpParameters. 133 :rtype: str 134 """ 135 return self._estimate 136 137 @estimate.setter 138 def estimate(self, estimate): 139 """ 140 Sets the estimate of this CreateDataPumpParameters. 141 Estimate size of dumps that will be generated. 142 143 144 :param estimate: The estimate of this CreateDataPumpParameters. 145 :type: str 146 """ 147 allowed_values = ["BLOCKS", "STATISTICS"] 148 if not value_allowed_none_or_none_sentinel(estimate, allowed_values): 149 raise ValueError( 150 "Invalid value for `estimate`, must be None or one of {0}" 151 .format(allowed_values) 152 ) 153 self._estimate = estimate 154 155 @property 156 def table_exists_action(self): 157 """ 158 Gets the table_exists_action of this CreateDataPumpParameters. 159 IMPORT: Specifies the action to be performed when data is loaded into a preexisting table. 160 161 Allowed values for this property are: "TRUNCATE", "REPLACE", "APPEND", "SKIP" 162 163 164 :return: The table_exists_action of this CreateDataPumpParameters. 165 :rtype: str 166 """ 167 return self._table_exists_action 168 169 @table_exists_action.setter 170 def table_exists_action(self, table_exists_action): 171 """ 172 Sets the table_exists_action of this CreateDataPumpParameters. 173 IMPORT: Specifies the action to be performed when data is loaded into a preexisting table. 174 175 176 :param table_exists_action: The table_exists_action of this CreateDataPumpParameters. 177 :type: str 178 """ 179 allowed_values = ["TRUNCATE", "REPLACE", "APPEND", "SKIP"] 180 if not value_allowed_none_or_none_sentinel(table_exists_action, allowed_values): 181 raise ValueError( 182 "Invalid value for `table_exists_action`, must be None or one of {0}" 183 .format(allowed_values) 184 ) 185 self._table_exists_action = table_exists_action 186 187 @property 188 def exclude_parameters(self): 189 """ 190 Gets the exclude_parameters of this CreateDataPumpParameters. 191 Exclude paratemers for Export and Import. 192 193 194 :return: The exclude_parameters of this CreateDataPumpParameters. 195 :rtype: list[oci.database_migration.models.DataPumpExcludeParameters] 196 """ 197 return self._exclude_parameters 198 199 @exclude_parameters.setter 200 def exclude_parameters(self, exclude_parameters): 201 """ 202 Sets the exclude_parameters of this CreateDataPumpParameters. 203 Exclude paratemers for Export and Import. 204 205 206 :param exclude_parameters: The exclude_parameters of this CreateDataPumpParameters. 207 :type: list[oci.database_migration.models.DataPumpExcludeParameters] 208 """ 209 self._exclude_parameters = exclude_parameters 210 211 @property 212 def import_parallelism_degree(self): 213 """ 214 Gets the import_parallelism_degree of this CreateDataPumpParameters. 215 Maximum number of worker processes that can be used for a Data Pump Import job. 216 For an Autonomous Database, ODMS will automatically query its CPU core count and set this property. 217 218 219 :return: The import_parallelism_degree of this CreateDataPumpParameters. 220 :rtype: int 221 """ 222 return self._import_parallelism_degree 223 224 @import_parallelism_degree.setter 225 def import_parallelism_degree(self, import_parallelism_degree): 226 """ 227 Sets the import_parallelism_degree of this CreateDataPumpParameters. 228 Maximum number of worker processes that can be used for a Data Pump Import job. 229 For an Autonomous Database, ODMS will automatically query its CPU core count and set this property. 230 231 232 :param import_parallelism_degree: The import_parallelism_degree of this CreateDataPumpParameters. 233 :type: int 234 """ 235 self._import_parallelism_degree = import_parallelism_degree 236 237 @property 238 def export_parallelism_degree(self): 239 """ 240 Gets the export_parallelism_degree of this CreateDataPumpParameters. 241 Maximum number of worker processes that can be used for a Data Pump Export job. 242 243 244 :return: The export_parallelism_degree of this CreateDataPumpParameters. 245 :rtype: int 246 """ 247 return self._export_parallelism_degree 248 249 @export_parallelism_degree.setter 250 def export_parallelism_degree(self, export_parallelism_degree): 251 """ 252 Sets the export_parallelism_degree of this CreateDataPumpParameters. 253 Maximum number of worker processes that can be used for a Data Pump Export job. 254 255 256 :param export_parallelism_degree: The export_parallelism_degree of this CreateDataPumpParameters. 257 :type: int 258 """ 259 self._export_parallelism_degree = export_parallelism_degree 260 261 def __repr__(self): 262 return formatted_flat_dict(self) 263 264 def __eq__(self, other): 265 if other is None: 266 return False 267 268 return self.__dict__ == other.__dict__ 269 270 def __ne__(self, other): 271 return not self == other 272