pulp_ansible_client 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/AnsibleCollectionVersionResponse.md +3 -3
- data/docs/AnsibleRoleResponse.md +3 -3
- data/docs/ArtifactRefResponse.md +21 -0
- data/docs/CollectionResponse.md +2 -2
- data/docs/CollectionVersionResponse.md +1 -1
- data/docs/PaginatedCollectionResponseList.md +2 -2
- data/docs/PaginatedCollectionResponseListLinks.md +23 -0
- data/docs/PaginatedCollectionResponseListMeta.md +17 -0
- data/docs/PaginatedCollectionVersionResponseList.md +2 -2
- data/lib/pulp_ansible_client.rb +3 -0
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +11 -11
- data/lib/pulp_ansible_client/models/ansible_role_response.rb +11 -11
- data/lib/pulp_ansible_client/models/artifact_ref_response.rb +240 -0
- data/lib/pulp_ansible_client/models/collection_response.rb +2 -2
- data/lib/pulp_ansible_client/models/collection_version_response.rb +1 -1
- data/lib/pulp_ansible_client/models/paginated_collection_response_list.rb +2 -2
- data/lib/pulp_ansible_client/models/paginated_collection_response_list_links.rb +237 -0
- data/lib/pulp_ansible_client/models/paginated_collection_response_list_meta.rb +206 -0
- data/lib/pulp_ansible_client/models/paginated_collection_version_response_list.rb +2 -2
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/spec/models/ansible_collection_version_response_spec.rb +3 -3
- data/spec/models/ansible_role_response_spec.rb +3 -3
- data/spec/models/artifact_ref_response_spec.rb +53 -0
- data/spec/models/paginated_collection_response_list_links_spec.rb +59 -0
- data/spec/models/paginated_collection_response_list_meta_spec.rb +41 -0
- metadata +70 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f08a9d8fe3dc65d374a5885c209e57000f003caaf8b7df8efec8956eb67f814b
|
4
|
+
data.tar.gz: 1dd344d67707ee9011d4a1fa468cb88b5855f83f13e688e568054909167b93d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eec4cb6c79e7910bca65db1aa83bf0289f9ee8acfc30c3386b756f5d7a04527b9580bec303df7f77170f5e9b080f5eacd350a5aabc6185e9236ea839e9d89ba
|
7
|
+
data.tar.gz: 22c3d31a6efcf1e23d9845fa32018c94e5e9c40401a4363bbe38a32faa9b15d7f3acde47e10baee08f5cd450a33df98fcf3f2282a7e2237c69e9c0b64343ce34
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v3
|
10
|
-
- Package version: 0.5.
|
10
|
+
- Package version: 0.5.6
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://pulpproject.org](https://pulpproject.org)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build pulp_ansible_client.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./pulp_ansible_client-0.5.
|
27
|
+
gem install ./pulp_ansible_client-0.5.6.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./pulp_ansible_client-0.5.
|
30
|
+
(for development, run `gem install --dev ./pulp_ansible_client-0.5.6.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'pulp_ansible_client', '~> 0.5.
|
36
|
+
gem 'pulp_ansible_client', '~> 0.5.6'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -165,6 +165,7 @@ Class | Method | HTTP request | Description
|
|
165
165
|
- [PulpAnsibleClient::AnsibleRoleRemoteResponse](docs/AnsibleRoleRemoteResponse.md)
|
166
166
|
- [PulpAnsibleClient::AnsibleRoleResponse](docs/AnsibleRoleResponse.md)
|
167
167
|
- [PulpAnsibleClient::AnsibleTagResponse](docs/AnsibleTagResponse.md)
|
168
|
+
- [PulpAnsibleClient::ArtifactRefResponse](docs/ArtifactRefResponse.md)
|
168
169
|
- [PulpAnsibleClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
|
169
170
|
- [PulpAnsibleClient::CollectionImportDetailResponse](docs/CollectionImportDetailResponse.md)
|
170
171
|
- [PulpAnsibleClient::CollectionMetadataResponse](docs/CollectionMetadataResponse.md)
|
@@ -183,6 +184,8 @@ Class | Method | HTTP request | Description
|
|
183
184
|
- [PulpAnsibleClient::GalaxyRoleResponse](docs/GalaxyRoleResponse.md)
|
184
185
|
- [PulpAnsibleClient::GalaxyRoleVersionResponse](docs/GalaxyRoleVersionResponse.md)
|
185
186
|
- [PulpAnsibleClient::PaginatedCollectionResponseList](docs/PaginatedCollectionResponseList.md)
|
187
|
+
- [PulpAnsibleClient::PaginatedCollectionResponseListLinks](docs/PaginatedCollectionResponseListLinks.md)
|
188
|
+
- [PulpAnsibleClient::PaginatedCollectionResponseListMeta](docs/PaginatedCollectionResponseListMeta.md)
|
186
189
|
- [PulpAnsibleClient::PaginatedCollectionVersionResponseList](docs/PaginatedCollectionVersionResponseList.md)
|
187
190
|
- [PulpAnsibleClient::PaginatedGalaxyCollectionResponseList](docs/PaginatedGalaxyCollectionResponseList.md)
|
188
191
|
- [PulpAnsibleClient::PaginatedGalaxyCollectionVersionResponseList](docs/PaginatedGalaxyCollectionVersionResponseList.md)
|
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
7
8
|
**pulp_href** | **String** | | [optional] [readonly]
|
8
9
|
**artifact** | **String** | Artifact file representing the physical content |
|
9
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
10
10
|
**md5** | **String** | The MD5 checksum if available. | [optional] [readonly]
|
11
11
|
**sha1** | **String** | The SHA-1 checksum if available. | [optional] [readonly]
|
12
12
|
**sha224** | **String** | The SHA-224 checksum if available. | [optional] [readonly]
|
@@ -34,9 +34,9 @@ Name | Type | Description | Notes
|
|
34
34
|
```ruby
|
35
35
|
require 'PulpAnsibleClient'
|
36
36
|
|
37
|
-
instance = PulpAnsibleClient::AnsibleCollectionVersionResponse.new(
|
37
|
+
instance = PulpAnsibleClient::AnsibleCollectionVersionResponse.new(pulp_created: null,
|
38
|
+
pulp_href: null,
|
38
39
|
artifact: null,
|
39
|
-
pulp_created: null,
|
40
40
|
md5: null,
|
41
41
|
sha1: null,
|
42
42
|
sha224: null,
|
data/docs/AnsibleRoleResponse.md
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
7
8
|
**pulp_href** | **String** | | [optional] [readonly]
|
8
9
|
**artifact** | **String** | Artifact file representing the physical content |
|
9
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
10
10
|
**version** | **String** | |
|
11
11
|
**name** | **String** | |
|
12
12
|
**namespace** | **String** | |
|
@@ -16,9 +16,9 @@ Name | Type | Description | Notes
|
|
16
16
|
```ruby
|
17
17
|
require 'PulpAnsibleClient'
|
18
18
|
|
19
|
-
instance = PulpAnsibleClient::AnsibleRoleResponse.new(
|
19
|
+
instance = PulpAnsibleClient::AnsibleRoleResponse.new(pulp_created: null,
|
20
|
+
pulp_href: null,
|
20
21
|
artifact: null,
|
21
|
-
pulp_created: null,
|
22
22
|
version: null,
|
23
23
|
name: null,
|
24
24
|
namespace: null)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# PulpAnsibleClient::ArtifactRefResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**filename** | **String** | |
|
8
|
+
**sha256** | **String** | |
|
9
|
+
**size** | **Integer** | |
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'PulpAnsibleClient'
|
15
|
+
|
16
|
+
instance = PulpAnsibleClient::ArtifactRefResponse.new(filename: null,
|
17
|
+
sha256: null,
|
18
|
+
size: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/CollectionResponse.md
CHANGED
@@ -10,8 +10,8 @@ Name | Type | Description | Notes
|
|
10
10
|
**deprecated** | **Boolean** | |
|
11
11
|
**versions_url** | **String** | | [optional] [readonly]
|
12
12
|
**highest_version** | [**Object**](.md) | | [optional] [readonly]
|
13
|
-
**created_at** | **
|
14
|
-
**updated_at** | **
|
13
|
+
**created_at** | **DateTime** | | [optional] [readonly]
|
14
|
+
**updated_at** | **DateTime** | | [optional] [readonly]
|
15
15
|
|
16
16
|
## Code Sample
|
17
17
|
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**href** | **String** | | [optional] [readonly]
|
9
9
|
**created_at** | **DateTime** | |
|
10
10
|
**updated_at** | **DateTime** | |
|
11
|
-
**artifact** | **
|
11
|
+
**artifact** | [**ArtifactRefResponse**](ArtifactRefResponse.md) | | [optional] [readonly]
|
12
12
|
**collection** | [**CollectionRefResponse**](CollectionRefResponse.md) | | [optional] [readonly]
|
13
13
|
**download_url** | **String** | | [optional] [readonly]
|
14
14
|
**name** | **String** | | [optional] [readonly]
|
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**meta** | **
|
8
|
-
**links** | **
|
7
|
+
**meta** | [**PaginatedCollectionResponseListMeta**](PaginatedCollectionResponseListMeta.md) | | [optional]
|
8
|
+
**links** | [**PaginatedCollectionResponseListLinks**](PaginatedCollectionResponseListLinks.md) | | [optional]
|
9
9
|
**data** | [**Array<CollectionResponse>**](CollectionResponse.md) | | [optional]
|
10
10
|
|
11
11
|
## Code Sample
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpAnsibleClient::PaginatedCollectionResponseListLinks
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**first** | **String** | | [optional]
|
8
|
+
**previous** | **String** | | [optional]
|
9
|
+
**_next** | **String** | | [optional]
|
10
|
+
**last** | **String** | | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpAnsibleClient'
|
16
|
+
|
17
|
+
instance = PulpAnsibleClient::PaginatedCollectionResponseListLinks.new(first: null,
|
18
|
+
previous: null,
|
19
|
+
_next: null,
|
20
|
+
last: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# PulpAnsibleClient::PaginatedCollectionResponseListMeta
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'PulpAnsibleClient'
|
13
|
+
|
14
|
+
instance = PulpAnsibleClient::PaginatedCollectionResponseListMeta.new(count: 123)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**meta** | **
|
8
|
-
**links** | **
|
7
|
+
**meta** | [**PaginatedCollectionResponseListMeta**](PaginatedCollectionResponseListMeta.md) | | [optional]
|
8
|
+
**links** | [**PaginatedCollectionResponseListLinks**](PaginatedCollectionResponseListLinks.md) | | [optional]
|
9
9
|
**data** | [**Array<CollectionVersionResponse>**](CollectionVersionResponse.md) | | [optional]
|
10
10
|
|
11
11
|
## Code Sample
|
data/lib/pulp_ansible_client.rb
CHANGED
@@ -31,6 +31,7 @@ require 'pulp_ansible_client/models/ansible_role_remote'
|
|
31
31
|
require 'pulp_ansible_client/models/ansible_role_remote_response'
|
32
32
|
require 'pulp_ansible_client/models/ansible_role_response'
|
33
33
|
require 'pulp_ansible_client/models/ansible_tag_response'
|
34
|
+
require 'pulp_ansible_client/models/artifact_ref_response'
|
34
35
|
require 'pulp_ansible_client/models/async_operation_response'
|
35
36
|
require 'pulp_ansible_client/models/collection_import_detail_response'
|
36
37
|
require 'pulp_ansible_client/models/collection_metadata_response'
|
@@ -49,6 +50,8 @@ require 'pulp_ansible_client/models/galaxy_collection_version_response'
|
|
49
50
|
require 'pulp_ansible_client/models/galaxy_role_response'
|
50
51
|
require 'pulp_ansible_client/models/galaxy_role_version_response'
|
51
52
|
require 'pulp_ansible_client/models/paginated_collection_response_list'
|
53
|
+
require 'pulp_ansible_client/models/paginated_collection_response_list_links'
|
54
|
+
require 'pulp_ansible_client/models/paginated_collection_response_list_meta'
|
52
55
|
require 'pulp_ansible_client/models/paginated_collection_version_response_list'
|
53
56
|
require 'pulp_ansible_client/models/paginated_galaxy_collection_response_list'
|
54
57
|
require 'pulp_ansible_client/models/paginated_galaxy_collection_version_response_list'
|
@@ -15,14 +15,14 @@ require 'date'
|
|
15
15
|
module PulpAnsibleClient
|
16
16
|
# A serializer for CollectionVersion Content.
|
17
17
|
class AnsibleCollectionVersionResponse
|
18
|
+
# Timestamp of creation.
|
19
|
+
attr_accessor :pulp_created
|
20
|
+
|
18
21
|
attr_accessor :pulp_href
|
19
22
|
|
20
23
|
# Artifact file representing the physical content
|
21
24
|
attr_accessor :artifact
|
22
25
|
|
23
|
-
# Timestamp of creation.
|
24
|
-
attr_accessor :pulp_created
|
25
|
-
|
26
26
|
# The MD5 checksum if available.
|
27
27
|
attr_accessor :md5
|
28
28
|
|
@@ -88,9 +88,9 @@ module PulpAnsibleClient
|
|
88
88
|
# Attribute mapping from ruby-style variable name to JSON key.
|
89
89
|
def self.attribute_map
|
90
90
|
{
|
91
|
+
:'pulp_created' => :'pulp_created',
|
91
92
|
:'pulp_href' => :'pulp_href',
|
92
93
|
:'artifact' => :'artifact',
|
93
|
-
:'pulp_created' => :'pulp_created',
|
94
94
|
:'md5' => :'md5',
|
95
95
|
:'sha1' => :'sha1',
|
96
96
|
:'sha224' => :'sha224',
|
@@ -118,9 +118,9 @@ module PulpAnsibleClient
|
|
118
118
|
# Attribute type mapping.
|
119
119
|
def self.openapi_types
|
120
120
|
{
|
121
|
+
:'pulp_created' => :'DateTime',
|
121
122
|
:'pulp_href' => :'String',
|
122
123
|
:'artifact' => :'String',
|
123
|
-
:'pulp_created' => :'DateTime',
|
124
124
|
:'md5' => :'String',
|
125
125
|
:'sha1' => :'String',
|
126
126
|
:'sha224' => :'String',
|
@@ -166,6 +166,10 @@ module PulpAnsibleClient
|
|
166
166
|
h[k.to_sym] = v
|
167
167
|
}
|
168
168
|
|
169
|
+
if attributes.key?(:'pulp_created')
|
170
|
+
self.pulp_created = attributes[:'pulp_created']
|
171
|
+
end
|
172
|
+
|
169
173
|
if attributes.key?(:'pulp_href')
|
170
174
|
self.pulp_href = attributes[:'pulp_href']
|
171
175
|
end
|
@@ -174,10 +178,6 @@ module PulpAnsibleClient
|
|
174
178
|
self.artifact = attributes[:'artifact']
|
175
179
|
end
|
176
180
|
|
177
|
-
if attributes.key?(:'pulp_created')
|
178
|
-
self.pulp_created = attributes[:'pulp_created']
|
179
|
-
end
|
180
|
-
|
181
181
|
if attributes.key?(:'md5')
|
182
182
|
self.md5 = attributes[:'md5']
|
183
183
|
end
|
@@ -497,9 +497,9 @@ module PulpAnsibleClient
|
|
497
497
|
def ==(o)
|
498
498
|
return true if self.equal?(o)
|
499
499
|
self.class == o.class &&
|
500
|
+
pulp_created == o.pulp_created &&
|
500
501
|
pulp_href == o.pulp_href &&
|
501
502
|
artifact == o.artifact &&
|
502
|
-
pulp_created == o.pulp_created &&
|
503
503
|
md5 == o.md5 &&
|
504
504
|
sha1 == o.sha1 &&
|
505
505
|
sha224 == o.sha224 &&
|
@@ -532,7 +532,7 @@ module PulpAnsibleClient
|
|
532
532
|
# Calculates hash code according to all attributes.
|
533
533
|
# @return [Integer] Hash code
|
534
534
|
def hash
|
535
|
-
[pulp_href, artifact,
|
535
|
+
[pulp_created, pulp_href, artifact, md5, sha1, sha224, sha256, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, documentation, homepage, issues, license, name, namespace, repository, tags, version].hash
|
536
536
|
end
|
537
537
|
|
538
538
|
# Builds the object from hash
|
@@ -15,14 +15,14 @@ require 'date'
|
|
15
15
|
module PulpAnsibleClient
|
16
16
|
# A serializer for Role versions.
|
17
17
|
class AnsibleRoleResponse
|
18
|
+
# Timestamp of creation.
|
19
|
+
attr_accessor :pulp_created
|
20
|
+
|
18
21
|
attr_accessor :pulp_href
|
19
22
|
|
20
23
|
# Artifact file representing the physical content
|
21
24
|
attr_accessor :artifact
|
22
25
|
|
23
|
-
# Timestamp of creation.
|
24
|
-
attr_accessor :pulp_created
|
25
|
-
|
26
26
|
attr_accessor :version
|
27
27
|
|
28
28
|
attr_accessor :name
|
@@ -32,9 +32,9 @@ module PulpAnsibleClient
|
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
33
|
def self.attribute_map
|
34
34
|
{
|
35
|
+
:'pulp_created' => :'pulp_created',
|
35
36
|
:'pulp_href' => :'pulp_href',
|
36
37
|
:'artifact' => :'artifact',
|
37
|
-
:'pulp_created' => :'pulp_created',
|
38
38
|
:'version' => :'version',
|
39
39
|
:'name' => :'name',
|
40
40
|
:'namespace' => :'namespace'
|
@@ -44,9 +44,9 @@ module PulpAnsibleClient
|
|
44
44
|
# Attribute type mapping.
|
45
45
|
def self.openapi_types
|
46
46
|
{
|
47
|
+
:'pulp_created' => :'DateTime',
|
47
48
|
:'pulp_href' => :'String',
|
48
49
|
:'artifact' => :'String',
|
49
|
-
:'pulp_created' => :'DateTime',
|
50
50
|
:'version' => :'String',
|
51
51
|
:'name' => :'String',
|
52
52
|
:'namespace' => :'String'
|
@@ -74,6 +74,10 @@ module PulpAnsibleClient
|
|
74
74
|
h[k.to_sym] = v
|
75
75
|
}
|
76
76
|
|
77
|
+
if attributes.key?(:'pulp_created')
|
78
|
+
self.pulp_created = attributes[:'pulp_created']
|
79
|
+
end
|
80
|
+
|
77
81
|
if attributes.key?(:'pulp_href')
|
78
82
|
self.pulp_href = attributes[:'pulp_href']
|
79
83
|
end
|
@@ -82,10 +86,6 @@ module PulpAnsibleClient
|
|
82
86
|
self.artifact = attributes[:'artifact']
|
83
87
|
end
|
84
88
|
|
85
|
-
if attributes.key?(:'pulp_created')
|
86
|
-
self.pulp_created = attributes[:'pulp_created']
|
87
|
-
end
|
88
|
-
|
89
89
|
if attributes.key?(:'version')
|
90
90
|
self.version = attributes[:'version']
|
91
91
|
end
|
@@ -137,9 +137,9 @@ module PulpAnsibleClient
|
|
137
137
|
def ==(o)
|
138
138
|
return true if self.equal?(o)
|
139
139
|
self.class == o.class &&
|
140
|
+
pulp_created == o.pulp_created &&
|
140
141
|
pulp_href == o.pulp_href &&
|
141
142
|
artifact == o.artifact &&
|
142
|
-
pulp_created == o.pulp_created &&
|
143
143
|
version == o.version &&
|
144
144
|
name == o.name &&
|
145
145
|
namespace == o.namespace
|
@@ -154,7 +154,7 @@ module PulpAnsibleClient
|
|
154
154
|
# Calculates hash code according to all attributes.
|
155
155
|
# @return [Integer] Hash code
|
156
156
|
def hash
|
157
|
-
[pulp_href, artifact,
|
157
|
+
[pulp_created, pulp_href, artifact, version, name, namespace].hash
|
158
158
|
end
|
159
159
|
|
160
160
|
# Builds the object from hash
|
@@ -0,0 +1,240 @@
|
|
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.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpAnsibleClient
|
16
|
+
# A serializer for an Artifact reference.
|
17
|
+
class ArtifactRefResponse
|
18
|
+
attr_accessor :filename
|
19
|
+
|
20
|
+
attr_accessor :sha256
|
21
|
+
|
22
|
+
attr_accessor :size
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'filename' => :'filename',
|
28
|
+
:'sha256' => :'sha256',
|
29
|
+
:'size' => :'size'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'filename' => :'String',
|
37
|
+
:'sha256' => :'String',
|
38
|
+
:'size' => :'Integer'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# List of attributes with nullable: true
|
43
|
+
def self.openapi_nullable
|
44
|
+
Set.new([
|
45
|
+
])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::ArtifactRefResponse` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::ArtifactRefResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'filename')
|
64
|
+
self.filename = attributes[:'filename']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.key?(:'sha256')
|
68
|
+
self.sha256 = attributes[:'sha256']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'size')
|
72
|
+
self.size = attributes[:'size']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = Array.new
|
80
|
+
if @filename.nil?
|
81
|
+
invalid_properties.push('invalid value for "filename", filename cannot be nil.')
|
82
|
+
end
|
83
|
+
|
84
|
+
if @sha256.nil?
|
85
|
+
invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.')
|
86
|
+
end
|
87
|
+
|
88
|
+
if @size.nil?
|
89
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
90
|
+
end
|
91
|
+
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
return false if @filename.nil?
|
99
|
+
return false if @sha256.nil?
|
100
|
+
return false if @size.nil?
|
101
|
+
true
|
102
|
+
end
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
filename == o.filename &&
|
110
|
+
sha256 == o.sha256 &&
|
111
|
+
size == o.size
|
112
|
+
end
|
113
|
+
|
114
|
+
# @see the `==` method
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def eql?(o)
|
117
|
+
self == o
|
118
|
+
end
|
119
|
+
|
120
|
+
# Calculates hash code according to all attributes.
|
121
|
+
# @return [Integer] Hash code
|
122
|
+
def hash
|
123
|
+
[filename, sha256, size].hash
|
124
|
+
end
|
125
|
+
|
126
|
+
# Builds the object from hash
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
+
# @return [Object] Returns the model itself
|
129
|
+
def self.build_from_hash(attributes)
|
130
|
+
new.build_from_hash(attributes)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def build_from_hash(attributes)
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
138
|
+
self.class.openapi_types.each_pair do |key, type|
|
139
|
+
if type =~ /\AArray<(.*)>/i
|
140
|
+
# check to ensure the input is an array given that the attribute
|
141
|
+
# is documented as an array but the input is not
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :DateTime
|
160
|
+
DateTime.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :Boolean
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the string representation of the object
|
195
|
+
# @return [String] String presentation of the object
|
196
|
+
def to_s
|
197
|
+
to_hash.to_s
|
198
|
+
end
|
199
|
+
|
200
|
+
# to_body is an alias to to_hash (backward compatibility)
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
202
|
+
def to_body
|
203
|
+
to_hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the object in the form of hash
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_hash
|
209
|
+
hash = {}
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
211
|
+
value = self.send(attr)
|
212
|
+
if value.nil?
|
213
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
214
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
215
|
+
end
|
216
|
+
|
217
|
+
hash[param] = _to_hash(value)
|
218
|
+
end
|
219
|
+
hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Outputs non-array value in the form of hash
|
223
|
+
# For object, use to_hash. Otherwise, just return the value
|
224
|
+
# @param [Object] value Any valid value
|
225
|
+
# @return [Hash] Returns the value in the form of hash
|
226
|
+
def _to_hash(value)
|
227
|
+
if value.is_a?(Array)
|
228
|
+
value.compact.map { |v| _to_hash(v) }
|
229
|
+
elsif value.is_a?(Hash)
|
230
|
+
{}.tap do |hash|
|
231
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
232
|
+
end
|
233
|
+
elsif value.respond_to? :to_hash
|
234
|
+
value.to_hash
|
235
|
+
else
|
236
|
+
value
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|