Class: Forgejo::EditRepoOption
- Inherits:
-
Object
- Object
- Forgejo::EditRepoOption
- Defined in:
- lib/forgejo/models/edit_repo_option.rb
Overview
EditRepoOption options when editing a repository’s properties
Instance Attribute Summary collapse
-
#allow_fast_forward_only_merge ⇒ Object
either ‘true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.
-
#allow_manual_merge ⇒ Object
either ‘true` to allow mark pr as merged manually, or `false` to prevent it.
-
#allow_merge_commits ⇒ Object
either ‘true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.
-
#allow_rebase ⇒ Object
either ‘true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.
-
#allow_rebase_explicit ⇒ Object
either ‘true` to allow rebase with explicit merge commits (–no-ff), or `false` to prevent rebase with explicit merge commits.
-
#allow_rebase_update ⇒ Object
either ‘true` to allow updating pull request branch by rebase, or `false` to prevent it.
-
#allow_squash_merge ⇒ Object
either ‘true` to allow squash-merging pull requests, or `false` to prevent squash-merging.
-
#archived ⇒ Object
set to ‘true` to archive this repository.
-
#autodetect_manual_merge ⇒ Object
either ‘true` to enable AutodetectManualMerge, or `false` to prevent it.
-
#default_allow_maintainer_edit ⇒ Object
set to ‘true` to allow edits from maintainers by default.
-
#default_branch ⇒ Object
sets the default branch for this repository.
-
#default_delete_branch_after_merge ⇒ Object
set to ‘true` to delete pr branch after merge by default.
-
#default_merge_style ⇒ Object
set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", "squash", or "fast-forward-only".
-
#default_update_style ⇒ Object
set to a update style to be used by this repository: "rebase" or "merge".
-
#description ⇒ Object
a short description of the repository.
-
#enable_prune ⇒ Object
enable prune - remove obsolete remote-tracking references when mirroring.
-
#external_tracker ⇒ Object
Returns the value of attribute external_tracker.
-
#external_wiki ⇒ Object
Returns the value of attribute external_wiki.
-
#globally_editable_wiki ⇒ Object
set the globally editable state of the wiki.
-
#has_actions ⇒ Object
either ‘true` to enable actions unit, or `false` to disable them.
-
#has_issues ⇒ Object
either ‘true` to enable issues for this repository or `false` to disable them.
-
#has_packages ⇒ Object
either ‘true` to enable packages unit, or `false` to disable them.
-
#has_projects ⇒ Object
either ‘true` to enable project unit, or `false` to disable them.
-
#has_pull_requests ⇒ Object
either ‘true` to allow pull requests, or `false` to prevent pull request.
-
#has_releases ⇒ Object
either ‘true` to enable releases unit, or `false` to disable them.
-
#has_wiki ⇒ Object
either ‘true` to enable the wiki for this repository or `false` to disable it.
-
#ignore_whitespace_conflicts ⇒ Object
either ‘true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.
-
#internal_tracker ⇒ Object
Returns the value of attribute internal_tracker.
-
#mirror_interval ⇒ Object
set to a string like ‘8h30m0s` to set the mirror interval time.
-
#name ⇒ Object
name of the repository.
-
#private ⇒ Object
either ‘true` to make the repository private or `false` to make it public.
-
#template ⇒ Object
either ‘true` to make this repository a template or `false` to make it a normal repository.
-
#website ⇒ Object
a URL with more information about the repository.
-
#wiki_branch ⇒ Object
sets the branch used for this repository’s wiki.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EditRepoOption
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 = {}) ⇒ EditRepoOption
Initializes the object
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 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 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 216 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::EditRepoOption` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::EditRepoOption`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'allow_fast_forward_only_merge') self.allow_fast_forward_only_merge = attributes[:'allow_fast_forward_only_merge'] end if attributes.key?(:'allow_manual_merge') self.allow_manual_merge = attributes[:'allow_manual_merge'] end if attributes.key?(:'allow_merge_commits') self.allow_merge_commits = attributes[:'allow_merge_commits'] end if attributes.key?(:'allow_rebase') self.allow_rebase = attributes[:'allow_rebase'] end if attributes.key?(:'allow_rebase_explicit') self.allow_rebase_explicit = attributes[:'allow_rebase_explicit'] end if attributes.key?(:'allow_rebase_update') self.allow_rebase_update = attributes[:'allow_rebase_update'] end if attributes.key?(:'allow_squash_merge') self.allow_squash_merge = attributes[:'allow_squash_merge'] end if attributes.key?(:'archived') self.archived = attributes[:'archived'] end if attributes.key?(:'autodetect_manual_merge') self.autodetect_manual_merge = attributes[:'autodetect_manual_merge'] end if attributes.key?(:'default_allow_maintainer_edit') self.default_allow_maintainer_edit = attributes[:'default_allow_maintainer_edit'] end if attributes.key?(:'default_branch') self.default_branch = attributes[:'default_branch'] end if attributes.key?(:'default_delete_branch_after_merge') self.default_delete_branch_after_merge = attributes[:'default_delete_branch_after_merge'] end if attributes.key?(:'default_merge_style') self.default_merge_style = attributes[:'default_merge_style'] end if attributes.key?(:'default_update_style') self.default_update_style = attributes[:'default_update_style'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'enable_prune') self.enable_prune = attributes[:'enable_prune'] end if attributes.key?(:'external_tracker') self.external_tracker = attributes[:'external_tracker'] end if attributes.key?(:'external_wiki') self.external_wiki = attributes[:'external_wiki'] end if attributes.key?(:'globally_editable_wiki') self.globally_editable_wiki = attributes[:'globally_editable_wiki'] end if attributes.key?(:'has_actions') self.has_actions = attributes[:'has_actions'] end if attributes.key?(:'has_issues') self.has_issues = attributes[:'has_issues'] end if attributes.key?(:'has_packages') self.has_packages = attributes[:'has_packages'] end if attributes.key?(:'has_projects') self.has_projects = attributes[:'has_projects'] end if attributes.key?(:'has_pull_requests') self.has_pull_requests = attributes[:'has_pull_requests'] end if attributes.key?(:'has_releases') self.has_releases = attributes[:'has_releases'] end if attributes.key?(:'has_wiki') self.has_wiki = attributes[:'has_wiki'] end if attributes.key?(:'ignore_whitespace_conflicts') self.ignore_whitespace_conflicts = attributes[:'ignore_whitespace_conflicts'] end if attributes.key?(:'internal_tracker') self.internal_tracker = attributes[:'internal_tracker'] end if attributes.key?(:'mirror_interval') self.mirror_interval = attributes[:'mirror_interval'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'private') self.private = attributes[:'private'] end if attributes.key?(:'template') self.template = attributes[:'template'] end if attributes.key?(:'website') self.website = attributes[:'website'] end if attributes.key?(:'wiki_branch') self.wiki_branch = attributes[:'wiki_branch'] end end |
Instance Attribute Details
#allow_fast_forward_only_merge ⇒ Object
either ‘true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.
20 21 22 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 20 def allow_fast_forward_only_merge @allow_fast_forward_only_merge end |
#allow_manual_merge ⇒ Object
either ‘true` to allow mark pr as merged manually, or `false` to prevent it.
23 24 25 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 23 def allow_manual_merge @allow_manual_merge end |
#allow_merge_commits ⇒ Object
either ‘true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.
26 27 28 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 26 def allow_merge_commits @allow_merge_commits end |
#allow_rebase ⇒ Object
either ‘true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.
29 30 31 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 29 def allow_rebase @allow_rebase end |
#allow_rebase_explicit ⇒ Object
either ‘true` to allow rebase with explicit merge commits (–no-ff), or `false` to prevent rebase with explicit merge commits.
32 33 34 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 32 def allow_rebase_explicit @allow_rebase_explicit end |
#allow_rebase_update ⇒ Object
either ‘true` to allow updating pull request branch by rebase, or `false` to prevent it.
35 36 37 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 35 def allow_rebase_update @allow_rebase_update end |
#allow_squash_merge ⇒ Object
either ‘true` to allow squash-merging pull requests, or `false` to prevent squash-merging.
38 39 40 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 38 def allow_squash_merge @allow_squash_merge end |
#archived ⇒ Object
set to ‘true` to archive this repository.
41 42 43 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 41 def archived @archived end |
#autodetect_manual_merge ⇒ Object
either ‘true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.
44 45 46 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 44 def autodetect_manual_merge @autodetect_manual_merge end |
#default_allow_maintainer_edit ⇒ Object
set to ‘true` to allow edits from maintainers by default
47 48 49 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 47 def default_allow_maintainer_edit @default_allow_maintainer_edit end |
#default_branch ⇒ Object
sets the default branch for this repository.
50 51 52 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 50 def default_branch @default_branch end |
#default_delete_branch_after_merge ⇒ Object
set to ‘true` to delete pr branch after merge by default
53 54 55 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 53 def default_delete_branch_after_merge @default_delete_branch_after_merge end |
#default_merge_style ⇒ Object
set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", "squash", or "fast-forward-only".
56 57 58 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 56 def default_merge_style @default_merge_style end |
#default_update_style ⇒ Object
set to a update style to be used by this repository: "rebase" or "merge"
59 60 61 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 59 def default_update_style @default_update_style end |
#description ⇒ Object
a short description of the repository.
62 63 64 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 62 def description @description end |
#enable_prune ⇒ Object
enable prune - remove obsolete remote-tracking references when mirroring
65 66 67 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 65 def enable_prune @enable_prune end |
#external_tracker ⇒ Object
Returns the value of attribute external_tracker.
67 68 69 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 67 def external_tracker @external_tracker end |
#external_wiki ⇒ Object
Returns the value of attribute external_wiki.
69 70 71 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 69 def external_wiki @external_wiki end |
#globally_editable_wiki ⇒ Object
set the globally editable state of the wiki
72 73 74 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 72 def globally_editable_wiki @globally_editable_wiki end |
#has_actions ⇒ Object
either ‘true` to enable actions unit, or `false` to disable them.
75 76 77 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 75 def has_actions @has_actions end |
#has_issues ⇒ Object
either ‘true` to enable issues for this repository or `false` to disable them.
78 79 80 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 78 def has_issues @has_issues end |
#has_packages ⇒ Object
either ‘true` to enable packages unit, or `false` to disable them.
81 82 83 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 81 def has_packages @has_packages end |
#has_projects ⇒ Object
either ‘true` to enable project unit, or `false` to disable them.
84 85 86 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 84 def has_projects @has_projects end |
#has_pull_requests ⇒ Object
either ‘true` to allow pull requests, or `false` to prevent pull request.
87 88 89 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 87 def has_pull_requests @has_pull_requests end |
#has_releases ⇒ Object
either ‘true` to enable releases unit, or `false` to disable them.
90 91 92 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 90 def has_releases @has_releases end |
#has_wiki ⇒ Object
either ‘true` to enable the wiki for this repository or `false` to disable it.
93 94 95 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 93 def has_wiki @has_wiki end |
#ignore_whitespace_conflicts ⇒ Object
either ‘true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.
96 97 98 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 96 def ignore_whitespace_conflicts @ignore_whitespace_conflicts end |
#internal_tracker ⇒ Object
Returns the value of attribute internal_tracker.
98 99 100 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 98 def internal_tracker @internal_tracker end |
#mirror_interval ⇒ Object
set to a string like ‘8h30m0s` to set the mirror interval time
101 102 103 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 101 def mirror_interval @mirror_interval end |
#name ⇒ Object
name of the repository
104 105 106 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 104 def name @name end |
#private ⇒ Object
either ‘true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
107 108 109 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 107 def private @private end |
#template ⇒ Object
either ‘true` to make this repository a template or `false` to make it a normal repository
110 111 112 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 110 def template @template end |
#website ⇒ Object
a URL with more information about the repository.
113 114 115 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 113 def website @website end |
#wiki_branch ⇒ Object
sets the branch used for this repository’s wiki.
116 117 118 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 116 def wiki_branch @wiki_branch end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 462 def self._deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = Forgejo.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
159 160 161 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 159 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
164 165 166 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 164 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 119 def self.attribute_map { :'allow_fast_forward_only_merge' => :'allow_fast_forward_only_merge', :'allow_manual_merge' => :'allow_manual_merge', :'allow_merge_commits' => :'allow_merge_commits', :'allow_rebase' => :'allow_rebase', :'allow_rebase_explicit' => :'allow_rebase_explicit', :'allow_rebase_update' => :'allow_rebase_update', :'allow_squash_merge' => :'allow_squash_merge', :'archived' => :'archived', :'autodetect_manual_merge' => :'autodetect_manual_merge', :'default_allow_maintainer_edit' => :'default_allow_maintainer_edit', :'default_branch' => :'default_branch', :'default_delete_branch_after_merge' => :'default_delete_branch_after_merge', :'default_merge_style' => :'default_merge_style', :'default_update_style' => :'default_update_style', :'description' => :'description', :'enable_prune' => :'enable_prune', :'external_tracker' => :'external_tracker', :'external_wiki' => :'external_wiki', :'globally_editable_wiki' => :'globally_editable_wiki', :'has_actions' => :'has_actions', :'has_issues' => :'has_issues', :'has_packages' => :'has_packages', :'has_projects' => :'has_projects', :'has_pull_requests' => :'has_pull_requests', :'has_releases' => :'has_releases', :'has_wiki' => :'has_wiki', :'ignore_whitespace_conflicts' => :'ignore_whitespace_conflicts', :'internal_tracker' => :'internal_tracker', :'mirror_interval' => :'mirror_interval', :'name' => :'name', :'private' => :'private', :'template' => :'template', :'website' => :'website', :'wiki_branch' => :'wiki_branch' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 438 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif 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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
209 210 211 212 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 209 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 169 def self.openapi_types { :'allow_fast_forward_only_merge' => :'Boolean', :'allow_manual_merge' => :'Boolean', :'allow_merge_commits' => :'Boolean', :'allow_rebase' => :'Boolean', :'allow_rebase_explicit' => :'Boolean', :'allow_rebase_update' => :'Boolean', :'allow_squash_merge' => :'Boolean', :'archived' => :'Boolean', :'autodetect_manual_merge' => :'Boolean', :'default_allow_maintainer_edit' => :'Boolean', :'default_branch' => :'String', :'default_delete_branch_after_merge' => :'Boolean', :'default_merge_style' => :'String', :'default_update_style' => :'String', :'description' => :'String', :'enable_prune' => :'Boolean', :'external_tracker' => :'ExternalTracker', :'external_wiki' => :'ExternalWiki', :'globally_editable_wiki' => :'Boolean', :'has_actions' => :'Boolean', :'has_issues' => :'Boolean', :'has_packages' => :'Boolean', :'has_projects' => :'Boolean', :'has_pull_requests' => :'Boolean', :'has_releases' => :'Boolean', :'has_wiki' => :'Boolean', :'ignore_whitespace_conflicts' => :'Boolean', :'internal_tracker' => :'InternalTracker', :'mirror_interval' => :'String', :'name' => :'String', :'private' => :'Boolean', :'template' => :'Boolean', :'website' => :'String', :'wiki_branch' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 384 def ==(o) return true if self.equal?(o) self.class == o.class && allow_fast_forward_only_merge == o.allow_fast_forward_only_merge && allow_manual_merge == o.allow_manual_merge && allow_merge_commits == o.allow_merge_commits && allow_rebase == o.allow_rebase && allow_rebase_explicit == o.allow_rebase_explicit && allow_rebase_update == o.allow_rebase_update && allow_squash_merge == o.allow_squash_merge && archived == o.archived && autodetect_manual_merge == o.autodetect_manual_merge && default_allow_maintainer_edit == o.default_allow_maintainer_edit && default_branch == o.default_branch && default_delete_branch_after_merge == o.default_delete_branch_after_merge && default_merge_style == o.default_merge_style && default_update_style == o.default_update_style && description == o.description && enable_prune == o.enable_prune && external_tracker == o.external_tracker && external_wiki == o.external_wiki && globally_editable_wiki == o.globally_editable_wiki && has_actions == o.has_actions && has_issues == o.has_issues && has_packages == o.has_packages && has_projects == o.has_projects && has_pull_requests == o.has_pull_requests && has_releases == o.has_releases && has_wiki == o.has_wiki && ignore_whitespace_conflicts == o.ignore_whitespace_conflicts && internal_tracker == o.internal_tracker && mirror_interval == o.mirror_interval && name == o.name && private == o.private && template == o.template && website == o.website && wiki_branch == o.wiki_branch end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 533 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 |
#eql?(o) ⇒ Boolean
425 426 427 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 425 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
431 432 433 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 431 def hash [allow_fast_forward_only_merge, allow_manual_merge, allow_merge_commits, allow_rebase, allow_rebase_explicit, allow_rebase_update, allow_squash_merge, archived, autodetect_manual_merge, default_allow_maintainer_edit, default_branch, default_delete_branch_after_merge, default_merge_style, default_update_style, description, enable_prune, external_tracker, external_wiki, globally_editable_wiki, has_actions, has_issues, has_packages, has_projects, has_pull_requests, has_releases, has_wiki, ignore_whitespace_conflicts, internal_tracker, mirror_interval, name, private, template, website, wiki_branch].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
369 370 371 372 373 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 369 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
509 510 511 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 509 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 515 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
503 504 505 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 503 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
377 378 379 380 |
# File 'lib/forgejo/models/edit_repo_option.rb', line 377 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |