pulp_ostree_client 2.0.0a1.dev1626751709 → 2.0.0a1.dev1631416829
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pulp_ostree_client might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +41 -23
- data/docs/ContentCommitsApi.md +138 -0
- data/docs/ContentConfigsApi.md +138 -0
- data/docs/ContentObjectsApi.md +138 -0
- data/docs/ContentRefsApi.md +138 -0
- data/docs/{ContentOstreeApi.md → ContentSummariesApi.md} +21 -75
- data/docs/DistributionsOstreeApi.md +3 -3
- data/docs/OstreeOstreeCommitResponse.md +25 -0
- data/docs/OstreeOstreeConfigResponse.md +21 -0
- data/docs/OstreeOstreeDistribution.md +2 -2
- data/docs/OstreeOstreeDistributionResponse.md +2 -2
- data/docs/OstreeOstreeObjectResponse.md +27 -0
- data/docs/OstreeOstreeRefResponse.md +25 -0
- data/docs/OstreeOstreeRemote.md +4 -2
- data/docs/OstreeOstreeRemoteResponse.md +4 -2
- data/docs/OstreeOstreeRepository.md +3 -3
- data/docs/OstreeOstreeRepositoryResponse.md +3 -3
- data/docs/{OstreeOstreeContentResponse.md → OstreeOstreeSummaryResponse.md} +2 -2
- data/docs/OstreeRepoImport.md +23 -0
- data/docs/{PaginatedostreeOstreePublicationResponseList.md → PaginatedostreeOstreeCommitResponseList.md} +3 -3
- data/docs/PaginatedostreeOstreeConfigResponseList.md +23 -0
- data/docs/PaginatedostreeOstreeObjectResponseList.md +23 -0
- data/docs/PaginatedostreeOstreeRefResponseList.md +23 -0
- data/docs/{PaginatedostreeOstreeContentResponseList.md → PaginatedostreeOstreeSummaryResponseList.md} +3 -3
- data/docs/PatchedostreeOstreeDistribution.md +2 -2
- data/docs/PatchedostreeOstreeRemote.md +4 -2
- data/docs/PatchedostreeOstreeRepository.md +3 -3
- data/docs/RemotesOstreeApi.md +4 -4
- data/docs/RepositoriesOstreeApi.md +60 -4
- data/docs/RepositoriesOstreeVersionsApi.md +3 -3
- data/lib/pulp_ostree_client/api/content_commits_api.rb +170 -0
- data/lib/pulp_ostree_client/api/content_configs_api.rb +170 -0
- data/lib/pulp_ostree_client/api/content_objects_api.rb +170 -0
- data/lib/pulp_ostree_client/api/content_refs_api.rb +170 -0
- data/lib/pulp_ostree_client/api/{content_ostree_api.rb → content_summaries_api.rb} +29 -93
- data/lib/pulp_ostree_client/api/distributions_ostree_api.rb +4 -4
- data/lib/pulp_ostree_client/api/remotes_ostree_api.rb +6 -6
- data/lib/pulp_ostree_client/api/repositories_ostree_api.rb +76 -6
- data/lib/pulp_ostree_client/api/repositories_ostree_versions_api.rb +4 -4
- data/lib/pulp_ostree_client/configuration.rb +2 -2
- data/lib/pulp_ostree_client/models/ostree_ostree_commit_response.rb +256 -0
- data/lib/pulp_ostree_client/models/{ostree_ostree_publication_response.rb → ostree_ostree_config_response.rb} +17 -21
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution.rb +10 -10
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution_response.rb +10 -10
- data/lib/pulp_ostree_client/models/ostree_ostree_object_response.rb +275 -0
- data/lib/pulp_ostree_client/models/{ostree_ostree_content.rb → ostree_ostree_ref_response.rb} +47 -15
- data/lib/pulp_ostree_client/models/ostree_ostree_remote.rb +34 -7
- data/lib/pulp_ostree_client/models/ostree_ostree_remote_response.rb +34 -7
- data/lib/pulp_ostree_client/models/ostree_ostree_repository.rb +18 -17
- data/lib/pulp_ostree_client/models/ostree_ostree_repository_response.rb +18 -17
- data/lib/pulp_ostree_client/models/{ostree_ostree_content_response.rb → ostree_ostree_summary_response.rb} +4 -4
- data/lib/pulp_ostree_client/models/ostree_repo_import.rb +248 -0
- data/lib/pulp_ostree_client/models/{paginatedostree_ostree_publication_response_list.rb → paginatedostree_ostree_commit_response_list.rb} +4 -4
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_config_response_list.rb +237 -0
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_object_response_list.rb +237 -0
- data/lib/pulp_ostree_client/models/{ostree_ostree_publication.rb → paginatedostree_ostree_ref_response_list.rb} +38 -18
- data/lib/pulp_ostree_client/models/{paginatedostree_ostree_content_response_list.rb → paginatedostree_ostree_summary_response_list.rb} +4 -4
- data/lib/pulp_ostree_client/models/patchedostree_ostree_distribution.rb +10 -10
- data/lib/pulp_ostree_client/models/patchedostree_ostree_remote.rb +34 -7
- data/lib/pulp_ostree_client/models/patchedostree_ostree_repository.rb +18 -17
- data/lib/pulp_ostree_client/models/policy_enum.rb +1 -1
- data/lib/pulp_ostree_client/version.rb +1 -1
- data/lib/pulp_ostree_client.rb +16 -8
- data/spec/api/{content_ostree_api_spec.rb → content_commits_api_spec.rb} +13 -25
- data/spec/api/content_configs_api_spec.rb +68 -0
- data/spec/api/content_objects_api_spec.rb +68 -0
- data/spec/api/content_refs_api_spec.rb +68 -0
- data/spec/api/content_summaries_api_spec.rb +68 -0
- data/spec/api/distributions_ostree_api_spec.rb +2 -2
- data/spec/api/remotes_ostree_api_spec.rb +3 -3
- data/spec/api/repositories_ostree_api_spec.rb +16 -3
- data/spec/api/repositories_ostree_versions_api_spec.rb +2 -2
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/ostree_ostree_commit_response_spec.rb +65 -0
- data/spec/models/{ostree_ostree_content_spec.rb → ostree_ostree_config_response_spec.rb} +14 -8
- data/spec/models/ostree_ostree_distribution_response_spec.rb +1 -1
- data/spec/models/ostree_ostree_distribution_spec.rb +1 -1
- data/spec/models/ostree_ostree_object_response_spec.rb +71 -0
- data/spec/models/{ostree_ostree_publication_response_spec.rb → ostree_ostree_ref_response_spec.rb} +14 -8
- data/spec/models/ostree_ostree_remote_response_spec.rb +6 -0
- data/spec/models/ostree_ostree_remote_spec.rb +6 -0
- data/spec/models/ostree_ostree_repository_response_spec.rb +1 -1
- data/spec/models/ostree_ostree_repository_spec.rb +1 -1
- data/spec/models/{ostree_ostree_content_response_spec.rb → ostree_ostree_summary_response_spec.rb} +6 -6
- data/spec/models/ostree_repo_import_spec.rb +59 -0
- data/spec/models/{paginatedostree_ostree_publication_response_list_spec.rb → paginatedostree_ostree_commit_response_list_spec.rb} +6 -6
- data/spec/models/paginatedostree_ostree_config_response_list_spec.rb +59 -0
- data/spec/models/paginatedostree_ostree_object_response_list_spec.rb +59 -0
- data/spec/models/paginatedostree_ostree_ref_response_list_spec.rb +59 -0
- data/spec/models/{paginatedostree_ostree_content_response_list_spec.rb → paginatedostree_ostree_summary_response_list_spec.rb} +6 -6
- data/spec/models/patchedostree_ostree_distribution_spec.rb +1 -1
- data/spec/models/patchedostree_ostree_remote_spec.rb +6 -0
- data/spec/models/patchedostree_ostree_repository_spec.rb +1 -1
- metadata +81 -49
- data/docs/OstreeOstreeContent.md +0 -19
- data/docs/OstreeOstreePublication.md +0 -19
- data/docs/OstreeOstreePublicationResponse.md +0 -23
- data/docs/PublicationsOstreeApi.md +0 -257
- data/lib/pulp_ostree_client/api/publications_ostree_api.rb +0 -312
- data/spec/api/publications_ostree_api_spec.rb +0 -98
- data/spec/models/ostree_ostree_publication_spec.rb +0 -47
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpOstreeClient
|
16
|
-
# A Serializer for
|
16
|
+
# A Serializer class for an OSTree distribution.
|
17
17
|
class OstreeOstreeDistribution
|
18
18
|
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
19
19
|
attr_accessor :base_path
|
@@ -29,8 +29,8 @@ module PulpOstreeClient
|
|
29
29
|
# The latest RepositoryVersion for this Repository will be served.
|
30
30
|
attr_accessor :repository
|
31
31
|
|
32
|
-
#
|
33
|
-
attr_accessor :
|
32
|
+
# RepositoryVersion to be served
|
33
|
+
attr_accessor :repository_version
|
34
34
|
|
35
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
36
36
|
def self.attribute_map
|
@@ -40,7 +40,7 @@ module PulpOstreeClient
|
|
40
40
|
:'pulp_labels' => :'pulp_labels',
|
41
41
|
:'name' => :'name',
|
42
42
|
:'repository' => :'repository',
|
43
|
-
:'
|
43
|
+
:'repository_version' => :'repository_version'
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
@@ -52,7 +52,7 @@ module PulpOstreeClient
|
|
52
52
|
:'pulp_labels' => :'Object',
|
53
53
|
:'name' => :'String',
|
54
54
|
:'repository' => :'String',
|
55
|
-
:'
|
55
|
+
:'repository_version' => :'String'
|
56
56
|
}
|
57
57
|
end
|
58
58
|
|
@@ -61,7 +61,7 @@ module PulpOstreeClient
|
|
61
61
|
Set.new([
|
62
62
|
:'content_guard',
|
63
63
|
:'repository',
|
64
|
-
:'
|
64
|
+
:'repository_version'
|
65
65
|
])
|
66
66
|
end
|
67
67
|
|
@@ -100,8 +100,8 @@ module PulpOstreeClient
|
|
100
100
|
self.repository = attributes[:'repository']
|
101
101
|
end
|
102
102
|
|
103
|
-
if attributes.key?(:'
|
104
|
-
self.
|
103
|
+
if attributes.key?(:'repository_version')
|
104
|
+
self.repository_version = attributes[:'repository_version']
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
@@ -138,7 +138,7 @@ module PulpOstreeClient
|
|
138
138
|
pulp_labels == o.pulp_labels &&
|
139
139
|
name == o.name &&
|
140
140
|
repository == o.repository &&
|
141
|
-
|
141
|
+
repository_version == o.repository_version
|
142
142
|
end
|
143
143
|
|
144
144
|
# @see the `==` method
|
@@ -150,7 +150,7 @@ module PulpOstreeClient
|
|
150
150
|
# Calculates hash code according to all attributes.
|
151
151
|
# @return [Integer] Hash code
|
152
152
|
def hash
|
153
|
-
[base_path, content_guard, pulp_labels, name, repository,
|
153
|
+
[base_path, content_guard, pulp_labels, name, repository, repository_version].hash
|
154
154
|
end
|
155
155
|
|
156
156
|
# Builds the object from hash
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpOstreeClient
|
16
|
-
# A Serializer for
|
16
|
+
# A Serializer class for an OSTree distribution.
|
17
17
|
class OstreeOstreeDistributionResponse
|
18
18
|
attr_accessor :pulp_href
|
19
19
|
|
@@ -37,8 +37,8 @@ module PulpOstreeClient
|
|
37
37
|
# The latest RepositoryVersion for this Repository will be served.
|
38
38
|
attr_accessor :repository
|
39
39
|
|
40
|
-
#
|
41
|
-
attr_accessor :
|
40
|
+
# RepositoryVersion to be served
|
41
|
+
attr_accessor :repository_version
|
42
42
|
|
43
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
44
|
def self.attribute_map
|
@@ -51,7 +51,7 @@ module PulpOstreeClient
|
|
51
51
|
:'pulp_labels' => :'pulp_labels',
|
52
52
|
:'name' => :'name',
|
53
53
|
:'repository' => :'repository',
|
54
|
-
:'
|
54
|
+
:'repository_version' => :'repository_version'
|
55
55
|
}
|
56
56
|
end
|
57
57
|
|
@@ -66,7 +66,7 @@ module PulpOstreeClient
|
|
66
66
|
:'pulp_labels' => :'Object',
|
67
67
|
:'name' => :'String',
|
68
68
|
:'repository' => :'String',
|
69
|
-
:'
|
69
|
+
:'repository_version' => :'String'
|
70
70
|
}
|
71
71
|
end
|
72
72
|
|
@@ -75,7 +75,7 @@ module PulpOstreeClient
|
|
75
75
|
Set.new([
|
76
76
|
:'content_guard',
|
77
77
|
:'repository',
|
78
|
-
:'
|
78
|
+
:'repository_version'
|
79
79
|
])
|
80
80
|
end
|
81
81
|
|
@@ -126,8 +126,8 @@ module PulpOstreeClient
|
|
126
126
|
self.repository = attributes[:'repository']
|
127
127
|
end
|
128
128
|
|
129
|
-
if attributes.key?(:'
|
130
|
-
self.
|
129
|
+
if attributes.key?(:'repository_version')
|
130
|
+
self.repository_version = attributes[:'repository_version']
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
@@ -167,7 +167,7 @@ module PulpOstreeClient
|
|
167
167
|
pulp_labels == o.pulp_labels &&
|
168
168
|
name == o.name &&
|
169
169
|
repository == o.repository &&
|
170
|
-
|
170
|
+
repository_version == o.repository_version
|
171
171
|
end
|
172
172
|
|
173
173
|
# @see the `==` method
|
@@ -179,7 +179,7 @@ module PulpOstreeClient
|
|
179
179
|
# Calculates hash code according to all attributes.
|
180
180
|
# @return [Integer] Hash code
|
181
181
|
def hash
|
182
|
-
[pulp_href, pulp_created, base_path, base_url, content_guard, pulp_labels, name, repository,
|
182
|
+
[pulp_href, pulp_created, base_path, base_url, content_guard, pulp_labels, name, repository, repository_version].hash
|
183
183
|
end
|
184
184
|
|
185
185
|
# Builds the object from hash
|
@@ -0,0 +1,275 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpOstreeClient
|
16
|
+
# A Serializer class for OSTree objects (e.g., dirtree, dirmeta, file).
|
17
|
+
class OstreeOstreeObjectResponse
|
18
|
+
attr_accessor :pulp_href
|
19
|
+
|
20
|
+
# Timestamp of creation.
|
21
|
+
attr_accessor :pulp_created
|
22
|
+
|
23
|
+
# Artifact file representing the physical content
|
24
|
+
attr_accessor :artifact
|
25
|
+
|
26
|
+
attr_accessor :commit
|
27
|
+
|
28
|
+
attr_accessor :checksum
|
29
|
+
|
30
|
+
# The type of an object. All values are described by the mapping declared at https://lazka.github.io/pgi-docs/OSTree-1.0/enums.html#OSTree.ObjectType
|
31
|
+
attr_accessor :typ
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'pulp_href' => :'pulp_href',
|
37
|
+
:'pulp_created' => :'pulp_created',
|
38
|
+
:'artifact' => :'artifact',
|
39
|
+
:'commit' => :'commit',
|
40
|
+
:'checksum' => :'checksum',
|
41
|
+
:'typ' => :'typ'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'pulp_href' => :'String',
|
49
|
+
:'pulp_created' => :'DateTime',
|
50
|
+
:'artifact' => :'String',
|
51
|
+
:'commit' => :'String',
|
52
|
+
:'checksum' => :'String',
|
53
|
+
:'typ' => :'Integer'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# List of attributes with nullable: true
|
58
|
+
def self.openapi_nullable
|
59
|
+
Set.new([
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
if (!attributes.is_a?(Hash))
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::OstreeOstreeObjectResponse` initialize method"
|
68
|
+
end
|
69
|
+
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpOstreeClient::OstreeOstreeObjectResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
+
end
|
75
|
+
h[k.to_sym] = v
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'pulp_href')
|
79
|
+
self.pulp_href = attributes[:'pulp_href']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'pulp_created')
|
83
|
+
self.pulp_created = attributes[:'pulp_created']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'artifact')
|
87
|
+
self.artifact = attributes[:'artifact']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'commit')
|
91
|
+
self.commit = attributes[:'commit']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'checksum')
|
95
|
+
self.checksum = attributes[:'checksum']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'typ')
|
99
|
+
self.typ = attributes[:'typ']
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
104
|
+
# @return Array for valid properties with the reasons
|
105
|
+
def list_invalid_properties
|
106
|
+
invalid_properties = Array.new
|
107
|
+
if @artifact.nil?
|
108
|
+
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
109
|
+
end
|
110
|
+
|
111
|
+
if @commit.nil?
|
112
|
+
invalid_properties.push('invalid value for "commit", commit cannot be nil.')
|
113
|
+
end
|
114
|
+
|
115
|
+
if @checksum.nil?
|
116
|
+
invalid_properties.push('invalid value for "checksum", checksum cannot be nil.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if @typ.nil?
|
120
|
+
invalid_properties.push('invalid value for "typ", typ cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
return false if @artifact.nil?
|
130
|
+
return false if @commit.nil?
|
131
|
+
return false if @checksum.nil?
|
132
|
+
return false if @typ.nil?
|
133
|
+
true
|
134
|
+
end
|
135
|
+
|
136
|
+
# Checks equality by comparing each attribute.
|
137
|
+
# @param [Object] Object to be compared
|
138
|
+
def ==(o)
|
139
|
+
return true if self.equal?(o)
|
140
|
+
self.class == o.class &&
|
141
|
+
pulp_href == o.pulp_href &&
|
142
|
+
pulp_created == o.pulp_created &&
|
143
|
+
artifact == o.artifact &&
|
144
|
+
commit == o.commit &&
|
145
|
+
checksum == o.checksum &&
|
146
|
+
typ == o.typ
|
147
|
+
end
|
148
|
+
|
149
|
+
# @see the `==` method
|
150
|
+
# @param [Object] Object to be compared
|
151
|
+
def eql?(o)
|
152
|
+
self == o
|
153
|
+
end
|
154
|
+
|
155
|
+
# Calculates hash code according to all attributes.
|
156
|
+
# @return [Integer] Hash code
|
157
|
+
def hash
|
158
|
+
[pulp_href, pulp_created, artifact, commit, checksum, typ].hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Builds the object from hash
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
+
# @return [Object] Returns the model itself
|
164
|
+
def self.build_from_hash(attributes)
|
165
|
+
new.build_from_hash(attributes)
|
166
|
+
end
|
167
|
+
|
168
|
+
# Builds the object from hash
|
169
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
+
# @return [Object] Returns the model itself
|
171
|
+
def build_from_hash(attributes)
|
172
|
+
return nil unless attributes.is_a?(Hash)
|
173
|
+
self.class.openapi_types.each_pair do |key, type|
|
174
|
+
if type =~ /\AArray<(.*)>/i
|
175
|
+
# check to ensure the input is an array given that the attribute
|
176
|
+
# is documented as an array but the input is not
|
177
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
178
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
179
|
+
end
|
180
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
181
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
182
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
183
|
+
end
|
184
|
+
|
185
|
+
self
|
186
|
+
end
|
187
|
+
|
188
|
+
# Deserializes the data based on type
|
189
|
+
# @param string type Data type
|
190
|
+
# @param string value Value to be deserialized
|
191
|
+
# @return [Object] Deserialized data
|
192
|
+
def _deserialize(type, value)
|
193
|
+
case type.to_sym
|
194
|
+
when :DateTime
|
195
|
+
DateTime.parse(value)
|
196
|
+
when :Date
|
197
|
+
Date.parse(value)
|
198
|
+
when :String
|
199
|
+
value.to_s
|
200
|
+
when :Integer
|
201
|
+
value.to_i
|
202
|
+
when :Float
|
203
|
+
value.to_f
|
204
|
+
when :Boolean
|
205
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
206
|
+
true
|
207
|
+
else
|
208
|
+
false
|
209
|
+
end
|
210
|
+
when :Object
|
211
|
+
# generic object (usually a Hash), return directly
|
212
|
+
value
|
213
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
214
|
+
inner_type = Regexp.last_match[:inner_type]
|
215
|
+
value.map { |v| _deserialize(inner_type, v) }
|
216
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
217
|
+
k_type = Regexp.last_match[:k_type]
|
218
|
+
v_type = Regexp.last_match[:v_type]
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each do |k, v|
|
221
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
else # model
|
225
|
+
PulpOstreeClient.const_get(type).build_from_hash(value)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the string representation of the object
|
230
|
+
# @return [String] String presentation of the object
|
231
|
+
def to_s
|
232
|
+
to_hash.to_s
|
233
|
+
end
|
234
|
+
|
235
|
+
# to_body is an alias to to_hash (backward compatibility)
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
237
|
+
def to_body
|
238
|
+
to_hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Returns the object in the form of hash
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_hash
|
244
|
+
hash = {}
|
245
|
+
self.class.attribute_map.each_pair do |attr, param|
|
246
|
+
value = self.send(attr)
|
247
|
+
if value.nil?
|
248
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
249
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
250
|
+
end
|
251
|
+
|
252
|
+
hash[param] = _to_hash(value)
|
253
|
+
end
|
254
|
+
hash
|
255
|
+
end
|
256
|
+
|
257
|
+
# Outputs non-array value in the form of hash
|
258
|
+
# For object, use to_hash. Otherwise, just return the value
|
259
|
+
# @param [Object] value Any valid value
|
260
|
+
# @return [Hash] Returns the value in the form of hash
|
261
|
+
def _to_hash(value)
|
262
|
+
if value.is_a?(Array)
|
263
|
+
value.compact.map { |v| _to_hash(v) }
|
264
|
+
elsif value.is_a?(Hash)
|
265
|
+
{}.tap do |hash|
|
266
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
267
|
+
end
|
268
|
+
elsif value.respond_to? :to_hash
|
269
|
+
value.to_hash
|
270
|
+
else
|
271
|
+
value
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
data/lib/pulp_ostree_client/models/{ostree_ostree_content.rb → ostree_ostree_ref_response.rb}
RENAMED
@@ -13,27 +13,39 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpOstreeClient
|
16
|
-
# A Serializer
|
17
|
-
class
|
16
|
+
# A Serializer class for OSTree head commits.
|
17
|
+
class OstreeOstreeRefResponse
|
18
|
+
attr_accessor :pulp_href
|
19
|
+
|
20
|
+
# Timestamp of creation.
|
21
|
+
attr_accessor :pulp_created
|
22
|
+
|
18
23
|
# Artifact file representing the physical content
|
19
24
|
attr_accessor :artifact
|
20
25
|
|
21
|
-
|
22
|
-
|
26
|
+
attr_accessor :commit
|
27
|
+
|
28
|
+
attr_accessor :name
|
23
29
|
|
24
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
31
|
def self.attribute_map
|
26
32
|
{
|
33
|
+
:'pulp_href' => :'pulp_href',
|
34
|
+
:'pulp_created' => :'pulp_created',
|
27
35
|
:'artifact' => :'artifact',
|
28
|
-
:'
|
36
|
+
:'commit' => :'commit',
|
37
|
+
:'name' => :'name'
|
29
38
|
}
|
30
39
|
end
|
31
40
|
|
32
41
|
# Attribute type mapping.
|
33
42
|
def self.openapi_types
|
34
43
|
{
|
44
|
+
:'pulp_href' => :'String',
|
45
|
+
:'pulp_created' => :'DateTime',
|
35
46
|
:'artifact' => :'String',
|
36
|
-
:'
|
47
|
+
:'commit' => :'String',
|
48
|
+
:'name' => :'String'
|
37
49
|
}
|
38
50
|
end
|
39
51
|
|
@@ -47,23 +59,35 @@ module PulpOstreeClient
|
|
47
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
60
|
def initialize(attributes = {})
|
49
61
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::OstreeOstreeRefResponse` initialize method"
|
51
63
|
end
|
52
64
|
|
53
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
67
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpOstreeClient::
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpOstreeClient::OstreeOstreeRefResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
69
|
end
|
58
70
|
h[k.to_sym] = v
|
59
71
|
}
|
60
72
|
|
73
|
+
if attributes.key?(:'pulp_href')
|
74
|
+
self.pulp_href = attributes[:'pulp_href']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'pulp_created')
|
78
|
+
self.pulp_created = attributes[:'pulp_created']
|
79
|
+
end
|
80
|
+
|
61
81
|
if attributes.key?(:'artifact')
|
62
82
|
self.artifact = attributes[:'artifact']
|
63
83
|
end
|
64
84
|
|
65
|
-
if attributes.key?(:'
|
66
|
-
self.
|
85
|
+
if attributes.key?(:'commit')
|
86
|
+
self.commit = attributes[:'commit']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'name')
|
90
|
+
self.name = attributes[:'name']
|
67
91
|
end
|
68
92
|
end
|
69
93
|
|
@@ -75,8 +99,12 @@ module PulpOstreeClient
|
|
75
99
|
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
76
100
|
end
|
77
101
|
|
78
|
-
if @
|
79
|
-
invalid_properties.push('invalid value for "
|
102
|
+
if @commit.nil?
|
103
|
+
invalid_properties.push('invalid value for "commit", commit cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
if @name.nil?
|
107
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
80
108
|
end
|
81
109
|
|
82
110
|
invalid_properties
|
@@ -86,7 +114,8 @@ module PulpOstreeClient
|
|
86
114
|
# @return true if the model is valid
|
87
115
|
def valid?
|
88
116
|
return false if @artifact.nil?
|
89
|
-
return false if @
|
117
|
+
return false if @commit.nil?
|
118
|
+
return false if @name.nil?
|
90
119
|
true
|
91
120
|
end
|
92
121
|
|
@@ -95,8 +124,11 @@ module PulpOstreeClient
|
|
95
124
|
def ==(o)
|
96
125
|
return true if self.equal?(o)
|
97
126
|
self.class == o.class &&
|
127
|
+
pulp_href == o.pulp_href &&
|
128
|
+
pulp_created == o.pulp_created &&
|
98
129
|
artifact == o.artifact &&
|
99
|
-
|
130
|
+
commit == o.commit &&
|
131
|
+
name == o.name
|
100
132
|
end
|
101
133
|
|
102
134
|
# @see the `==` method
|
@@ -108,7 +140,7 @@ module PulpOstreeClient
|
|
108
140
|
# Calculates hash code according to all attributes.
|
109
141
|
# @return [Integer] Hash code
|
110
142
|
def hash
|
111
|
-
[artifact,
|
143
|
+
[pulp_href, pulp_created, artifact, commit, name].hash
|
112
144
|
end
|
113
145
|
|
114
146
|
# Builds the object from hash
|