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
5from .job_execution_result_details import JobExecutionResultDetails
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 ObjectStorageJobExecutionResultDetails(JobExecutionResultDetails):
12    """
13    The details of the job execution result stored in Object Storage. The
14    job execution result could be accessed using the Object Storage API.
15    """
16
17    def __init__(self, **kwargs):
18        """
19        Initializes a new ObjectStorageJobExecutionResultDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_management.models.ObjectStorageJobExecutionResultDetails.type` attribute
20        of this class is ``OBJECT_STORAGE`` and it should not be changed.
21        The following keyword arguments are supported (corresponding to the getters/setters of this class):
22
23        :param type:
24            The value to assign to the type property of this ObjectStorageJobExecutionResultDetails.
25            Allowed values for this property are: "OBJECT_STORAGE"
26        :type type: str
27
28        :param namespace_name:
29            The value to assign to the namespace_name property of this ObjectStorageJobExecutionResultDetails.
30        :type namespace_name: str
31
32        :param bucket_name:
33            The value to assign to the bucket_name property of this ObjectStorageJobExecutionResultDetails.
34        :type bucket_name: str
35
36        :param object_name:
37            The value to assign to the object_name property of this ObjectStorageJobExecutionResultDetails.
38        :type object_name: str
39
40        :param row_count:
41            The value to assign to the row_count property of this ObjectStorageJobExecutionResultDetails.
42        :type row_count: int
43
44        """
45        self.swagger_types = {
46            'type': 'str',
47            'namespace_name': 'str',
48            'bucket_name': 'str',
49            'object_name': 'str',
50            'row_count': 'int'
51        }
52
53        self.attribute_map = {
54            'type': 'type',
55            'namespace_name': 'namespaceName',
56            'bucket_name': 'bucketName',
57            'object_name': 'objectName',
58            'row_count': 'rowCount'
59        }
60
61        self._type = None
62        self._namespace_name = None
63        self._bucket_name = None
64        self._object_name = None
65        self._row_count = None
66        self._type = 'OBJECT_STORAGE'
67
68    @property
69    def namespace_name(self):
70        """
71        Gets the namespace_name of this ObjectStorageJobExecutionResultDetails.
72        The Object Storage namespace used for job execution result storage.
73
74
75        :return: The namespace_name of this ObjectStorageJobExecutionResultDetails.
76        :rtype: str
77        """
78        return self._namespace_name
79
80    @namespace_name.setter
81    def namespace_name(self, namespace_name):
82        """
83        Sets the namespace_name of this ObjectStorageJobExecutionResultDetails.
84        The Object Storage namespace used for job execution result storage.
85
86
87        :param namespace_name: The namespace_name of this ObjectStorageJobExecutionResultDetails.
88        :type: str
89        """
90        self._namespace_name = namespace_name
91
92    @property
93    def bucket_name(self):
94        """
95        Gets the bucket_name of this ObjectStorageJobExecutionResultDetails.
96        The name of the bucket used for job execution result storage.
97
98
99        :return: The bucket_name of this ObjectStorageJobExecutionResultDetails.
100        :rtype: str
101        """
102        return self._bucket_name
103
104    @bucket_name.setter
105    def bucket_name(self, bucket_name):
106        """
107        Sets the bucket_name of this ObjectStorageJobExecutionResultDetails.
108        The name of the bucket used for job execution result storage.
109
110
111        :param bucket_name: The bucket_name of this ObjectStorageJobExecutionResultDetails.
112        :type: str
113        """
114        self._bucket_name = bucket_name
115
116    @property
117    def object_name(self):
118        """
119        Gets the object_name of this ObjectStorageJobExecutionResultDetails.
120        The name of the object containing the job execution result.
121
122
123        :return: The object_name of this ObjectStorageJobExecutionResultDetails.
124        :rtype: str
125        """
126        return self._object_name
127
128    @object_name.setter
129    def object_name(self, object_name):
130        """
131        Sets the object_name of this ObjectStorageJobExecutionResultDetails.
132        The name of the object containing the job execution result.
133
134
135        :param object_name: The object_name of this ObjectStorageJobExecutionResultDetails.
136        :type: str
137        """
138        self._object_name = object_name
139
140    @property
141    def row_count(self):
142        """
143        Gets the row_count of this ObjectStorageJobExecutionResultDetails.
144        The number of rows returned in the result. Only applicable for QUERY SqlType.
145
146
147        :return: The row_count of this ObjectStorageJobExecutionResultDetails.
148        :rtype: int
149        """
150        return self._row_count
151
152    @row_count.setter
153    def row_count(self, row_count):
154        """
155        Sets the row_count of this ObjectStorageJobExecutionResultDetails.
156        The number of rows returned in the result. Only applicable for QUERY SqlType.
157
158
159        :param row_count: The row_count of this ObjectStorageJobExecutionResultDetails.
160        :type: int
161        """
162        self._row_count = row_count
163
164    def __repr__(self):
165        return formatted_flat_dict(self)
166
167    def __eq__(self, other):
168        if other is None:
169            return False
170
171        return self.__dict__ == other.__dict__
172
173    def __ne__(self, other):
174        return not self == other
175