Class: Forgejo::Repository
- Inherits:
-
Object
- Object
- Forgejo::Repository
- Defined in:
- lib/forgejo/models/repository.rb
Overview
Repository represents a repository
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_fast_forward_only_merge ⇒ Object
Returns the value of attribute allow_fast_forward_only_merge.
-
#allow_merge_commits ⇒ Object
Returns the value of attribute allow_merge_commits.
-
#allow_rebase ⇒ Object
Returns the value of attribute allow_rebase.
-
#allow_rebase_explicit ⇒ Object
Returns the value of attribute allow_rebase_explicit.
-
#allow_rebase_update ⇒ Object
Returns the value of attribute allow_rebase_update.
-
#allow_squash_merge ⇒ Object
Returns the value of attribute allow_squash_merge.
-
#archived ⇒ Object
Returns the value of attribute archived.
-
#archived_at ⇒ Object
Returns the value of attribute archived_at.
-
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
-
#clone_url ⇒ Object
Returns the value of attribute clone_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#default_allow_maintainer_edit ⇒ Object
Returns the value of attribute default_allow_maintainer_edit.
-
#default_branch ⇒ Object
Returns the value of attribute default_branch.
-
#default_delete_branch_after_merge ⇒ Object
Returns the value of attribute default_delete_branch_after_merge.
-
#default_merge_style ⇒ Object
Returns the value of attribute default_merge_style.
-
#description ⇒ Object
Returns the value of attribute description.
-
#empty ⇒ Object
Returns the value of attribute empty.
-
#external_tracker ⇒ Object
Returns the value of attribute external_tracker.
-
#external_wiki ⇒ Object
Returns the value of attribute external_wiki.
-
#fork ⇒ Object
Returns the value of attribute fork.
-
#forks_count ⇒ Object
Returns the value of attribute forks_count.
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#globally_editable_wiki ⇒ Object
Returns the value of attribute globally_editable_wiki.
-
#has_actions ⇒ Object
Returns the value of attribute has_actions.
-
#has_issues ⇒ Object
Returns the value of attribute has_issues.
-
#has_packages ⇒ Object
Returns the value of attribute has_packages.
-
#has_projects ⇒ Object
Returns the value of attribute has_projects.
-
#has_pull_requests ⇒ Object
Returns the value of attribute has_pull_requests.
-
#has_releases ⇒ Object
Returns the value of attribute has_releases.
-
#has_wiki ⇒ Object
Returns the value of attribute has_wiki.
-
#html_url ⇒ Object
Returns the value of attribute html_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#ignore_whitespace_conflicts ⇒ Object
Returns the value of attribute ignore_whitespace_conflicts.
-
#internal ⇒ Object
Returns the value of attribute internal.
-
#internal_tracker ⇒ Object
Returns the value of attribute internal_tracker.
-
#language ⇒ Object
Returns the value of attribute language.
-
#languages_url ⇒ Object
Returns the value of attribute languages_url.
-
#link ⇒ Object
Returns the value of attribute link.
-
#mirror ⇒ Object
Returns the value of attribute mirror.
-
#mirror_interval ⇒ Object
Returns the value of attribute mirror_interval.
-
#mirror_updated ⇒ Object
Returns the value of attribute mirror_updated.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object_format_name ⇒ Object
ObjectFormatName of the underlying git repository.
-
#open_issues_count ⇒ Object
Returns the value of attribute open_issues_count.
-
#open_pr_counter ⇒ Object
Returns the value of attribute open_pr_counter.
-
#original_url ⇒ Object
Returns the value of attribute original_url.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#private ⇒ Object
Returns the value of attribute private.
-
#release_counter ⇒ Object
Returns the value of attribute release_counter.
-
#repo_transfer ⇒ Object
Returns the value of attribute repo_transfer.
-
#size ⇒ Object
Returns the value of attribute size.
-
#ssh_url ⇒ Object
Returns the value of attribute ssh_url.
-
#stars_count ⇒ Object
Returns the value of attribute stars_count.
-
#template ⇒ Object
Returns the value of attribute template.
-
#topics ⇒ Object
Returns the value of attribute topics.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
-
#watchers_count ⇒ Object
Returns the value of attribute watchers_count.
-
#website ⇒ Object
Returns the value of attribute website.
-
#wiki_branch ⇒ Object
Returns the value of attribute wiki_branch.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.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 = {}) ⇒ Repository
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 = {}) ⇒ Repository
Initializes the object
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 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 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 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 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 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/forgejo/models/repository.rb', line 315 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::Repository` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::Repository`. Please check the name to make sure it's valid. List of attributes: " + self.class.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_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?(:'archived_at') self.archived_at = attributes[:'archived_at'] end if attributes.key?(:'avatar_url') self.avatar_url = attributes[:'avatar_url'] end if attributes.key?(:'clone_url') self.clone_url = attributes[:'clone_url'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] 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?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'empty') self.empty = attributes[:'empty'] 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?(:'fork') self.fork = attributes[:'fork'] end if attributes.key?(:'forks_count') self.forks_count = attributes[:'forks_count'] end if attributes.key?(:'full_name') self.full_name = attributes[:'full_name'] 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?(:'html_url') self.html_url = attributes[:'html_url'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'ignore_whitespace_conflicts') self.ignore_whitespace_conflicts = attributes[:'ignore_whitespace_conflicts'] end if attributes.key?(:'internal') self.internal = attributes[:'internal'] end if attributes.key?(:'internal_tracker') self.internal_tracker = attributes[:'internal_tracker'] end if attributes.key?(:'language') self.language = attributes[:'language'] end if attributes.key?(:'languages_url') self.languages_url = attributes[:'languages_url'] end if attributes.key?(:'link') self.link = attributes[:'link'] end if attributes.key?(:'mirror') self.mirror = attributes[:'mirror'] end if attributes.key?(:'mirror_interval') self.mirror_interval = attributes[:'mirror_interval'] end if attributes.key?(:'mirror_updated') self.mirror_updated = attributes[:'mirror_updated'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'object_format_name') self.object_format_name = attributes[:'object_format_name'] end if attributes.key?(:'open_issues_count') self.open_issues_count = attributes[:'open_issues_count'] end if attributes.key?(:'open_pr_counter') self.open_pr_counter = attributes[:'open_pr_counter'] end if attributes.key?(:'original_url') self.original_url = attributes[:'original_url'] end if attributes.key?(:'owner') self.owner = attributes[:'owner'] end if attributes.key?(:'parent') self.parent = attributes[:'parent'] end if attributes.key?(:'permissions') self. = attributes[:'permissions'] end if attributes.key?(:'private') self.private = attributes[:'private'] end if attributes.key?(:'release_counter') self.release_counter = attributes[:'release_counter'] end if attributes.key?(:'repo_transfer') self.repo_transfer = attributes[:'repo_transfer'] end if attributes.key?(:'size') self.size = attributes[:'size'] end if attributes.key?(:'ssh_url') self.ssh_url = attributes[:'ssh_url'] end if attributes.key?(:'stars_count') self.stars_count = attributes[:'stars_count'] end if attributes.key?(:'template') self.template = attributes[:'template'] end if attributes.key?(:'topics') if (value = attributes[:'topics']).is_a?(Array) self.topics = value end end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'watchers_count') self.watchers_count = attributes[:'watchers_count'] 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
Returns the value of attribute allow_fast_forward_only_merge.
19 20 21 |
# File 'lib/forgejo/models/repository.rb', line 19 def allow_fast_forward_only_merge @allow_fast_forward_only_merge end |
#allow_merge_commits ⇒ Object
Returns the value of attribute allow_merge_commits.
21 22 23 |
# File 'lib/forgejo/models/repository.rb', line 21 def allow_merge_commits @allow_merge_commits end |
#allow_rebase ⇒ Object
Returns the value of attribute allow_rebase.
23 24 25 |
# File 'lib/forgejo/models/repository.rb', line 23 def allow_rebase @allow_rebase end |
#allow_rebase_explicit ⇒ Object
Returns the value of attribute allow_rebase_explicit.
25 26 27 |
# File 'lib/forgejo/models/repository.rb', line 25 def allow_rebase_explicit @allow_rebase_explicit end |
#allow_rebase_update ⇒ Object
Returns the value of attribute allow_rebase_update.
27 28 29 |
# File 'lib/forgejo/models/repository.rb', line 27 def allow_rebase_update @allow_rebase_update end |
#allow_squash_merge ⇒ Object
Returns the value of attribute allow_squash_merge.
29 30 31 |
# File 'lib/forgejo/models/repository.rb', line 29 def allow_squash_merge @allow_squash_merge end |
#archived ⇒ Object
Returns the value of attribute archived.
31 32 33 |
# File 'lib/forgejo/models/repository.rb', line 31 def archived @archived end |
#archived_at ⇒ Object
Returns the value of attribute archived_at.
33 34 35 |
# File 'lib/forgejo/models/repository.rb', line 33 def archived_at @archived_at end |
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
35 36 37 |
# File 'lib/forgejo/models/repository.rb', line 35 def avatar_url @avatar_url end |
#clone_url ⇒ Object
Returns the value of attribute clone_url.
37 38 39 |
# File 'lib/forgejo/models/repository.rb', line 37 def clone_url @clone_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
39 40 41 |
# File 'lib/forgejo/models/repository.rb', line 39 def created_at @created_at end |
#default_allow_maintainer_edit ⇒ Object
Returns the value of attribute default_allow_maintainer_edit.
41 42 43 |
# File 'lib/forgejo/models/repository.rb', line 41 def default_allow_maintainer_edit @default_allow_maintainer_edit end |
#default_branch ⇒ Object
Returns the value of attribute default_branch.
43 44 45 |
# File 'lib/forgejo/models/repository.rb', line 43 def default_branch @default_branch end |
#default_delete_branch_after_merge ⇒ Object
Returns the value of attribute default_delete_branch_after_merge.
45 46 47 |
# File 'lib/forgejo/models/repository.rb', line 45 def default_delete_branch_after_merge @default_delete_branch_after_merge end |
#default_merge_style ⇒ Object
Returns the value of attribute default_merge_style.
47 48 49 |
# File 'lib/forgejo/models/repository.rb', line 47 def default_merge_style @default_merge_style end |
#description ⇒ Object
Returns the value of attribute description.
49 50 51 |
# File 'lib/forgejo/models/repository.rb', line 49 def description @description end |
#empty ⇒ Object
Returns the value of attribute empty.
51 52 53 |
# File 'lib/forgejo/models/repository.rb', line 51 def empty @empty end |
#external_tracker ⇒ Object
Returns the value of attribute external_tracker.
53 54 55 |
# File 'lib/forgejo/models/repository.rb', line 53 def external_tracker @external_tracker end |
#external_wiki ⇒ Object
Returns the value of attribute external_wiki.
55 56 57 |
# File 'lib/forgejo/models/repository.rb', line 55 def external_wiki @external_wiki end |
#fork ⇒ Object
Returns the value of attribute fork.
57 58 59 |
# File 'lib/forgejo/models/repository.rb', line 57 def fork @fork end |
#forks_count ⇒ Object
Returns the value of attribute forks_count.
59 60 61 |
# File 'lib/forgejo/models/repository.rb', line 59 def forks_count @forks_count end |
#full_name ⇒ Object
Returns the value of attribute full_name.
61 62 63 |
# File 'lib/forgejo/models/repository.rb', line 61 def full_name @full_name end |
#globally_editable_wiki ⇒ Object
Returns the value of attribute globally_editable_wiki.
63 64 65 |
# File 'lib/forgejo/models/repository.rb', line 63 def globally_editable_wiki @globally_editable_wiki end |
#has_actions ⇒ Object
Returns the value of attribute has_actions.
65 66 67 |
# File 'lib/forgejo/models/repository.rb', line 65 def has_actions @has_actions end |
#has_issues ⇒ Object
Returns the value of attribute has_issues.
67 68 69 |
# File 'lib/forgejo/models/repository.rb', line 67 def has_issues @has_issues end |
#has_packages ⇒ Object
Returns the value of attribute has_packages.
69 70 71 |
# File 'lib/forgejo/models/repository.rb', line 69 def has_packages @has_packages end |
#has_projects ⇒ Object
Returns the value of attribute has_projects.
71 72 73 |
# File 'lib/forgejo/models/repository.rb', line 71 def has_projects @has_projects end |
#has_pull_requests ⇒ Object
Returns the value of attribute has_pull_requests.
73 74 75 |
# File 'lib/forgejo/models/repository.rb', line 73 def has_pull_requests @has_pull_requests end |
#has_releases ⇒ Object
Returns the value of attribute has_releases.
75 76 77 |
# File 'lib/forgejo/models/repository.rb', line 75 def has_releases @has_releases end |
#has_wiki ⇒ Object
Returns the value of attribute has_wiki.
77 78 79 |
# File 'lib/forgejo/models/repository.rb', line 77 def has_wiki @has_wiki end |
#html_url ⇒ Object
Returns the value of attribute html_url.
79 80 81 |
# File 'lib/forgejo/models/repository.rb', line 79 def html_url @html_url end |
#id ⇒ Object
Returns the value of attribute id.
81 82 83 |
# File 'lib/forgejo/models/repository.rb', line 81 def id @id end |
#ignore_whitespace_conflicts ⇒ Object
Returns the value of attribute ignore_whitespace_conflicts.
83 84 85 |
# File 'lib/forgejo/models/repository.rb', line 83 def ignore_whitespace_conflicts @ignore_whitespace_conflicts end |
#internal ⇒ Object
Returns the value of attribute internal.
85 86 87 |
# File 'lib/forgejo/models/repository.rb', line 85 def internal @internal end |
#internal_tracker ⇒ Object
Returns the value of attribute internal_tracker.
87 88 89 |
# File 'lib/forgejo/models/repository.rb', line 87 def internal_tracker @internal_tracker end |
#language ⇒ Object
Returns the value of attribute language.
89 90 91 |
# File 'lib/forgejo/models/repository.rb', line 89 def language @language end |
#languages_url ⇒ Object
Returns the value of attribute languages_url.
91 92 93 |
# File 'lib/forgejo/models/repository.rb', line 91 def languages_url @languages_url end |
#link ⇒ Object
Returns the value of attribute link.
93 94 95 |
# File 'lib/forgejo/models/repository.rb', line 93 def link @link end |
#mirror ⇒ Object
Returns the value of attribute mirror.
95 96 97 |
# File 'lib/forgejo/models/repository.rb', line 95 def mirror @mirror end |
#mirror_interval ⇒ Object
Returns the value of attribute mirror_interval.
97 98 99 |
# File 'lib/forgejo/models/repository.rb', line 97 def mirror_interval @mirror_interval end |
#mirror_updated ⇒ Object
Returns the value of attribute mirror_updated.
99 100 101 |
# File 'lib/forgejo/models/repository.rb', line 99 def mirror_updated @mirror_updated end |
#name ⇒ Object
Returns the value of attribute name.
101 102 103 |
# File 'lib/forgejo/models/repository.rb', line 101 def name @name end |
#object_format_name ⇒ Object
ObjectFormatName of the underlying git repository
104 105 106 |
# File 'lib/forgejo/models/repository.rb', line 104 def object_format_name @object_format_name end |
#open_issues_count ⇒ Object
Returns the value of attribute open_issues_count.
106 107 108 |
# File 'lib/forgejo/models/repository.rb', line 106 def open_issues_count @open_issues_count end |
#open_pr_counter ⇒ Object
Returns the value of attribute open_pr_counter.
108 109 110 |
# File 'lib/forgejo/models/repository.rb', line 108 def open_pr_counter @open_pr_counter end |
#original_url ⇒ Object
Returns the value of attribute original_url.
110 111 112 |
# File 'lib/forgejo/models/repository.rb', line 110 def original_url @original_url end |
#owner ⇒ Object
Returns the value of attribute owner.
112 113 114 |
# File 'lib/forgejo/models/repository.rb', line 112 def owner @owner end |
#parent ⇒ Object
Returns the value of attribute parent.
114 115 116 |
# File 'lib/forgejo/models/repository.rb', line 114 def parent @parent end |
#permissions ⇒ Object
Returns the value of attribute permissions.
116 117 118 |
# File 'lib/forgejo/models/repository.rb', line 116 def end |
#private ⇒ Object
Returns the value of attribute private.
118 119 120 |
# File 'lib/forgejo/models/repository.rb', line 118 def private @private end |
#release_counter ⇒ Object
Returns the value of attribute release_counter.
120 121 122 |
# File 'lib/forgejo/models/repository.rb', line 120 def release_counter @release_counter end |
#repo_transfer ⇒ Object
Returns the value of attribute repo_transfer.
122 123 124 |
# File 'lib/forgejo/models/repository.rb', line 122 def repo_transfer @repo_transfer end |
#size ⇒ Object
Returns the value of attribute size.
124 125 126 |
# File 'lib/forgejo/models/repository.rb', line 124 def size @size end |
#ssh_url ⇒ Object
Returns the value of attribute ssh_url.
126 127 128 |
# File 'lib/forgejo/models/repository.rb', line 126 def ssh_url @ssh_url end |
#stars_count ⇒ Object
Returns the value of attribute stars_count.
128 129 130 |
# File 'lib/forgejo/models/repository.rb', line 128 def stars_count @stars_count end |
#template ⇒ Object
Returns the value of attribute template.
130 131 132 |
# File 'lib/forgejo/models/repository.rb', line 130 def template @template end |
#topics ⇒ Object
Returns the value of attribute topics.
132 133 134 |
# File 'lib/forgejo/models/repository.rb', line 132 def topics @topics end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
134 135 136 |
# File 'lib/forgejo/models/repository.rb', line 134 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
136 137 138 |
# File 'lib/forgejo/models/repository.rb', line 136 def url @url end |
#watchers_count ⇒ Object
Returns the value of attribute watchers_count.
138 139 140 |
# File 'lib/forgejo/models/repository.rb', line 138 def watchers_count @watchers_count end |
#website ⇒ Object
Returns the value of attribute website.
140 141 142 |
# File 'lib/forgejo/models/repository.rb', line 140 def website @website end |
#wiki_branch ⇒ Object
Returns the value of attribute wiki_branch.
142 143 144 |
# File 'lib/forgejo/models/repository.rb', line 142 def wiki_branch @wiki_branch end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/forgejo/models/repository.rb', line 714 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_attributes ⇒ Object
Returns all the JSON keys this model knows about
235 236 237 |
# File 'lib/forgejo/models/repository.rb', line 235 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
167 168 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 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/forgejo/models/repository.rb', line 167 def self.attribute_map { :'allow_fast_forward_only_merge' => :'allow_fast_forward_only_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', :'archived_at' => :'archived_at', :'avatar_url' => :'avatar_url', :'clone_url' => :'clone_url', :'created_at' => :'created_at', :'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', :'description' => :'description', :'empty' => :'empty', :'external_tracker' => :'external_tracker', :'external_wiki' => :'external_wiki', :'fork' => :'fork', :'forks_count' => :'forks_count', :'full_name' => :'full_name', :'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', :'html_url' => :'html_url', :'id' => :'id', :'ignore_whitespace_conflicts' => :'ignore_whitespace_conflicts', :'internal' => :'internal', :'internal_tracker' => :'internal_tracker', :'language' => :'language', :'languages_url' => :'languages_url', :'link' => :'link', :'mirror' => :'mirror', :'mirror_interval' => :'mirror_interval', :'mirror_updated' => :'mirror_updated', :'name' => :'name', :'object_format_name' => :'object_format_name', :'open_issues_count' => :'open_issues_count', :'open_pr_counter' => :'open_pr_counter', :'original_url' => :'original_url', :'owner' => :'owner', :'parent' => :'parent', :'permissions' => :'permissions', :'private' => :'private', :'release_counter' => :'release_counter', :'repo_transfer' => :'repo_transfer', :'size' => :'size', :'ssh_url' => :'ssh_url', :'stars_count' => :'stars_count', :'template' => :'template', :'topics' => :'topics', :'updated_at' => :'updated_at', :'url' => :'url', :'watchers_count' => :'watchers_count', :'website' => :'website', :'wiki_branch' => :'wiki_branch' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 |
# File 'lib/forgejo/models/repository.rb', line 690 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
308 309 310 311 |
# File 'lib/forgejo/models/repository.rb', line 308 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/forgejo/models/repository.rb', line 240 def self.openapi_types { :'allow_fast_forward_only_merge' => :'Boolean', :'allow_merge_commits' => :'Boolean', :'allow_rebase' => :'Boolean', :'allow_rebase_explicit' => :'Boolean', :'allow_rebase_update' => :'Boolean', :'allow_squash_merge' => :'Boolean', :'archived' => :'Boolean', :'archived_at' => :'Time', :'avatar_url' => :'String', :'clone_url' => :'String', :'created_at' => :'Time', :'default_allow_maintainer_edit' => :'Boolean', :'default_branch' => :'String', :'default_delete_branch_after_merge' => :'Boolean', :'default_merge_style' => :'String', :'description' => :'String', :'empty' => :'Boolean', :'external_tracker' => :'ExternalTracker', :'external_wiki' => :'ExternalWiki', :'fork' => :'Boolean', :'forks_count' => :'Integer', :'full_name' => :'String', :'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', :'html_url' => :'String', :'id' => :'Integer', :'ignore_whitespace_conflicts' => :'Boolean', :'internal' => :'Boolean', :'internal_tracker' => :'InternalTracker', :'language' => :'String', :'languages_url' => :'String', :'link' => :'String', :'mirror' => :'Boolean', :'mirror_interval' => :'String', :'mirror_updated' => :'Time', :'name' => :'String', :'object_format_name' => :'String', :'open_issues_count' => :'Integer', :'open_pr_counter' => :'Integer', :'original_url' => :'String', :'owner' => :'User', :'parent' => :'Repository', :'permissions' => :'Permission', :'private' => :'Boolean', :'release_counter' => :'Integer', :'repo_transfer' => :'RepoTransfer', :'size' => :'Integer', :'ssh_url' => :'String', :'stars_count' => :'Integer', :'template' => :'Boolean', :'topics' => :'Array<String>', :'updated_at' => :'Time', :'url' => :'String', :'watchers_count' => :'Integer', :'website' => :'String', :'wiki_branch' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/forgejo/models/repository.rb', line 608 def ==(o) return true if self.equal?(o) self.class == o.class && allow_fast_forward_only_merge == o.allow_fast_forward_only_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 && archived_at == o.archived_at && avatar_url == o.avatar_url && clone_url == o.clone_url && created_at == o.created_at && 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 && description == o.description && empty == o.empty && external_tracker == o.external_tracker && external_wiki == o.external_wiki && fork == o.fork && forks_count == o.forks_count && full_name == o.full_name && 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 && html_url == o.html_url && id == o.id && ignore_whitespace_conflicts == o.ignore_whitespace_conflicts && internal == o.internal && internal_tracker == o.internal_tracker && language == o.language && languages_url == o.languages_url && link == o.link && mirror == o.mirror && mirror_interval == o.mirror_interval && mirror_updated == o.mirror_updated && name == o.name && object_format_name == o.object_format_name && open_issues_count == o.open_issues_count && open_pr_counter == o.open_pr_counter && original_url == o.original_url && owner == o.owner && parent == o.parent && == o. && private == o.private && release_counter == o.release_counter && repo_transfer == o.repo_transfer && size == o.size && ssh_url == o.ssh_url && stars_count == o.stars_count && template == o.template && topics == o.topics && updated_at == o.updated_at && url == o.url && watchers_count == o.watchers_count && 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
785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'lib/forgejo/models/repository.rb', line 785 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
677 678 679 |
# File 'lib/forgejo/models/repository.rb', line 677 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
683 684 685 |
# File 'lib/forgejo/models/repository.rb', line 683 def hash [allow_fast_forward_only_merge, allow_merge_commits, allow_rebase, allow_rebase_explicit, allow_rebase_update, allow_squash_merge, archived, archived_at, avatar_url, clone_url, created_at, default_allow_maintainer_edit, default_branch, default_delete_branch_after_merge, default_merge_style, description, empty, external_tracker, external_wiki, fork, forks_count, full_name, globally_editable_wiki, has_actions, has_issues, has_packages, has_projects, has_pull_requests, has_releases, has_wiki, html_url, id, ignore_whitespace_conflicts, internal, internal_tracker, language, languages_url, link, mirror, mirror_interval, mirror_updated, name, object_format_name, open_issues_count, open_pr_counter, original_url, owner, parent, , private, release_counter, repo_transfer, size, ssh_url, stars_count, template, topics, updated_at, url, watchers_count, website, wiki_branch].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
581 582 583 584 585 |
# File 'lib/forgejo/models/repository.rb', line 581 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)
761 762 763 |
# File 'lib/forgejo/models/repository.rb', line 761 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
767 768 769 770 771 772 773 774 775 776 777 778 779 |
# File 'lib/forgejo/models/repository.rb', line 767 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
755 756 757 |
# File 'lib/forgejo/models/repository.rb', line 755 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
589 590 591 592 593 594 |
# File 'lib/forgejo/models/repository.rb', line 589 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' object_format_name_validator = EnumAttributeValidator.new('String', ["sha1", "sha256"]) return false unless object_format_name_validator.valid?(@object_format_name) true end |