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 .target_details import TargetDetails
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 FunctionsTargetDetails(TargetDetails):
12    """
13    The function used for the Functions target.
14    For configuration instructions, see
15    `To create a service connector`__.
16
17    __ https://docs.cloud.oracle.com/iaas/Content/service-connector-hub/managingconnectors.htm#create
18    """
19
20    def __init__(self, **kwargs):
21        """
22        Initializes a new FunctionsTargetDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.sch.models.FunctionsTargetDetails.kind` attribute
23        of this class is ``functions`` and it should not be changed.
24        The following keyword arguments are supported (corresponding to the getters/setters of this class):
25
26        :param kind:
27            The value to assign to the kind property of this FunctionsTargetDetails.
28            Allowed values for this property are: "functions", "loggingAnalytics", "monitoring", "notifications", "objectStorage", "streaming"
29        :type kind: str
30
31        :param function_id:
32            The value to assign to the function_id property of this FunctionsTargetDetails.
33        :type function_id: str
34
35        """
36        self.swagger_types = {
37            'kind': 'str',
38            'function_id': 'str'
39        }
40
41        self.attribute_map = {
42            'kind': 'kind',
43            'function_id': 'functionId'
44        }
45
46        self._kind = None
47        self._function_id = None
48        self._kind = 'functions'
49
50    @property
51    def function_id(self):
52        """
53        **[Required]** Gets the function_id of this FunctionsTargetDetails.
54        The `OCID`__ of the function.
55
56        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
57
58
59        :return: The function_id of this FunctionsTargetDetails.
60        :rtype: str
61        """
62        return self._function_id
63
64    @function_id.setter
65    def function_id(self, function_id):
66        """
67        Sets the function_id of this FunctionsTargetDetails.
68        The `OCID`__ of the function.
69
70        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
71
72
73        :param function_id: The function_id of this FunctionsTargetDetails.
74        :type: str
75        """
76        self._function_id = function_id
77
78    def __repr__(self):
79        return formatted_flat_dict(self)
80
81    def __eq__(self, other):
82        if other is None:
83            return False
84
85        return self.__dict__ == other.__dict__
86
87    def __ne__(self, other):
88        return not self == other
89