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 .trigger_create_result import TriggerCreateResult 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 GitlabTriggerCreateResult(TriggerCreateResult): 12 """ 13 Trigger create response specific to GitLab. 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new GitlabTriggerCreateResult object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabTriggerCreateResult.trigger_source` attribute 19 of this class is ``GITLAB`` and it should not be changed. 20 The following keyword arguments are supported (corresponding to the getters/setters of this class): 21 22 :param id: 23 The value to assign to the id property of this GitlabTriggerCreateResult. 24 :type id: str 25 26 :param display_name: 27 The value to assign to the display_name property of this GitlabTriggerCreateResult. 28 :type display_name: str 29 30 :param description: 31 The value to assign to the description property of this GitlabTriggerCreateResult. 32 :type description: str 33 34 :param project_id: 35 The value to assign to the project_id property of this GitlabTriggerCreateResult. 36 :type project_id: str 37 38 :param compartment_id: 39 The value to assign to the compartment_id property of this GitlabTriggerCreateResult. 40 :type compartment_id: str 41 42 :param trigger_source: 43 The value to assign to the trigger_source property of this GitlabTriggerCreateResult. 44 :type trigger_source: str 45 46 :param time_created: 47 The value to assign to the time_created property of this GitlabTriggerCreateResult. 48 :type time_created: datetime 49 50 :param time_updated: 51 The value to assign to the time_updated property of this GitlabTriggerCreateResult. 52 :type time_updated: datetime 53 54 :param lifecycle_state: 55 The value to assign to the lifecycle_state property of this GitlabTriggerCreateResult. 56 :type lifecycle_state: str 57 58 :param lifecycle_details: 59 The value to assign to the lifecycle_details property of this GitlabTriggerCreateResult. 60 :type lifecycle_details: str 61 62 :param actions: 63 The value to assign to the actions property of this GitlabTriggerCreateResult. 64 :type actions: list[oci.devops.models.TriggerAction] 65 66 :param freeform_tags: 67 The value to assign to the freeform_tags property of this GitlabTriggerCreateResult. 68 :type freeform_tags: dict(str, str) 69 70 :param defined_tags: 71 The value to assign to the defined_tags property of this GitlabTriggerCreateResult. 72 :type defined_tags: dict(str, dict(str, object)) 73 74 :param system_tags: 75 The value to assign to the system_tags property of this GitlabTriggerCreateResult. 76 :type system_tags: dict(str, dict(str, object)) 77 78 :param secret: 79 The value to assign to the secret property of this GitlabTriggerCreateResult. 80 :type secret: str 81 82 :param trigger_url: 83 The value to assign to the trigger_url property of this GitlabTriggerCreateResult. 84 :type trigger_url: str 85 86 """ 87 self.swagger_types = { 88 'id': 'str', 89 'display_name': 'str', 90 'description': 'str', 91 'project_id': 'str', 92 'compartment_id': 'str', 93 'trigger_source': 'str', 94 'time_created': 'datetime', 95 'time_updated': 'datetime', 96 'lifecycle_state': 'str', 97 'lifecycle_details': 'str', 98 'actions': 'list[TriggerAction]', 99 'freeform_tags': 'dict(str, str)', 100 'defined_tags': 'dict(str, dict(str, object))', 101 'system_tags': 'dict(str, dict(str, object))', 102 'secret': 'str', 103 'trigger_url': 'str' 104 } 105 106 self.attribute_map = { 107 'id': 'id', 108 'display_name': 'displayName', 109 'description': 'description', 110 'project_id': 'projectId', 111 'compartment_id': 'compartmentId', 112 'trigger_source': 'triggerSource', 113 'time_created': 'timeCreated', 114 'time_updated': 'timeUpdated', 115 'lifecycle_state': 'lifecycleState', 116 'lifecycle_details': 'lifecycleDetails', 117 'actions': 'actions', 118 'freeform_tags': 'freeformTags', 119 'defined_tags': 'definedTags', 120 'system_tags': 'systemTags', 121 'secret': 'secret', 122 'trigger_url': 'triggerUrl' 123 } 124 125 self._id = None 126 self._display_name = None 127 self._description = None 128 self._project_id = None 129 self._compartment_id = None 130 self._trigger_source = None 131 self._time_created = None 132 self._time_updated = None 133 self._lifecycle_state = None 134 self._lifecycle_details = None 135 self._actions = None 136 self._freeform_tags = None 137 self._defined_tags = None 138 self._system_tags = None 139 self._secret = None 140 self._trigger_url = None 141 self._trigger_source = 'GITLAB' 142 143 @property 144 def secret(self): 145 """ 146 **[Required]** Gets the secret of this GitlabTriggerCreateResult. 147 The secret used to validate the incoming trigger call. This is visible only after the resource is created. 148 149 150 :return: The secret of this GitlabTriggerCreateResult. 151 :rtype: str 152 """ 153 return self._secret 154 155 @secret.setter 156 def secret(self, secret): 157 """ 158 Sets the secret of this GitlabTriggerCreateResult. 159 The secret used to validate the incoming trigger call. This is visible only after the resource is created. 160 161 162 :param secret: The secret of this GitlabTriggerCreateResult. 163 :type: str 164 """ 165 self._secret = secret 166 167 @property 168 def trigger_url(self): 169 """ 170 **[Required]** Gets the trigger_url of this GitlabTriggerCreateResult. 171 The endpoint that listens to trigger events. 172 173 174 :return: The trigger_url of this GitlabTriggerCreateResult. 175 :rtype: str 176 """ 177 return self._trigger_url 178 179 @trigger_url.setter 180 def trigger_url(self, trigger_url): 181 """ 182 Sets the trigger_url of this GitlabTriggerCreateResult. 183 The endpoint that listens to trigger events. 184 185 186 :param trigger_url: The trigger_url of this GitlabTriggerCreateResult. 187 :type: str 188 """ 189 self._trigger_url = trigger_url 190 191 def __repr__(self): 192 return formatted_flat_dict(self) 193 194 def __eq__(self, other): 195 if other is None: 196 return False 197 198 return self.__dict__ == other.__dict__ 199 200 def __ne__(self, other): 201 return not self == other 202