kleister 1.14.1 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +3 -3
  4. data/lib/kleister/api/auth_api.rb +137 -73
  5. data/lib/kleister/api/fabric_api.rb +37 -42
  6. data/lib/kleister/api/forge_api.rb +37 -42
  7. data/lib/kleister/api/{team_api.rb → group_api.rb} +359 -379
  8. data/lib/kleister/api/minecraft_api.rb +37 -42
  9. data/lib/kleister/api/mod_api.rb +471 -232
  10. data/lib/kleister/api/neoforge_api.rb +37 -42
  11. data/lib/kleister/api/pack_api.rb +215 -240
  12. data/lib/kleister/api/profile_api.rb +16 -16
  13. data/lib/kleister/api/quilt_api.rb +37 -42
  14. data/lib/kleister/api/user_api.rb +259 -279
  15. data/lib/kleister/api_client.rb +1 -1
  16. data/lib/kleister/api_error.rb +1 -1
  17. data/lib/kleister/configuration.rb +1 -8
  18. data/lib/kleister/models/{build_version_params.rb → attach_build_to_version_request.rb} +8 -20
  19. data/lib/kleister/models/{quilt_build_params.rb → attach_minecraft_to_build_request.rb} +8 -20
  20. data/lib/kleister/models/auth_token.rb +1 -1
  21. data/lib/kleister/models/auth_verify.rb +1 -1
  22. data/lib/kleister/models/build.rb +3 -13
  23. data/lib/kleister/models/build_version.rb +2 -3
  24. data/lib/kleister/models/{pack_back.rb → create_build_request.rb} +76 -58
  25. data/lib/kleister/models/{mods.rb → create_group_request.rb} +19 -18
  26. data/lib/kleister/models/{pack_icon.rb → create_mod_request.rb} +48 -54
  27. data/lib/kleister/models/{forge_builds.rb → create_pack_request.rb} +33 -23
  28. data/lib/kleister/models/create_user_request.rb +257 -0
  29. data/lib/kleister/models/{builds.rb → create_version_request.rb} +25 -23
  30. data/lib/kleister/models/{packs.rb → delete_group_from_mod_request.rb} +20 -21
  31. data/lib/kleister/models/delete_group_from_pack_request.rb +219 -0
  32. data/lib/kleister/models/delete_pack_from_group_request.rb +219 -0
  33. data/lib/kleister/models/{users.rb → delete_pack_from_user_request.rb} +20 -21
  34. data/lib/kleister/models/fabric.rb +1 -1
  35. data/lib/kleister/models/forge.rb +1 -1
  36. data/lib/kleister/models/{team.rb → group.rb} +5 -5
  37. data/lib/kleister/models/{team_mod.rb → group_mod.rb} +21 -21
  38. data/lib/kleister/models/{team_pack.rb → group_pack.rb} +21 -21
  39. data/lib/kleister/models/{build_versions.rb → list_build_versions200_response.rb} +56 -18
  40. data/lib/kleister/models/{pack_teams.rb → list_builds200_response.rb} +59 -20
  41. data/lib/kleister/models/{fabric_builds.rb → list_fabric_builds200_response.rb} +56 -18
  42. data/lib/kleister/models/{fabrics.rb → list_fabrics200_response.rb} +52 -13
  43. data/lib/kleister/models/list_forge_builds200_response.rb +266 -0
  44. data/lib/kleister/models/{forges.rb → list_forges200_response.rb} +52 -13
  45. data/lib/kleister/models/list_group_mods200_response.rb +266 -0
  46. data/lib/kleister/models/list_group_packs200_response.rb +266 -0
  47. data/lib/kleister/models/list_group_users200_response.rb +266 -0
  48. data/lib/kleister/models/list_groups200_response.rb +259 -0
  49. data/lib/kleister/models/{minecraft_builds.rb → list_minecraft_builds200_response.rb} +56 -18
  50. data/lib/kleister/models/list_minecrafts200_response.rb +259 -0
  51. data/lib/kleister/models/list_mod_groups200_response.rb +266 -0
  52. data/lib/kleister/models/list_mod_users200_response.rb +266 -0
  53. data/lib/kleister/models/{team_mods.rb → list_mods200_response.rb} +52 -20
  54. data/lib/kleister/models/{neoforge_builds.rb → list_neoforge_builds200_response.rb} +56 -18
  55. data/lib/kleister/models/{neoforges.rb → list_neoforges200_response.rb} +52 -13
  56. data/lib/kleister/models/list_pack_groups200_response.rb +266 -0
  57. data/lib/kleister/models/{pack_users.rb → list_pack_users200_response.rb} +56 -17
  58. data/lib/kleister/models/list_packs200_response.rb +259 -0
  59. data/lib/kleister/models/{mod_teams.rb → list_providers200_response.rb} +31 -23
  60. data/lib/kleister/models/{quilt_builds.rb → list_quilt_builds200_response.rb} +56 -17
  61. data/lib/kleister/models/{quilts.rb → list_quilts200_response.rb} +52 -13
  62. data/lib/kleister/models/list_user_groups200_response.rb +266 -0
  63. data/lib/kleister/models/{user_teams.rb → list_user_mods200_response.rb} +59 -20
  64. data/lib/kleister/models/{user_packs.rb → list_user_packs200_response.rb} +56 -17
  65. data/lib/kleister/models/{team_users.rb → list_users200_response.rb} +52 -20
  66. data/lib/kleister/models/{version_builds.rb → list_version_builds200_response.rb} +56 -18
  67. data/lib/kleister/models/{versions.rb → list_versions200_response.rb} +52 -13
  68. data/lib/kleister/models/{auth_login.rb → login_auth_request.rb} +4 -4
  69. data/lib/kleister/models/minecraft.rb +1 -1
  70. data/lib/kleister/models/mod.rb +10 -3
  71. data/lib/kleister/models/{team_packs.rb → mod_avatar.rb} +32 -23
  72. data/lib/kleister/models/neoforge.rb +1 -1
  73. data/lib/kleister/models/notification.rb +2 -3
  74. data/lib/kleister/models/pack.rb +8 -22
  75. data/lib/kleister/models/{minecrafts.rb → pack_avatar.rb} +34 -18
  76. data/lib/kleister/models/{mod_users.rb → permit_group_mod_request.rb} +29 -25
  77. data/lib/kleister/models/{forge_build_params.rb → permit_group_pack_request.rb} +15 -17
  78. data/lib/kleister/models/{fabric_build_params.rb → permit_pack_group_request.rb} +24 -26
  79. data/lib/kleister/models/{user_mods.rb → permit_pack_user_request.rb} +29 -25
  80. data/lib/kleister/models/profile.rb +20 -20
  81. data/lib/kleister/models/provider.rb +1 -1
  82. data/lib/kleister/models/quilt.rb +1 -1
  83. data/lib/kleister/models/{teams.rb → redirect_auth_request.rb} +20 -21
  84. data/lib/kleister/models/update_profile_request.rb +237 -0
  85. data/lib/kleister/models/update_user_request.rb +253 -0
  86. data/lib/kleister/models/user.rb +1 -1
  87. data/lib/kleister/models/user_auth.rb +1 -1
  88. data/lib/kleister/models/{user_team.rb → user_group.rb} +23 -23
  89. data/lib/kleister/models/user_mod.rb +1 -1
  90. data/lib/kleister/models/user_pack.rb +1 -1
  91. data/lib/kleister/models/validation.rb +1 -1
  92. data/lib/kleister/models/version.rb +3 -11
  93. data/lib/kleister/models/version_file.rb +3 -18
  94. data/lib/kleister/version.rb +2 -2
  95. data/lib/kleister.rb +57 -56
  96. metadata +58 -57
  97. data/lib/kleister/models/minecraft_build_params.rb +0 -233
  98. data/lib/kleister/models/mod_team_params.rb +0 -265
  99. data/lib/kleister/models/mod_user_params.rb +0 -265
  100. data/lib/kleister/models/neoforge_build_params.rb +0 -233
  101. data/lib/kleister/models/pack_logo.rb +0 -275
  102. data/lib/kleister/models/pack_team_params.rb +0 -265
  103. data/lib/kleister/models/pack_user_params.rb +0 -265
  104. data/lib/kleister/models/providers.rb +0 -220
  105. data/lib/kleister/models/team_mod_params.rb +0 -265
  106. data/lib/kleister/models/team_pack_params.rb +0 -265
  107. data/lib/kleister/models/team_user_params.rb +0 -265
  108. data/lib/kleister/models/user_mod_params.rb +0 -265
  109. data/lib/kleister/models/user_pack_params.rb +0 -265
  110. data/lib/kleister/models/user_team_params.rb +0 -265
  111. data/lib/kleister/models/version_build_params.rb +0 -233
