osdn-client 0.0.20161003 → 0.0.20171120
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +168 -6
- data/docs/FrsAdminPrefs.md +9 -0
- data/docs/Group.md +1 -3
- data/docs/GroupProfile.md +10 -0
- data/docs/GroupProfilePerLanguage.md +10 -0
- data/docs/GroupToolFlags.md +1 -2
- data/docs/History.md +15 -0
- data/docs/I18NText.md +9 -0
- data/docs/ProjectApi.md +4021 -209
- data/docs/ProjectBzr.md +22 -0
- data/docs/ProjectFrsApi.md +118 -4
- data/docs/ProjectGit.md +27 -0
- data/docs/ProjectHg.md +22 -0
- data/docs/ProjectSCM.md +22 -0
- data/docs/ProjectSCMApi.md +1214 -0
- data/docs/ProjectSCMLastCommit.md +11 -0
- data/docs/ProjectSvn.md +25 -0
- data/docs/ProjectTicketApi.md +1847 -0
- data/docs/ProjectTicketComment.md +13 -0
- data/docs/ProjectTicketComponent.md +14 -0
- data/docs/ProjectTicketComponentSummary.md +10 -0
- data/docs/ProjectTicketComponentSummarySummarizedBy.md +12 -0
- data/docs/ProjectTicketHistory.md +14 -0
- data/docs/ProjectTicketItem.md +25 -0
- data/docs/ProjectTicketMilestone.md +14 -0
- data/docs/ProjectTicketMilestoneSummary.md +10 -0
- data/docs/ProjectTicketMilestoneSummarySummarizedBy.md +12 -0
- data/docs/ProjectTicketPrefs.md +13 -0
- data/docs/ProjectTicketType.md +15 -0
- data/docs/ProjectTicketTypeInstructionPerLanguage.md +9 -0
- data/docs/ProjectTicketTypeInstructions.md +9 -0
- data/docs/ProjectTicketTypeSummary.md +10 -0
- data/docs/ProjectTicketTypeSummarySummarizedBy.md +12 -0
- data/docs/ProjectWeb.md +8 -0
- data/docs/ScmHook.md +18 -0
- data/docs/SummariadByComponent.md +7 -0
- data/docs/SummariadByComponentInner.md +10 -0
- data/docs/SummariadByMilestone.md +7 -0
- data/docs/SummariadByMilestoneInner.md +10 -0
- data/docs/SummariadByOwner.md +7 -0
- data/docs/SummariadByOwnerInner.md +10 -0
- data/docs/SummariadByPriority.md +7 -0
- data/docs/SummariadByPriorityInner.md +10 -0
- data/docs/SummariadBySeverity.md +7 -0
- data/docs/SummariadBySeverityInner.md +10 -0
- data/docs/SummariadByType.md +7 -0
- data/docs/SummariadByTypeInner.md +10 -0
- data/docs/User.md +5 -3
- data/docs/UserApi.md +279 -0
- data/docs/UserImages.md +12 -0
- data/docs/UserStats.md +33 -0
- data/lib/osdn-client.rb +45 -1
- data/lib/osdn-client/api/default_api.rb +1 -1
- data/lib/osdn-client/api/project_api.rb +4574 -396
- data/lib/osdn-client/api/project_frs_api.rb +122 -5
- data/lib/osdn-client/api/project_news_api.rb +1 -1
- data/lib/osdn-client/api/project_scm_api.rb +1310 -0
- data/lib/osdn-client/api/project_ticket_api.rb +2124 -0
- data/lib/osdn-client/api/user_api.rb +294 -1
- data/lib/osdn-client/api_client.rb +1 -1
- data/lib/osdn-client/api_error.rb +1 -1
- data/lib/osdn-client/configuration.rb +1 -1
- data/lib/osdn-client/models/frs_admin_prefs.rb +208 -0
- data/lib/osdn-client/models/group.rb +8 -26
- data/lib/osdn-client/models/group_profile.rb +223 -0
- data/lib/osdn-client/models/group_profile_per_language.rb +217 -0
- data/lib/osdn-client/models/group_tool_flags.rb +11 -20
- data/lib/osdn-client/models/history.rb +262 -0
- data/lib/osdn-client/models/i18_n_text.rb +208 -0
- data/lib/osdn-client/models/news.rb +1 -1
- data/lib/osdn-client/models/package.rb +1 -1
- data/lib/osdn-client/models/pong.rb +1 -1
- data/lib/osdn-client/models/project_bzr.rb +329 -0
- data/lib/osdn-client/models/project_git.rb +374 -0
- data/lib/osdn-client/models/project_hg.rb +329 -0
- data/lib/osdn-client/models/project_scm.rb +329 -0
- data/lib/osdn-client/models/project_scm_last_commit.rb +226 -0
- data/lib/osdn-client/models/project_svn.rb +356 -0
- data/lib/osdn-client/models/project_ticket_comment.rb +244 -0
- data/lib/osdn-client/models/project_ticket_component.rb +253 -0
- data/lib/osdn-client/models/project_ticket_component_summary.rb +217 -0
- data/lib/osdn-client/models/project_ticket_component_summary_summarized_by.rb +235 -0
- data/lib/osdn-client/models/project_ticket_history.rb +253 -0
- data/lib/osdn-client/models/project_ticket_item.rb +356 -0
- data/lib/osdn-client/models/project_ticket_milestone.rb +253 -0
- data/lib/osdn-client/models/project_ticket_milestone_summary.rb +217 -0
- data/lib/osdn-client/models/project_ticket_milestone_summary_summarized_by.rb +235 -0
- data/lib/osdn-client/models/project_ticket_prefs.rb +244 -0
- data/lib/osdn-client/models/project_ticket_type.rb +266 -0
- data/lib/osdn-client/models/project_ticket_type_instruction_per_language.rb +208 -0
- data/lib/osdn-client/models/project_ticket_type_instructions.rb +212 -0
- data/lib/osdn-client/models/project_ticket_type_summary.rb +217 -0
- data/lib/osdn-client/models/project_ticket_type_summary_summarized_by.rb +235 -0
- data/lib/osdn-client/models/project_web.rb +199 -0
- data/lib/osdn-client/models/rel_file.rb +1 -1
- data/lib/osdn-client/models/release.rb +1 -1
- data/lib/osdn-client/models/scm_hook.rb +289 -0
- data/lib/osdn-client/models/simple_chamber.rb +1 -1
- data/lib/osdn-client/models/simple_group.rb +1 -1
- data/lib/osdn-client/models/simple_user.rb +1 -1
- data/lib/osdn-client/models/skill.rb +1 -1
- data/lib/osdn-client/models/summariad_by_component.rb +190 -0
- data/lib/osdn-client/models/summariad_by_component_inner.rb +217 -0
- data/lib/osdn-client/models/summariad_by_milestone.rb +190 -0
- data/lib/osdn-client/models/summariad_by_milestone_inner.rb +217 -0
- data/lib/osdn-client/models/summariad_by_owner.rb +190 -0
- data/lib/osdn-client/models/summariad_by_owner_inner.rb +217 -0
- data/lib/osdn-client/models/summariad_by_priority.rb +190 -0
- data/lib/osdn-client/models/summariad_by_priority_inner.rb +217 -0
- data/lib/osdn-client/models/summariad_by_severity.rb +190 -0
- data/lib/osdn-client/models/summariad_by_severity_inner.rb +217 -0
- data/lib/osdn-client/models/summariad_by_type.rb +190 -0
- data/lib/osdn-client/models/summariad_by_type_inner.rb +217 -0
- data/lib/osdn-client/models/token.rb +1 -1
- data/lib/osdn-client/models/user.rb +38 -18
- data/lib/osdn-client/models/user_images.rb +235 -0
- data/lib/osdn-client/models/user_stats.rb +424 -0
- data/lib/osdn-client/version.rb +2 -2
- data/osdn-client.gemspec +1 -1
- data/spec/api/default_api_spec.rb +1 -1
- data/spec/api/project_api_spec.rb +899 -3
- data/spec/api/project_frs_api_spec.rb +28 -3
- data/spec/api/project_news_api_spec.rb +1 -1
- data/spec/api/project_scm_api_spec.rb +324 -0
- data/spec/api/project_ticket_api_spec.rb +488 -0
- data/spec/api/user_api_spec.rb +63 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/frs_admin_prefs_spec.rb +59 -0
- data/spec/models/group_profile_per_language_spec.rb +65 -0
- data/spec/models/group_profile_spec.rb +65 -0
- data/spec/models/group_spec.rb +2 -14
- data/spec/models/group_tool_flags_spec.rb +3 -9
- data/spec/models/history_spec.rb +95 -0
- data/spec/models/i18_n_text_spec.rb +59 -0
- data/spec/models/news_spec.rb +1 -1
- data/spec/models/package_spec.rb +1 -1
- data/spec/models/pong_spec.rb +1 -1
- data/spec/models/project_bzr_spec.rb +137 -0
- data/spec/models/project_git_spec.rb +167 -0
- data/spec/models/project_hg_spec.rb +137 -0
- data/spec/models/project_scm_last_commit_spec.rb +71 -0
- data/spec/models/project_scm_spec.rb +137 -0
- data/spec/models/project_svn_spec.rb +155 -0
- data/spec/models/project_ticket_comment_spec.rb +83 -0
- data/spec/models/project_ticket_component_spec.rb +89 -0
- data/spec/models/project_ticket_component_summary_spec.rb +65 -0
- data/spec/models/project_ticket_component_summary_summarized_by_spec.rb +77 -0
- data/spec/models/project_ticket_history_spec.rb +89 -0
- data/spec/models/project_ticket_item_spec.rb +155 -0
- data/spec/models/project_ticket_milestone_spec.rb +89 -0
- data/spec/models/project_ticket_milestone_summary_spec.rb +65 -0
- data/spec/models/project_ticket_milestone_summary_summarized_by_spec.rb +77 -0
- data/spec/models/project_ticket_prefs_spec.rb +83 -0
- data/spec/models/project_ticket_type_instruction_per_language_spec.rb +59 -0
- data/spec/models/project_ticket_type_instructions_spec.rb +59 -0
- data/spec/models/project_ticket_type_spec.rb +95 -0
- data/spec/models/project_ticket_type_summary_spec.rb +65 -0
- data/spec/models/project_ticket_type_summary_summarized_by_spec.rb +77 -0
- data/spec/models/project_web_spec.rb +53 -0
- data/spec/models/rel_file_spec.rb +1 -1
- data/spec/models/release_spec.rb +1 -1
- data/spec/models/scm_hook_spec.rb +113 -0
- data/spec/models/simple_chamber_spec.rb +1 -1
- data/spec/models/simple_group_spec.rb +1 -1
- data/spec/models/simple_user_spec.rb +1 -1
- data/spec/models/skill_spec.rb +1 -1
- data/spec/models/summariad_by_component_inner_spec.rb +65 -0
- data/spec/models/summariad_by_component_spec.rb +47 -0
- data/spec/models/summariad_by_milestone_inner_spec.rb +65 -0
- data/spec/models/summariad_by_milestone_spec.rb +47 -0
- data/spec/models/summariad_by_owner_inner_spec.rb +65 -0
- data/spec/models/summariad_by_owner_spec.rb +47 -0
- data/spec/models/summariad_by_priority_inner_spec.rb +65 -0
- data/spec/models/summariad_by_priority_spec.rb +47 -0
- data/spec/models/summariad_by_severity_inner_spec.rb +65 -0
- data/spec/models/summariad_by_severity_spec.rb +47 -0
- data/spec/models/summariad_by_type_inner_spec.rb +65 -0
- data/spec/models/summariad_by_type_spec.rb +47 -0
- data/spec/models/token_spec.rb +1 -1
- data/spec/models/user_images_spec.rb +77 -0
- data/spec/models/user_spec.rb +16 -4
- data/spec/models/user_stats_spec.rb +203 -0
- data/spec/spec_helper.rb +1 -1
- metadata +179 -3
@@ -0,0 +1,226 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20171120
|
7
|
+
Contact: admin@osdn.net
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module OSDNClient
|
27
|
+
|
28
|
+
class ProjectSCMLastCommit
|
29
|
+
attr_accessor :id
|
30
|
+
|
31
|
+
attr_accessor :author
|
32
|
+
|
33
|
+
attr_accessor :date
|
34
|
+
|
35
|
+
attr_accessor :message
|
36
|
+
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'id' => :'id',
|
42
|
+
:'author' => :'author',
|
43
|
+
:'date' => :'date',
|
44
|
+
:'message' => :'message'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'id' => :'String',
|
52
|
+
:'author' => :'String',
|
53
|
+
:'date' => :'DateTime',
|
54
|
+
:'message' => :'String'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
return unless attributes.is_a?(Hash)
|
62
|
+
|
63
|
+
# convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
65
|
+
|
66
|
+
if attributes.has_key?(:'id')
|
67
|
+
self.id = attributes[:'id']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'author')
|
71
|
+
self.author = attributes[:'author']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'date')
|
75
|
+
self.date = attributes[:'date']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'message')
|
79
|
+
self.message = attributes[:'message']
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
+
# @return Array for valid properies with the reasons
|
86
|
+
def list_invalid_properties
|
87
|
+
invalid_properties = Array.new
|
88
|
+
return invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
return true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
id == o.id &&
|
103
|
+
author == o.author &&
|
104
|
+
date == o.date &&
|
105
|
+
message == o.message
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Fixnum] Hash code
|
116
|
+
def hash
|
117
|
+
[id, author, date, message].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.swagger_types.each_pair do |key, type|
|
126
|
+
if type =~ /^Array<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :BOOLEAN
|
157
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
temp_model = OSDNClient.const_get(type).new
|
178
|
+
temp_model.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
next if value.nil?
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map{ |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
@@ -0,0 +1,356 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20171120
|
7
|
+
Contact: admin@osdn.net
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module OSDNClient
|
27
|
+
|
28
|
+
class ProjectSvn
|
29
|
+
attr_accessor :id
|
30
|
+
|
31
|
+
attr_accessor :created
|
32
|
+
|
33
|
+
attr_accessor :active
|
34
|
+
|
35
|
+
attr_accessor :setting_applied
|
36
|
+
|
37
|
+
attr_accessor :name
|
38
|
+
|
39
|
+
attr_accessor :description
|
40
|
+
|
41
|
+
attr_accessor :type
|
42
|
+
|
43
|
+
attr_accessor :mail_enabled
|
44
|
+
|
45
|
+
attr_accessor :mail_recipients
|
46
|
+
|
47
|
+
attr_accessor :url_viewer
|
48
|
+
|
49
|
+
attr_accessor :url_rw
|
50
|
+
|
51
|
+
attr_accessor :url_ro
|
52
|
+
|
53
|
+
attr_accessor :last_commit
|
54
|
+
|
55
|
+
attr_accessor :branches
|
56
|
+
|
57
|
+
attr_accessor :tags
|
58
|
+
|
59
|
+
attr_accessor :url_rw_https
|
60
|
+
|
61
|
+
attr_accessor :url_rw_ssh
|
62
|
+
|
63
|
+
attr_accessor :url_ro_http
|
64
|
+
|
65
|
+
|
66
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
67
|
+
def self.attribute_map
|
68
|
+
{
|
69
|
+
:'id' => :'id',
|
70
|
+
:'created' => :'created',
|
71
|
+
:'active' => :'active',
|
72
|
+
:'setting_applied' => :'setting_applied',
|
73
|
+
:'name' => :'name',
|
74
|
+
:'description' => :'description',
|
75
|
+
:'type' => :'type',
|
76
|
+
:'mail_enabled' => :'mail_enabled',
|
77
|
+
:'mail_recipients' => :'mail_recipients',
|
78
|
+
:'url_viewer' => :'url_viewer',
|
79
|
+
:'url_rw' => :'url_rw',
|
80
|
+
:'url_ro' => :'url_ro',
|
81
|
+
:'last_commit' => :'last_commit',
|
82
|
+
:'branches' => :'branches',
|
83
|
+
:'tags' => :'tags',
|
84
|
+
:'url_rw_https' => :'url_rw_https',
|
85
|
+
:'url_rw_ssh' => :'url_rw_ssh',
|
86
|
+
:'url_ro_http' => :'url_ro_http'
|
87
|
+
}
|
88
|
+
end
|
89
|
+
|
90
|
+
# Attribute type mapping.
|
91
|
+
def self.swagger_types
|
92
|
+
{
|
93
|
+
:'id' => :'Integer',
|
94
|
+
:'created' => :'BOOLEAN',
|
95
|
+
:'active' => :'BOOLEAN',
|
96
|
+
:'setting_applied' => :'BOOLEAN',
|
97
|
+
:'name' => :'String',
|
98
|
+
:'description' => :'String',
|
99
|
+
:'type' => :'String',
|
100
|
+
:'mail_enabled' => :'BOOLEAN',
|
101
|
+
:'mail_recipients' => :'String',
|
102
|
+
:'url_viewer' => :'String',
|
103
|
+
:'url_rw' => :'String',
|
104
|
+
:'url_ro' => :'String',
|
105
|
+
:'last_commit' => :'ProjectSCMLastCommit',
|
106
|
+
:'branches' => :'Array<String>',
|
107
|
+
:'tags' => :'Array<String>',
|
108
|
+
:'url_rw_https' => :'String',
|
109
|
+
:'url_rw_ssh' => :'String',
|
110
|
+
:'url_ro_http' => :'String'
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
114
|
+
# Initializes the object
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
def initialize(attributes = {})
|
117
|
+
return unless attributes.is_a?(Hash)
|
118
|
+
|
119
|
+
# convert string to symbol for hash key
|
120
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
121
|
+
|
122
|
+
if attributes.has_key?(:'id')
|
123
|
+
self.id = attributes[:'id']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'created')
|
127
|
+
self.created = attributes[:'created']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'active')
|
131
|
+
self.active = attributes[:'active']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.has_key?(:'setting_applied')
|
135
|
+
self.setting_applied = attributes[:'setting_applied']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.has_key?(:'name')
|
139
|
+
self.name = attributes[:'name']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.has_key?(:'description')
|
143
|
+
self.description = attributes[:'description']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'type')
|
147
|
+
self.type = attributes[:'type']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'mail_enabled')
|
151
|
+
self.mail_enabled = attributes[:'mail_enabled']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.has_key?(:'mail_recipients')
|
155
|
+
self.mail_recipients = attributes[:'mail_recipients']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.has_key?(:'url_viewer')
|
159
|
+
self.url_viewer = attributes[:'url_viewer']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'url_rw')
|
163
|
+
self.url_rw = attributes[:'url_rw']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'url_ro')
|
167
|
+
self.url_ro = attributes[:'url_ro']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'last_commit')
|
171
|
+
self.last_commit = attributes[:'last_commit']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'branches')
|
175
|
+
if (value = attributes[:'branches']).is_a?(Array)
|
176
|
+
self.branches = value
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'tags')
|
181
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
182
|
+
self.tags = value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.has_key?(:'url_rw_https')
|
187
|
+
self.url_rw_https = attributes[:'url_rw_https']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.has_key?(:'url_rw_ssh')
|
191
|
+
self.url_rw_ssh = attributes[:'url_rw_ssh']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'url_ro_http')
|
195
|
+
self.url_ro_http = attributes[:'url_ro_http']
|
196
|
+
end
|
197
|
+
|
198
|
+
end
|
199
|
+
|
200
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
201
|
+
# @return Array for valid properies with the reasons
|
202
|
+
def list_invalid_properties
|
203
|
+
invalid_properties = Array.new
|
204
|
+
return invalid_properties
|
205
|
+
end
|
206
|
+
|
207
|
+
# Check to see if the all the properties in the model are valid
|
208
|
+
# @return true if the model is valid
|
209
|
+
def valid?
|
210
|
+
return true
|
211
|
+
end
|
212
|
+
|
213
|
+
# Checks equality by comparing each attribute.
|
214
|
+
# @param [Object] Object to be compared
|
215
|
+
def ==(o)
|
216
|
+
return true if self.equal?(o)
|
217
|
+
self.class == o.class &&
|
218
|
+
id == o.id &&
|
219
|
+
created == o.created &&
|
220
|
+
active == o.active &&
|
221
|
+
setting_applied == o.setting_applied &&
|
222
|
+
name == o.name &&
|
223
|
+
description == o.description &&
|
224
|
+
type == o.type &&
|
225
|
+
mail_enabled == o.mail_enabled &&
|
226
|
+
mail_recipients == o.mail_recipients &&
|
227
|
+
url_viewer == o.url_viewer &&
|
228
|
+
url_rw == o.url_rw &&
|
229
|
+
url_ro == o.url_ro &&
|
230
|
+
last_commit == o.last_commit &&
|
231
|
+
branches == o.branches &&
|
232
|
+
tags == o.tags &&
|
233
|
+
url_rw_https == o.url_rw_https &&
|
234
|
+
url_rw_ssh == o.url_rw_ssh &&
|
235
|
+
url_ro_http == o.url_ro_http
|
236
|
+
end
|
237
|
+
|
238
|
+
# @see the `==` method
|
239
|
+
# @param [Object] Object to be compared
|
240
|
+
def eql?(o)
|
241
|
+
self == o
|
242
|
+
end
|
243
|
+
|
244
|
+
# Calculates hash code according to all attributes.
|
245
|
+
# @return [Fixnum] Hash code
|
246
|
+
def hash
|
247
|
+
[id, created, active, setting_applied, name, description, type, mail_enabled, mail_recipients, url_viewer, url_rw, url_ro, last_commit, branches, tags, url_rw_https, url_rw_ssh, url_ro_http].hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Builds the object from hash
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
252
|
+
# @return [Object] Returns the model itself
|
253
|
+
def build_from_hash(attributes)
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
255
|
+
self.class.swagger_types.each_pair do |key, type|
|
256
|
+
if type =~ /^Array<(.*)>/i
|
257
|
+
# check to ensure the input is an array given that the the attribute
|
258
|
+
# is documented as an array but the input is not
|
259
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
260
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
261
|
+
end
|
262
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
263
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
264
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
265
|
+
end
|
266
|
+
|
267
|
+
self
|
268
|
+
end
|
269
|
+
|
270
|
+
# Deserializes the data based on type
|
271
|
+
# @param string type Data type
|
272
|
+
# @param string value Value to be deserialized
|
273
|
+
# @return [Object] Deserialized data
|
274
|
+
def _deserialize(type, value)
|
275
|
+
case type.to_sym
|
276
|
+
when :DateTime
|
277
|
+
DateTime.parse(value)
|
278
|
+
when :Date
|
279
|
+
Date.parse(value)
|
280
|
+
when :String
|
281
|
+
value.to_s
|
282
|
+
when :Integer
|
283
|
+
value.to_i
|
284
|
+
when :Float
|
285
|
+
value.to_f
|
286
|
+
when :BOOLEAN
|
287
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
288
|
+
true
|
289
|
+
else
|
290
|
+
false
|
291
|
+
end
|
292
|
+
when :Object
|
293
|
+
# generic object (usually a Hash), return directly
|
294
|
+
value
|
295
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
296
|
+
inner_type = Regexp.last_match[:inner_type]
|
297
|
+
value.map { |v| _deserialize(inner_type, v) }
|
298
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
299
|
+
k_type = Regexp.last_match[:k_type]
|
300
|
+
v_type = Regexp.last_match[:v_type]
|
301
|
+
{}.tap do |hash|
|
302
|
+
value.each do |k, v|
|
303
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
304
|
+
end
|
305
|
+
end
|
306
|
+
else # model
|
307
|
+
temp_model = OSDNClient.const_get(type).new
|
308
|
+
temp_model.build_from_hash(value)
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
# Returns the string representation of the object
|
313
|
+
# @return [String] String presentation of the object
|
314
|
+
def to_s
|
315
|
+
to_hash.to_s
|
316
|
+
end
|
317
|
+
|
318
|
+
# to_body is an alias to to_hash (backward compatibility)
|
319
|
+
# @return [Hash] Returns the object in the form of hash
|
320
|
+
def to_body
|
321
|
+
to_hash
|
322
|
+
end
|
323
|
+
|
324
|
+
# Returns the object in the form of hash
|
325
|
+
# @return [Hash] Returns the object in the form of hash
|
326
|
+
def to_hash
|
327
|
+
hash = {}
|
328
|
+
self.class.attribute_map.each_pair do |attr, param|
|
329
|
+
value = self.send(attr)
|
330
|
+
next if value.nil?
|
331
|
+
hash[param] = _to_hash(value)
|
332
|
+
end
|
333
|
+
hash
|
334
|
+
end
|
335
|
+
|
336
|
+
# Outputs non-array value in the form of hash
|
337
|
+
# For object, use to_hash. Otherwise, just return the value
|
338
|
+
# @param [Object] value Any valid value
|
339
|
+
# @return [Hash] Returns the value in the form of hash
|
340
|
+
def _to_hash(value)
|
341
|
+
if value.is_a?(Array)
|
342
|
+
value.compact.map{ |v| _to_hash(v) }
|
343
|
+
elsif value.is_a?(Hash)
|
344
|
+
{}.tap do |hash|
|
345
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
346
|
+
end
|
347
|
+
elsif value.respond_to? :to_hash
|
348
|
+
value.to_hash
|
349
|
+
else
|
350
|
+
value
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
end
|
355
|
+
|
356
|
+
end
|