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