@@ -5,15 +5,15 @@
5
5
  # The version of the OpenAPI document: 1.0.0-alpha1
6
6
  # Contact: kleister@webhippie.de
7
7
  # Generated by: https://openapi-generator.tech
8
- # Generator version: 7.6.0
8
+ # Generator version: 7.12.0
9
9
  #
10
10
 
11
11
  require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Kleister
15
- # Model to represent team
16
- class Team
15
+ # Model to represent group
16
+ class Group
17
17
  attr_accessor :id, :slug, :name, :created_at, :updated_at
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -55,13 +55,13 @@ module Kleister
55
55
  # @param [Hash] attributes Model attributes in the form of hash
56
56
  def initialize(attributes = {})
57
57
  unless attributes.is_a?(Hash)
58
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::Team` initialize method'
58
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::Group` initialize method'
59
59
  end
60
60
 
61
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
62
  attributes = attributes.each_with_object({}) do |(k, v), h|
63
63
  unless self.class.attribute_map.key?(k.to_sym)
64
- raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::Team`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::Group`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
65
  end
66
66
 
67
67
  h[k.to_sym] = v
@@ -5,16 +5,16 @@
5
5
  # The version of the OpenAPI document: 1.0.0-alpha1
6
6
  # Contact: kleister@webhippie.de
