Class: ArgoWorkflows::IoArgoprojEventsV1alpha1GithubEventSource
- Inherits:
-
Object
- Object
- ArgoWorkflows::IoArgoprojEventsV1alpha1GithubEventSource
- Defined in:
- lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#delete_hook_on_finish ⇒ Object
Returns the value of attribute delete_hook_on_finish.
-
#events ⇒ Object
Returns the value of attribute events.
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#github_app ⇒ Object
Returns the value of attribute github_app.
-
#github_base_url ⇒ Object
Returns the value of attribute github_base_url.
-
#github_upload_url ⇒ Object
Returns the value of attribute github_upload_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#insecure ⇒ Object
Returns the value of attribute insecure.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#organizations ⇒ Object
Organizations holds the names of organizations (used for organization level webhooks).
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#repositories ⇒ Object
Repositories holds the information of repositories, which uses repo owner as the key, and list of repo names as the value.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#webhook ⇒ Object
Returns the value of attribute webhook.
-
#webhook_secret ⇒ Object
Returns the value of attribute webhook_secret.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IoArgoprojEventsV1alpha1GithubEventSource
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ IoArgoprojEventsV1alpha1GithubEventSource
Initializes the object
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 105 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'active') self.active = attributes[:'active'] end if attributes.has_key?(:'apiToken') self.api_token = attributes[:'apiToken'] end if attributes.has_key?(:'contentType') self.content_type = attributes[:'contentType'] end if attributes.has_key?(:'deleteHookOnFinish') self.delete_hook_on_finish = attributes[:'deleteHookOnFinish'] end if attributes.has_key?(:'events') if (value = attributes[:'events']).is_a?(Array) self.events = value end end if attributes.has_key?(:'filter') self.filter = attributes[:'filter'] end if attributes.has_key?(:'githubApp') self.github_app = attributes[:'githubApp'] end if attributes.has_key?(:'githubBaseURL') self.github_base_url = attributes[:'githubBaseURL'] end if attributes.has_key?(:'githubUploadURL') self.github_upload_url = attributes[:'githubUploadURL'] end if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'insecure') self.insecure = attributes[:'insecure'] end if attributes.has_key?(:'metadata') if (value = attributes[:'metadata']).is_a?(Hash) self. = value end end if attributes.has_key?(:'organizations') if (value = attributes[:'organizations']).is_a?(Array) self.organizations = value end end if attributes.has_key?(:'owner') self.owner = attributes[:'owner'] end if attributes.has_key?(:'repositories') if (value = attributes[:'repositories']).is_a?(Array) self.repositories = value end end if attributes.has_key?(:'repository') self.repository = attributes[:'repository'] end if attributes.has_key?(:'webhook') self.webhook = attributes[:'webhook'] end if attributes.has_key?(:'webhookSecret') self.webhook_secret = attributes[:'webhookSecret'] end end |
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
17 18 19 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 17 def active @active end |
#api_token ⇒ Object
Returns the value of attribute api_token.
19 20 21 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 19 def api_token @api_token end |
#content_type ⇒ Object
Returns the value of attribute content_type.
21 22 23 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 21 def content_type @content_type end |
#delete_hook_on_finish ⇒ Object
Returns the value of attribute delete_hook_on_finish.
23 24 25 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 23 def delete_hook_on_finish @delete_hook_on_finish end |
#events ⇒ Object
Returns the value of attribute events.
25 26 27 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 25 def events @events end |
#filter ⇒ Object
Returns the value of attribute filter.
27 28 29 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 27 def filter @filter end |
#github_app ⇒ Object
Returns the value of attribute github_app.
29 30 31 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 29 def github_app @github_app end |
#github_base_url ⇒ Object
Returns the value of attribute github_base_url.
31 32 33 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 31 def github_base_url @github_base_url end |
#github_upload_url ⇒ Object
Returns the value of attribute github_upload_url.
33 34 35 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 33 def github_upload_url @github_upload_url end |
#id ⇒ Object
Returns the value of attribute id.
35 36 37 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 35 def id @id end |
#insecure ⇒ Object
Returns the value of attribute insecure.
37 38 39 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 37 def insecure @insecure end |
#metadata ⇒ Object
Returns the value of attribute metadata.
39 40 41 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 39 def @metadata end |
#organizations ⇒ Object
Organizations holds the names of organizations (used for organization level webhooks). Not required if Repositories is set.
42 43 44 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 42 def organizations @organizations end |
#owner ⇒ Object
Returns the value of attribute owner.
44 45 46 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 44 def owner @owner end |
#repositories ⇒ Object
Repositories holds the information of repositories, which uses repo owner as the key, and list of repo names as the value. Not required if Organizations is set.
47 48 49 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 47 def repositories @repositories end |
#repository ⇒ Object
Returns the value of attribute repository.
49 50 51 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 49 def repository @repository end |
#webhook ⇒ Object
Returns the value of attribute webhook.
51 52 53 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 51 def webhook @webhook end |
#webhook_secret ⇒ Object
Returns the value of attribute webhook_secret.
53 54 55 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 53 def webhook_secret @webhook_secret end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 56 def self.attribute_map { :'active' => :'active', :'api_token' => :'apiToken', :'content_type' => :'contentType', :'delete_hook_on_finish' => :'deleteHookOnFinish', :'events' => :'events', :'filter' => :'filter', :'github_app' => :'githubApp', :'github_base_url' => :'githubBaseURL', :'github_upload_url' => :'githubUploadURL', :'id' => :'id', :'insecure' => :'insecure', :'metadata' => :'metadata', :'organizations' => :'organizations', :'owner' => :'owner', :'repositories' => :'repositories', :'repository' => :'repository', :'webhook' => :'webhook', :'webhook_secret' => :'webhookSecret' } end |
.swagger_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 80 def self.swagger_types { :'active' => :'BOOLEAN', :'api_token' => :'IoK8sApiCoreV1SecretKeySelector', :'content_type' => :'String', :'delete_hook_on_finish' => :'BOOLEAN', :'events' => :'Array<String>', :'filter' => :'IoArgoprojEventsV1alpha1EventSourceFilter', :'github_app' => :'IoArgoprojEventsV1alpha1GithubAppCreds', :'github_base_url' => :'String', :'github_upload_url' => :'String', :'id' => :'String', :'insecure' => :'BOOLEAN', :'metadata' => :'Hash<String, String>', :'organizations' => :'Array<String>', :'owner' => :'String', :'repositories' => :'Array<IoArgoprojEventsV1alpha1OwnedRepositories>', :'repository' => :'String', :'webhook' => :'IoArgoprojEventsV1alpha1WebhookContext', :'webhook_secret' => :'IoK8sApiCoreV1SecretKeySelector' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 207 def ==(o) return true if self.equal?(o) self.class == o.class && active == o.active && api_token == o.api_token && content_type == o.content_type && delete_hook_on_finish == o.delete_hook_on_finish && events == o.events && filter == o.filter && github_app == o.github_app && github_base_url == o.github_base_url && github_upload_url == o.github_upload_url && id == o.id && insecure == o.insecure && == o. && organizations == o.organizations && owner == o.owner && repositories == o.repositories && repository == o.repository && webhook == o.webhook && webhook_secret == o.webhook_secret end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 266 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = ArgoWorkflows.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 332 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 245 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
232 233 234 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 232 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
238 239 240 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 238 def hash [active, api_token, content_type, delete_hook_on_finish, events, filter, github_app, github_base_url, github_upload_url, id, insecure, , organizations, owner, repositories, repository, webhook, webhook_secret].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
194 195 196 197 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 194 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
312 313 314 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 312 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
318 319 320 321 322 323 324 325 326 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 318 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
306 307 308 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 306 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
201 202 203 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_github_event_source.rb', line 201 def valid? true end |