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 WorkRequestResource(object):
12    """
13    The resource on which the work request is operating.
14    """
15
16    #: A constant which can be used with the action_type property of a WorkRequestResource.
17    #: This constant has a value of "IN_PROGRESS"
18    ACTION_TYPE_IN_PROGRESS = "IN_PROGRESS"
19
20    #: A constant which can be used with the action_type property of a WorkRequestResource.
21    #: This constant has a value of "CREATED"
22    ACTION_TYPE_CREATED = "CREATED"
23
24    #: A constant which can be used with the action_type property of a WorkRequestResource.
25    #: This constant has a value of "UPDATED"
26    ACTION_TYPE_UPDATED = "UPDATED"
27
28    #: A constant which can be used with the action_type property of a WorkRequestResource.
29    #: This constant has a value of "DELETED"
30    ACTION_TYPE_DELETED = "DELETED"
31
32    #: A constant which can be used with the action_type property of a WorkRequestResource.
33    #: This constant has a value of "RELATED"
34    ACTION_TYPE_RELATED = "RELATED"
35
36    #: A constant which can be used with the action_type property of a WorkRequestResource.
37    #: This constant has a value of "PURGED"
38    ACTION_TYPE_PURGED = "PURGED"
39
40    def __init__(self, **kwargs):
41        """
42        Initializes a new WorkRequestResource object with values from keyword arguments.
43        The following keyword arguments are supported (corresponding to the getters/setters of this class):
44
45        :param action_type:
46            The value to assign to the action_type property of this WorkRequestResource.
47            Allowed values for this property are: "IN_PROGRESS", "CREATED", "UPDATED", "DELETED", "RELATED", "PURGED", 'UNKNOWN_ENUM_VALUE'.
48            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
49        :type action_type: str
50
51        :param entity_type:
52            The value to assign to the entity_type property of this WorkRequestResource.
53        :type entity_type: str
54
55        :param identifier:
56            The value to assign to the identifier property of this WorkRequestResource.
57        :type identifier: str
58
59        :param entity_uri:
60            The value to assign to the entity_uri property of this WorkRequestResource.
61        :type entity_uri: str
62
63        """
64        self.swagger_types = {
65            'action_type': 'str',
66            'entity_type': 'str',
67            'identifier': 'str',
68            'entity_uri': 'str'
69        }
70
71        self.attribute_map = {
72            'action_type': 'actionType',
73            'entity_type': 'entityType',
74            'identifier': 'identifier',
75            'entity_uri': 'entityUri'
76        }
77
78        self._action_type = None
79        self._entity_type = None
80        self._identifier = None
81        self._entity_uri = None
82
83    @property
84    def action_type(self):
85        """
86        Gets the action_type of this WorkRequestResource.
87        How the work request affects the resource.
88
89        Allowed values for this property are: "IN_PROGRESS", "CREATED", "UPDATED", "DELETED", "RELATED", "PURGED", 'UNKNOWN_ENUM_VALUE'.
90        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
91
92
93        :return: The action_type of this WorkRequestResource.
94        :rtype: str
95        """
96        return self._action_type
97
98    @action_type.setter
99    def action_type(self, action_type):
100        """
101        Sets the action_type of this WorkRequestResource.
102        How the work request affects the resource.
103
104
105        :param action_type: The action_type of this WorkRequestResource.
106        :type: str
107        """
108        allowed_values = ["IN_PROGRESS", "CREATED", "UPDATED", "DELETED", "RELATED", "PURGED"]
109        if not value_allowed_none_or_none_sentinel(action_type, allowed_values):
110            action_type = 'UNKNOWN_ENUM_VALUE'
111        self._action_type = action_type
112
113    @property
114    def entity_type(self):
115        """
116        Gets the entity_type of this WorkRequestResource.
117        The resource type the work request affects.
118
119
120        :return: The entity_type of this WorkRequestResource.
121        :rtype: str
122        """
123        return self._entity_type
124
125    @entity_type.setter
126    def entity_type(self, entity_type):
127        """
128        Sets the entity_type of this WorkRequestResource.
129        The resource type the work request affects.
130
131
132        :param entity_type: The entity_type of this WorkRequestResource.
133        :type: str
134        """
135        self._entity_type = entity_type
136
137    @property
138    def identifier(self):
139        """
140        Gets the identifier of this WorkRequestResource.
141        The `OCID`__ of the resource that the work request affects.
142
143        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
144
145
146        :return: The identifier of this WorkRequestResource.
147        :rtype: str
148        """
149        return self._identifier
150
151    @identifier.setter
152    def identifier(self, identifier):
153        """
154        Sets the identifier of this WorkRequestResource.
155        The `OCID`__ of the resource that the work request affects.
156
157        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
158
159
160        :param identifier: The identifier of this WorkRequestResource.
161        :type: str
162        """
163        self._identifier = identifier
164
165    @property
166    def entity_uri(self):
167        """
168        Gets the entity_uri of this WorkRequestResource.
169        The URI path used while performing a `GET` to access the resource metadata.
170
171
172        :return: The entity_uri of this WorkRequestResource.
173        :rtype: str
174        """
175        return self._entity_uri
176
177    @entity_uri.setter
178    def entity_uri(self, entity_uri):
179        """
180        Sets the entity_uri of this WorkRequestResource.
181        The URI path used while performing a `GET` to access the resource metadata.
182
183
184        :param entity_uri: The entity_uri of this WorkRequestResource.
185        :type: str
186        """
187        self._entity_uri = entity_uri
188
189    def __repr__(self):
190        return formatted_flat_dict(self)
191
192    def __eq__(self, other):
193        if other is None:
194            return False
195
196        return self.__dict__ == other.__dict__
197
198    def __ne__(self, other):
199        return not self == other
200