7
7
  # Generated by: https://openapi-generator.tech
8
- # Generator version: 7.6.0
8
+ # Generator version: 7.12.0
9
9
  #
10
10
 
11
11
  require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Kleister
15
- # Model to represent team mod
16
- class TeamMod
17
- attr_accessor :team_id, :team, :mod_id, :mod, :perm, :created_at, :updated_at
15
+ # Model to represent group mod
16
+ class GroupMod
17
+ attr_accessor :group_id, :group, :mod_id, :mod, :perm, :created_at, :updated_at
18
18
 
19
19
  class EnumAttributeValidator
20
20
  attr_reader :datatype, :allowable_values
@@ -40,8 +40,8 @@ module Kleister
40
40
  # Attribute mapping from ruby-style variable name to JSON key.
41
41
  def self.attribute_map
42
42
  {
43
- team_id: :team_id,
44
- team: :team,
43
+ group_id: :group_id,
44
+ group: :group,
45
45
  mod_id: :mod_id,
46
46
  mod: :mod,
47
47
  perm: :perm,
@@ -58,8 +58,8 @@ module Kleister
58
58
  # Attribute type mapping.
59
59
  def self.openapi_types
60
60
  {
61
- team_id: :String,
62
- team: :Team,
61
+ group_id: :String,
62
+ group: :Group,
63
63
  mod_id: :String,
64
64
  mod: :Mod,
65
65
  perm: :String,
@@ -78,24 +78,24 @@ module Kleister
78
78
  # @param [Hash] attributes Model attributes in the form of hash
79
79
  def initialize(attributes = {})
80
80
  unless attributes.is_a?(Hash)
81
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::TeamMod` initialize method'
81
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::GroupMod` initialize method'
82
82
  end
83
83
 
84
84
  # check to see if the attribute exists and convert string to symbol for hash key
85
85
  attributes = attributes.each_with_object({}) do |(k, v), h|
86
86
  unless self.class.attribute_map.key?(k.to_sym)
87
- raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::TeamMod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::GroupMod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
88
  end
89
89
 
90
90
  h[k.to_sym] = v
91
91
  end
92
92
 
93
- self.team_id = if attributes.key?(:team_id)
94
- attributes[:team_id]
95
- end
93
+ self.group_id = if attributes.key?(:group_id)
94
+ attributes[:group_id]
95
+ end
96
96
 
97
- if attributes.key?(:team)
98
- self.team = attributes[:team]
97
+ if attributes.key?(:group)
98
+ self.group = attributes[:group]
99
99
  end
100
100
 
101
101
  self.mod_id = if attributes.key?(:mod_id)
@@ -126,8 +126,8 @@ module Kleister
126
126
  def list_invalid_properties
127
127
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
128
  invalid_properties = []
129
- if @team_id.nil?
130
- invalid_properties.push('invalid value for "team_id", team_id cannot be nil.')
129
+ if @group_id.nil?
130
+ invalid_properties.push('invalid value for "group_id", group_id cannot be nil.')
131
131
  end
132
132
 
133
133
  if @mod_id.nil?
@@ -141,7 +141,7 @@ module Kleister
141
141
  # @return true if the model is valid
142
142
  def valid?
143
143
  warn '[DEPRECATED] the `valid?` method is obsolete'
144
- return false if @team_id.nil?
144
+ return false if @group_id.nil?
145
145
  return false if @mod_id.nil?
146
146
 
147
147
  perm_validator = EnumAttributeValidator.new('String', %w[user admin owner])
@@ -167,8 +167,8 @@ module Kleister
167
167
  return true if equal?(other)
168
168
 
169
169
  self.class == other.class &&
170
- team_id == other.team_id &&
171
- team == other.team &&
170
+ group_id == other.group_id &&
171
+ group == other.group &&
172
172
  mod_id == other.mod_id &&
173
173
  mod == other.mod &&
174
174
  perm == other.perm &&
@@ -185,7 +185,7 @@ module Kleister
185
185
  # Calculates hash code according to all attributes.
186
186
  # @return [Integer] Hash code
187
187
  def hash
188
- [team_id, team, mod_id, mod, perm, created_at, updated_at].hash
188
+ [group_id, group, mod_id, mod, perm, created_at, updated_at].hash
189
189
  end
190
190
 
191
191
  # Builds the object from hash
@@ -5,16 +5,16 @@
5
5
  # The version of the OpenAPI document: 1.0.0-alpha1
6
6
  # Contact: kleister@webhippie.de
7
7
  # Generated by: https://openapi-generator.tech
8
- # Generator version: 7.6.0
8
+ # Generator version: 7.12.0
9
9
  #
10
10
 
11
11
  require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Kleister
15
- # Model to represent team pack
16
- class TeamPack
17
- attr_accessor :team_id, :team, :pack_id, :pack, :perm, :created_at, :updated_at
15
+ # Model to represent group pack
16
+ class GroupPack
17
+ attr_accessor :group_id, :group, :pack_id, :pack, :perm, :created_at, :updated_at
18
18
 
19
19
  class EnumAttributeValidator
20
20
  attr_reader :datatype, :allowable_values
@@ -40,8 +40,8 @@ module Kleister
40
40
  # Attribute mapping from ruby-style variable name to JSON key.
41
41
  def self.attribute_map
42
42
  {
43
- team_id: :team_id,
44
- team: :team,
43
+ group_id: :group_id,
44
+ group: :group,
45
45
  pack_id: :pack_id,
46
46
  pack: :pack,
47
47
  perm: :perm,
@@ -58,8 +58,8 @@ module Kleister
58
58
  # Attribute type mapping.
59
59
  def self.openapi_types
60
60
  {
61
- team_id: :String,
62
- team: :Team,
61
+ group_id: :String,
62
+ group: :Group,
63
63
  pack_id: :String,
64
64
  pack: :Pack,
65
65
  perm: :String,
@@ -78,24 +78,24 @@ module Kleister
78
78
  # @param [Hash] attributes Model attributes in the form of hash
79
79
  def initialize(attributes = {})
80
80
  unless attributes.is_a?(Hash)
81
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::TeamPack` initialize method'
81
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::GroupPack` initialize method'
82
82
  end
83
83
 
84
84
  # check to see if the attribute exists and convert string to symbol for hash key
85
85
  attributes = attributes.each_with_object({}) do |(k, v), h|
86
86
  unless self.class.attribute_map.key?(k.to_sym)
87
- raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::TeamPack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::GroupPack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
88
  end
89
89
 
90
90
  h[k.to_sym] = v
91
91
  end
92
92
 
93
- self.team_id = if attributes.key?(:team_id)
94
- attributes[:team_id]
95
- end
93
+ self.group_id = if attributes.key?(:group_id)
94
+ attributes[:group_id]
95
+ end
96
96
 
97
- if attributes.key?(:team)
98
- self.team = attributes[:team]
97
+ if attributes.key?(:group)
98
+ self.group = attributes[:group]
99
99
  end
100
100
 
101
101
  self.pack_id = if attributes.key?(:pack_id)
@@ -126,8 +126,8 @@ module Kleister
126
126
  def list_invalid_properties
127
127
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
128
  invalid_properties = []
129
- if @team_id.nil?
130
- invalid_properties.push('invalid value for "team_id", team_id cannot be nil.')
129
+ if @group_id.nil?
130
+ invalid_properties.push('invalid value for "group_id", group_id cannot be nil.')
131
131
  end
132
132
 
133
133
  if @pack_id.nil?
@@ -141,7 +141,7 @@ module Kleister
141
141
  # @return true if the model is valid
142
142
  def valid?
143
143
  warn '[DEPRECATED] the `valid?` method is obsolete'
144
- return false if @team_id.nil?
144
+ return false if @group_id.nil?
145
145
  return false if @pack_id.nil?
146
146
 
147
147
  perm_validator = EnumAttributeValidator.new('String', %w[user admin owner])
@@ -167,8 +167,8 @@ module Kleister
167
167
  return true if equal?(other)
168
168
 
169
169
  self.class == other.class &&
170
- team_id == other.team_id &&
171
- team == other.team &&
170
+ group_id == other.group_id &&
171
+ group == other.group &&
172
172
  pack_id == other.pack_id &&
173
173
  pack == other.pack &&
174
174
  perm == other.perm &&
@@ -185,7 +185,7 @@ module Kleister
185
185
  # Calculates hash code according to all attributes.
186
186
  # @return [Integer] Hash code
187
187
  def hash
188
- [team_id, team, pack_id, pack, perm, created_at, updated_at].hash
188
+ [group_id, group, pack_id, pack, perm, created_at, updated_at].hash
189
189
  end
190
190
 
191
191
  # Builds the object from hash
@@ -5,23 +5,24 @@
5
5
  # The version of the OpenAPI document: 1.0.0-alpha1
6
6
  # Contact: kleister@webhippie.de
7
7
  # Generated by: https://openapi-generator.tech
8
- # Generator version: 7.6.0
8
+ # Generator version: 7.12.0
9
9
  #
10
10
 
11
11
  require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Kleister
15
- # Model to represent build versions
16
- class BuildVersions
17
- attr_accessor :pack, :build, :total, :versions
15
+ class ListBuildVersions200Response
16
+ attr_accessor :total, :limit, :offset, :pack, :build, :versions
18
17
 
19
18
  # Attribute mapping from ruby-style variable name to JSON key.
20
19
  def self.attribute_map
21
20
  {
21
+ total: :total,
22
+ limit: :limit,
23
+ offset: :offset,
22
24
  pack: :pack,
23
25
  build: :build,
24
- total: :total,
25
26
  versions: :versions
26
27
  }
27
28
  end
@@ -34,9 +35,11 @@ module Kleister
34
35
  # Attribute type mapping.
35
36
  def self.openapi_types
36
37
  {
38
+ total: :Integer,
39
+ limit: :Integer,
40
+ offset: :Integer,
37
41
  pack: :Pack,
38
42
  build: :Build,
39
- total: :Integer,
40
43
  versions: :'Array<BuildVersion>'
41
44
  }
42
45
  end
@@ -51,19 +54,30 @@ module Kleister
51
54
  # @param [Hash] attributes Model attributes in the form of hash
52
55
  def initialize(attributes = {})
53
56
  unless attributes.is_a?(Hash)
54
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::BuildVersions` initialize method'
57
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::ListBuildVersions200Response` initialize method'
55
58
  end
56
59
 
57
60
  # check to see if the attribute exists and convert string to symbol for hash key
58
61
  attributes = attributes.each_with_object({}) do |(k, v), h|
59
62
  unless self.class.attribute_map.key?(k.to_sym)
60
- raise ArgumentError,
61
- "`#{k}` is not a valid attribute in `Kleister::BuildVersions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::ListBuildVersions200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
64
  end
63
65
 
64
66
  h[k.to_sym] = v
65
67
  end
66
68
 
69
+ self.total = if attributes.key?(:total)
70
+ attributes[:total]
71
+ end
72
+
73
+ self.limit = if attributes.key?(:limit)
74
+ attributes[:limit]
75
+ end
76
+
77
+ self.offset = if attributes.key?(:offset)
78
+ attributes[:offset]
79
+ end
80
+
67
81
  if attributes.key?(:pack)
68
82
  self.pack = attributes[:pack]
69
83
  end
@@ -72,12 +86,12 @@ module Kleister
72
86
  self.build = attributes[:build]
73
87
  end
74
88
 
75
- if attributes.key?(:total)
76
- self.total = attributes[:total]
77
- end
78
-
79
- if attributes.key?(:versions) && (value = attributes[:versions]).is_a?(Array)
80
- self.versions = value
89
+ if attributes.key?(:versions)
90
+ if (value = attributes[:versions]).is_a?(Array)
91
+ self.versions = value
92
+ end
93
+ else
94
+ self.versions = nil
81
95
  end
82
96
  end
83
97
 
@@ -85,13 +99,35 @@ module Kleister
85
99
  # @return Array for valid properties with the reasons
86
100
  def list_invalid_properties
87
101
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
- []
102
+ invalid_properties = []
103
+ if @total.nil?
104
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
105
+ end
106
+
107
+ if @limit.nil?
108
+ invalid_properties.push('invalid value for "limit", limit cannot be nil.')
109
+ end
110
+
111
+ if @offset.nil?
112
+ invalid_properties.push('invalid value for "offset", offset cannot be nil.')
113
+ end
114
+
115
+ if @versions.nil?
116
+ invalid_properties.push('invalid value for "versions", versions cannot be nil.')
117
+ end
118
+
119
+ invalid_properties
89
120
  end
90
121
 
91
122
  # Check to see if the all the properties in the model are valid
92
123
  # @return true if the model is valid
93
124
  def valid?
94
125
  warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @total.nil?
127
+ return false if @limit.nil?
128
+ return false if @offset.nil?
129
+ return false if @versions.nil?
130
+
95
131
  true
96
132
  end
97
133
 
@@ -101,9 +137,11 @@ module Kleister
101
137
  return true if equal?(other)
102
138
 
103
139
  self.class == other.class &&
140
+ total == other.total &&
141
+ limit == other.limit &&
142
+ offset == other.offset &&
104
143
  pack == other.pack &&
105
144
  build == other.build &&
106
- total == other.total &&
107
145
  versions == other.versions
108
146
  end
109
147
 
@@ -116,7 +154,7 @@ module Kleister
116
154
  # Calculates hash code according to all attributes.
117
155
  # @return [Integer] Hash code
118
156
  def hash
119
- [pack, build, total, versions].hash
157
+ [total, limit, offset, pack, build, versions].hash
120
158
  end
121
159
 
122
160
  # Builds the object from hash
@@ -5,23 +5,24 @@
5
5
  # The version of the OpenAPI document: 1.0.0-alpha1
6
6
  # Contact: kleister@webhippie.de
7
7
  # Generated by: https://openapi-generator.tech
8
- # Generator version: 7.6.0
8
+ # Generator version: 7.12.0
9
9
  #
10
10
 
11
11
  require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Kleister
15
- # Model to represent pack teams
16
- class PackTeams
17
- attr_accessor :pack, :total, :teams
15
+ class ListBuilds200Response
16
+ attr_accessor :total, :limit, :offset, :pack, :builds
18
17
 
19
18
  # Attribute mapping from ruby-style variable name to JSON key.
20
19
  def self.attribute_map
21
20
  {
22
- pack: :pack,
23
21
  total: :total,
24
- teams: :teams
22
+ limit: :limit,
23
+ offset: :offset,
24
+ pack: :pack,
25
+ builds: :builds
25
26
  }
26
27
  end
27
28
 
@@ -33,9 +34,11 @@ module Kleister
33
34
  # Attribute type mapping.
34
35
  def self.openapi_types
35
36
  {
36
- pack: :Pack,
37
37
  total: :Integer,
38
- teams: :'Array<TeamPack>'
38
+ limit: :Integer,
39
+ offset: :Integer,
40
+ pack: :Pack,
41
+ builds: :'Array<Build>'
39
42
  }
40
43
  end
41
44
 
@@ -49,28 +52,40 @@ module Kleister
49
52
  # @param [Hash] attributes Model attributes in the form of hash
50
53
  def initialize(attributes = {})
51
54
  unless attributes.is_a?(Hash)
52
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::PackTeams` initialize method'
55
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `Kleister::ListBuilds200Response` initialize method'
53
56
  end
54
57
 
55
58
  # check to see if the attribute exists and convert string to symbol for hash key
56
59
  attributes = attributes.each_with_object({}) do |(k, v), h|
57
60
  unless self.class.attribute_map.key?(k.to_sym)
58
- raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::PackTeams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ raise ArgumentError, "`#{k}` is not a valid attribute in `Kleister::ListBuilds200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
62
  end
60
63
 
61
64
  h[k.to_sym] = v
62
65
  end
63
66
 
67
+ self.total = if attributes.key?(:total)
68
+ attributes[:total]
69
+ end
70
+
71
+ self.limit = if attributes.key?(:limit)
72
+ attributes[:limit]
73
+ end
74
+
75
+ self.offset = if attributes.key?(:offset)
76
+ attributes[:offset]
77
+ end
78
+
64
79
  if attributes.key?(:pack)
65
80
  self.pack = attributes[:pack]
66
81
  end
67
82
 
68
- if attributes.key?(:total)
69
- self.total = attributes[:total]
70
- end
71
-
72
- if attributes.key?(:teams) && (value = attributes[:teams]).is_a?(Array)
73
- self.teams = value
83
+ if attributes.key?(:builds)
84
+ if (value = attributes[:builds]).is_a?(Array)
85
+ self.builds = value
86
+ end
87
+ else
88
+ self.builds = nil
74
89
  end
75
90
  end
76
91
 
@@ -78,13 +93,35 @@ module Kleister
78
93
  # @return Array for valid properties with the reasons
79
94
  def list_invalid_properties
80
95
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
- []
96
+ invalid_properties = []
97
+ if @total.nil?
98
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
99
+ end
100
+
101
+ if @limit.nil?
102
+ invalid_properties.push('invalid value for "limit", limit cannot be nil.')
103
+ end
104
+
105
+ if @offset.nil?
106
+ invalid_properties.push('invalid value for "offset", offset cannot be nil.')
107
+ end
108
+
109
+ if @builds.nil?
110
+ invalid_properties.push('invalid value for "builds", builds cannot be nil.')
111
+ end
112
+
113
+ invalid_properties
82
114
  end
83
115
 
84
116
  # Check to see if the all the properties in the model are valid
85
117
  # @return true if the model is valid
86
118
  def valid?
87
119
  warn '[DEPRECATED] the `valid?` method is obsolete'
120
+ return false if @total.nil?
121
+ return false if @limit.nil?
122
+ return false if @offset.nil?
123
+ return false if @builds.nil?
124
+
88
125
  true
89
126
  end
90
127
 
@@ -94,9 +131,11 @@ module Kleister
94
131
  return true if equal?(other)
95
132
 
96
133
  self.class == other.class &&
97
- pack == other.pack &&
98
134
  total == other.total &&
99
- teams == other.teams
135
+ limit == other.limit &&
136
+ offset == other.offset &&
137
+ pack == other.pack &&
138
+ builds == other.builds
100
139
  end
101
140
 
102
141
  # @see the `==` method
@@ -108,7 +147,7 @@ module Kleister
108
147
  # Calculates hash code according to all attributes.
109
148
  # @return [Integer] Hash code
110
149
  def hash
111
- [pack, total, teams].hash
150
+ [total, limit, offset, pack, builds].hash
112
151
  end
113
152
 
114
153
  # Builds the object from hash