pulp_rpm_client 3.4.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -19
- data/docs/ContentAdvisoriesApi.md +2 -2
- data/docs/ContentDistributionTreesApi.md +2 -2
- data/docs/ContentModulemdDefaultsApi.md +2 -2
- data/docs/ContentModulemdsApi.md +2 -2
- data/docs/ContentPackagecategoriesApi.md +2 -2
- data/docs/ContentPackageenvironmentsApi.md +2 -2
- data/docs/ContentPackagegroupsApi.md +2 -2
- data/docs/ContentPackagelangpacksApi.md +2 -2
- data/docs/ContentPackagesApi.md +2 -2
- data/docs/ContentRepoMetadataFilesApi.md +2 -2
- data/docs/DistributionsRpmApi.md +2 -2
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse20010.md +1 -1
- data/docs/InlineResponse20011.md +1 -1
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +1 -1
- data/docs/InlineResponse20014.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/PublicationsRpmApi.md +2 -2
- data/docs/RemotesRpmApi.md +4 -4
- data/docs/RepositoriesRpmApi.md +4 -4
- data/docs/RepositoriesRpmVersionsApi.md +6 -4
- data/docs/{RpmDistributionTreeRead.md → RpmDistributionTree.md} +2 -2
- data/docs/{RpmModulemdRead.md → RpmModulemd.md} +2 -2
- data/docs/{RpmModulemdDefaultsRead.md → RpmModulemdDefaults.md} +2 -2
- data/docs/{RpmPackageRead.md → RpmPackage.md} +2 -2
- data/docs/{RpmPackageCategoryRead.md → RpmPackageCategory.md} +2 -2
- data/docs/{RpmPackageEnvironmentRead.md → RpmPackageEnvironment.md} +2 -2
- data/docs/{RpmPackageGroupRead.md → RpmPackageGroup.md} +2 -2
- data/docs/{RpmPackageLangpacksRead.md → RpmPackageLangpacks.md} +2 -2
- data/docs/{RpmRepoMetadataFileRead.md → RpmRepoMetadataFile.md} +2 -2
- data/docs/{RpmUpdateRecordRead.md → RpmUpdateRecord.md} +2 -2
- data/lib/pulp_rpm_client.rb +10 -15
- data/lib/pulp_rpm_client/api/content_advisories_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_modulemds_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_packages_api.rb +3 -3
- data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +3 -3
- data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +3 -3
- data/lib/pulp_rpm_client/api/publications_rpm_api.rb +3 -3
- data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +6 -6
- data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +6 -6
- data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +9 -6
- data/lib/pulp_rpm_client/models/inline_response200.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2001.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response20010.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response20011.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response20012.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response20013.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response20014.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2002.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2003.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2004.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2005.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2006.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2007.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2008.rb +1 -1
- data/lib/pulp_rpm_client/models/inline_response2009.rb +1 -1
- data/lib/pulp_rpm_client/models/{rpm_distribution_tree_read.rb → rpm_distribution_tree.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_modulemd_read.rb → rpm_modulemd.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_modulemd_defaults_read.rb → rpm_modulemd_defaults.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_package_read.rb → rpm_package.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_package_category_read.rb → rpm_package_category.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_package_environment_read.rb → rpm_package_environment.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_package_group_read.rb → rpm_package_group.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_package_langpacks_read.rb → rpm_package_langpacks.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_repo_metadata_file_read.rb → rpm_repo_metadata_file.rb} +3 -3
- data/lib/pulp_rpm_client/models/{rpm_update_record_read.rb → rpm_update_record.rb} +3 -3
- data/lib/pulp_rpm_client/version.rb +1 -1
- data/spec/api/content_advisories_api_spec.rb +1 -1
- data/spec/api/content_distribution_trees_api_spec.rb +1 -1
- data/spec/api/content_modulemd_defaults_api_spec.rb +1 -1
- data/spec/api/content_modulemds_api_spec.rb +1 -1
- data/spec/api/content_packagecategories_api_spec.rb +1 -1
- data/spec/api/content_packageenvironments_api_spec.rb +1 -1
- data/spec/api/content_packagegroups_api_spec.rb +1 -1
- data/spec/api/content_packagelangpacks_api_spec.rb +1 -1
- data/spec/api/content_packages_api_spec.rb +1 -1
- data/spec/api/content_repo_metadata_files_api_spec.rb +1 -1
- data/spec/api/distributions_rpm_api_spec.rb +1 -1
- data/spec/api/publications_rpm_api_spec.rb +1 -1
- data/spec/api/remotes_rpm_api_spec.rb +2 -2
- data/spec/api/repositories_rpm_api_spec.rb +2 -2
- data/spec/api/repositories_rpm_versions_api_spec.rb +3 -2
- data/spec/models/{rpm_distribution_tree_read_spec.rb → rpm_distribution_tree_spec.rb} +6 -6
- data/spec/models/{rpm_modulemd_defaults_read_spec.rb → rpm_modulemd_defaults_spec.rb} +6 -6
- data/spec/models/{rpm_modulemd_read_spec.rb → rpm_modulemd_spec.rb} +6 -6
- data/spec/models/{rpm_package_category_read_spec.rb → rpm_package_category_spec.rb} +6 -6
- data/spec/models/{rpm_package_environment_read_spec.rb → rpm_package_environment_spec.rb} +6 -6
- data/spec/models/{rpm_package_group_read_spec.rb → rpm_package_group_spec.rb} +6 -6
- data/spec/models/{rpm_package_langpacks_read_spec.rb → rpm_package_langpacks_spec.rb} +6 -6
- data/spec/models/{rpm_package_read_spec.rb → rpm_package_spec.rb} +6 -6
- data/spec/models/{rpm_repo_metadata_file_read_spec.rb → rpm_repo_metadata_file_spec.rb} +6 -6
- data/spec/models/{rpm_update_record_read_spec.rb → rpm_update_record_spec.rb} +6 -6
- metadata +42 -62
- data/docs/RepositoryVersionRead.md +0 -25
- data/docs/RpmRpmDistributionRead.md +0 -29
- data/docs/RpmRpmPublicationRead.md +0 -27
- data/docs/RpmRpmRemoteRead.md +0 -43
- data/docs/RpmRpmRepositoryRead.md +0 -29
- data/lib/pulp_rpm_client/models/repository_version_read.rb +0 -244
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution_read.rb +0 -331
- data/lib/pulp_rpm_client/models/rpm_rpm_publication_read.rb +0 -305
- data/lib/pulp_rpm_client/models/rpm_rpm_remote_read.rb +0 -531
- data/lib/pulp_rpm_client/models/rpm_rpm_repository_read.rb +0 -305
- data/spec/models/repository_version_read_spec.rb +0 -65
- data/spec/models/rpm_rpm_distribution_read_spec.rb +0 -77
- data/spec/models/rpm_rpm_publication_read_spec.rb +0 -79
- data/spec/models/rpm_rpm_remote_read_spec.rb +0 -123
- data/spec/models/rpm_rpm_repository_read_spec.rb +0 -77
@@ -1,25 +0,0 @@
|
|
1
|
-
# PulpRpmClient::RepositoryVersionRead
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
-
**number** | **Integer** | | [optional] [readonly]
|
10
|
-
**base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional]
|
11
|
-
**content_summary** | [**ContentSummary**](ContentSummary.md) | | [optional]
|
12
|
-
|
13
|
-
## Code Sample
|
14
|
-
|
15
|
-
```ruby
|
16
|
-
require 'PulpRpmClient'
|
17
|
-
|
18
|
-
instance = PulpRpmClient::RepositoryVersionRead.new(pulp_href: null,
|
19
|
-
pulp_created: null,
|
20
|
-
number: null,
|
21
|
-
base_version: null,
|
22
|
-
content_summary: null)
|
23
|
-
```
|
24
|
-
|
25
|
-
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# PulpRpmClient::RpmRpmDistributionRead
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
-
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") |
|
10
|
-
**base_url** | **String** | The URL for accessing the publication as defined by this distribution. | [optional] [readonly]
|
11
|
-
**content_guard** | **String** | An optional content-guard. | [optional]
|
12
|
-
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
13
|
-
**publication** | **String** | Publication to be served | [optional]
|
14
|
-
|
15
|
-
## Code Sample
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
require 'PulpRpmClient'
|
19
|
-
|
20
|
-
instance = PulpRpmClient::RpmRpmDistributionRead.new(pulp_href: null,
|
21
|
-
pulp_created: null,
|
22
|
-
base_path: null,
|
23
|
-
base_url: null,
|
24
|
-
content_guard: null,
|
25
|
-
name: null,
|
26
|
-
publication: null)
|
27
|
-
```
|
28
|
-
|
29
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# PulpRpmClient::RpmRpmPublicationRead
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
-
**repository_version** | **String** | | [optional]
|
10
|
-
**repository** | **String** | A URI of the repository to be published. | [optional]
|
11
|
-
**metadata_checksum_type** | **String** | The checksum type for metadata. | [optional] [default to 'sha256']
|
12
|
-
**package_checksum_type** | **String** | The checksum type for packages. | [optional] [default to 'sha256']
|
13
|
-
|
14
|
-
## Code Sample
|
15
|
-
|
16
|
-
```ruby
|
17
|
-
require 'PulpRpmClient'
|
18
|
-
|
19
|
-
instance = PulpRpmClient::RpmRpmPublicationRead.new(pulp_href: null,
|
20
|
-
pulp_created: null,
|
21
|
-
repository_version: null,
|
22
|
-
repository: null,
|
23
|
-
metadata_checksum_type: null,
|
24
|
-
package_checksum_type: null)
|
25
|
-
```
|
26
|
-
|
27
|
-
|
data/docs/RpmRpmRemoteRead.md
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# PulpRpmClient::RpmRpmRemoteRead
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
-
**name** | **String** | A unique name for this remote. |
|
10
|
-
**url** | **String** | The URL of an external content source. |
|
11
|
-
**ca_cert** | **String** | A string containing the PEM encoded CA certificate used to validate the server certificate presented by the remote server. All new line characters must be escaped. | [optional]
|
12
|
-
**client_cert** | **String** | A string containing the PEM encoded client certificate used for authentication. All new line characters must be escaped. | [optional]
|
13
|
-
**client_key** | **String** | A PEM encoded private key used for authentication. | [optional]
|
14
|
-
**tls_validation** | **Boolean** | If True, TLS peer validation must be performed. | [optional]
|
15
|
-
**proxy_url** | **String** | The proxy URL. Format: scheme://user:password@host:port | [optional]
|
16
|
-
**username** | **String** | The username to be used for authentication when syncing. | [optional]
|
17
|
-
**password** | **String** | The password to be used for authentication when syncing. | [optional]
|
18
|
-
**pulp_last_updated** | **DateTime** | Timestamp of the most recent update of the remote. | [optional] [readonly]
|
19
|
-
**download_concurrency** | **Integer** | Total number of simultaneous connections. | [optional]
|
20
|
-
**policy** | **String** | The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default. | [optional] [default to 'immediate']
|
21
|
-
|
22
|
-
## Code Sample
|
23
|
-
|
24
|
-
```ruby
|
25
|
-
require 'PulpRpmClient'
|
26
|
-
|
27
|
-
instance = PulpRpmClient::RpmRpmRemoteRead.new(pulp_href: null,
|
28
|
-
pulp_created: null,
|
29
|
-
name: null,
|
30
|
-
url: null,
|
31
|
-
ca_cert: null,
|
32
|
-
client_cert: null,
|
33
|
-
client_key: null,
|
34
|
-
tls_validation: null,
|
35
|
-
proxy_url: null,
|
36
|
-
username: null,
|
37
|
-
password: null,
|
38
|
-
pulp_last_updated: null,
|
39
|
-
download_concurrency: null,
|
40
|
-
policy: null)
|
41
|
-
```
|
42
|
-
|
43
|
-
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# PulpRpmClient::RpmRpmRepositoryRead
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
-
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
-
**versions_href** | **String** | | [optional] [readonly]
|
10
|
-
**latest_version_href** | **String** | | [optional] [readonly]
|
11
|
-
**name** | **String** | A unique name for this repository. |
|
12
|
-
**description** | **String** | An optional description. | [optional]
|
13
|
-
**metadata_signing_service** | **String** | A reference to an associated signing service. | [optional]
|
14
|
-
|
15
|
-
## Code Sample
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
require 'PulpRpmClient'
|
19
|
-
|
20
|
-
instance = PulpRpmClient::RpmRpmRepositoryRead.new(pulp_href: null,
|
21
|
-
pulp_created: null,
|
22
|
-
versions_href: null,
|
23
|
-
latest_version_href: null,
|
24
|
-
name: null,
|
25
|
-
description: null,
|
26
|
-
metadata_signing_service: null)
|
27
|
-
```
|
28
|
-
|
29
|
-
|
@@ -1,244 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpRpmClient
|
16
|
-
class RepositoryVersionRead
|
17
|
-
attr_accessor :pulp_href
|
18
|
-
|
19
|
-
# Timestamp of creation.
|
20
|
-
attr_accessor :pulp_created
|
21
|
-
|
22
|
-
attr_accessor :number
|
23
|
-
|
24
|
-
# A repository version whose content was used as the initial set of content for this repository version
|
25
|
-
attr_accessor :base_version
|
26
|
-
|
27
|
-
attr_accessor :content_summary
|
28
|
-
|
29
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
-
def self.attribute_map
|
31
|
-
{
|
32
|
-
:'pulp_href' => :'pulp_href',
|
33
|
-
:'pulp_created' => :'pulp_created',
|
34
|
-
:'number' => :'number',
|
35
|
-
:'base_version' => :'base_version',
|
36
|
-
:'content_summary' => :'content_summary'
|
37
|
-
}
|
38
|
-
end
|
39
|
-
|
40
|
-
# Attribute type mapping.
|
41
|
-
def self.openapi_types
|
42
|
-
{
|
43
|
-
:'pulp_href' => :'String',
|
44
|
-
:'pulp_created' => :'DateTime',
|
45
|
-
:'number' => :'Integer',
|
46
|
-
:'base_version' => :'String',
|
47
|
-
:'content_summary' => :'ContentSummary'
|
48
|
-
}
|
49
|
-
end
|
50
|
-
|
51
|
-
# List of attributes with nullable: true
|
52
|
-
def self.openapi_nullable
|
53
|
-
Set.new([
|
54
|
-
])
|
55
|
-
end
|
56
|
-
|
57
|
-
# Initializes the object
|
58
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
-
def initialize(attributes = {})
|
60
|
-
if (!attributes.is_a?(Hash))
|
61
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RepositoryVersionRead` initialize method"
|
62
|
-
end
|
63
|
-
|
64
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RepositoryVersionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
-
end
|
69
|
-
h[k.to_sym] = v
|
70
|
-
}
|
71
|
-
|
72
|
-
if attributes.key?(:'pulp_href')
|
73
|
-
self.pulp_href = attributes[:'pulp_href']
|
74
|
-
end
|
75
|
-
|
76
|
-
if attributes.key?(:'pulp_created')
|
77
|
-
self.pulp_created = attributes[:'pulp_created']
|
78
|
-
end
|
79
|
-
|
80
|
-
if attributes.key?(:'number')
|
81
|
-
self.number = attributes[:'number']
|
82
|
-
end
|
83
|
-
|
84
|
-
if attributes.key?(:'base_version')
|
85
|
-
self.base_version = attributes[:'base_version']
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes.key?(:'content_summary')
|
89
|
-
self.content_summary = attributes[:'content_summary']
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
-
# @return Array for valid properties with the reasons
|
95
|
-
def list_invalid_properties
|
96
|
-
invalid_properties = Array.new
|
97
|
-
invalid_properties
|
98
|
-
end
|
99
|
-
|
100
|
-
# Check to see if the all the properties in the model are valid
|
101
|
-
# @return true if the model is valid
|
102
|
-
def valid?
|
103
|
-
true
|
104
|
-
end
|
105
|
-
|
106
|
-
# Checks equality by comparing each attribute.
|
107
|
-
# @param [Object] Object to be compared
|
108
|
-
def ==(o)
|
109
|
-
return true if self.equal?(o)
|
110
|
-
self.class == o.class &&
|
111
|
-
pulp_href == o.pulp_href &&
|
112
|
-
pulp_created == o.pulp_created &&
|
113
|
-
number == o.number &&
|
114
|
-
base_version == o.base_version &&
|
115
|
-
content_summary == o.content_summary
|
116
|
-
end
|
117
|
-
|
118
|
-
# @see the `==` method
|
119
|
-
# @param [Object] Object to be compared
|
120
|
-
def eql?(o)
|
121
|
-
self == o
|
122
|
-
end
|
123
|
-
|
124
|
-
# Calculates hash code according to all attributes.
|
125
|
-
# @return [Integer] Hash code
|
126
|
-
def hash
|
127
|
-
[pulp_href, pulp_created, number, base_version, content_summary].hash
|
128
|
-
end
|
129
|
-
|
130
|
-
# Builds the object from hash
|
131
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
-
# @return [Object] Returns the model itself
|
133
|
-
def self.build_from_hash(attributes)
|
134
|
-
new.build_from_hash(attributes)
|
135
|
-
end
|
136
|
-
|
137
|
-
# Builds the object from hash
|
138
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
-
# @return [Object] Returns the model itself
|
140
|
-
def build_from_hash(attributes)
|
141
|
-
return nil unless attributes.is_a?(Hash)
|
142
|
-
self.class.openapi_types.each_pair do |key, type|
|
143
|
-
if type =~ /\AArray<(.*)>/i
|
144
|
-
# check to ensure the input is an array given that the attribute
|
145
|
-
# is documented as an array but the input is not
|
146
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
-
end
|
149
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
152
|
-
end
|
153
|
-
|
154
|
-
self
|
155
|
-
end
|
156
|
-
|
157
|
-
# Deserializes the data based on type
|
158
|
-
# @param string type Data type
|
159
|
-
# @param string value Value to be deserialized
|
160
|
-
# @return [Object] Deserialized data
|
161
|
-
def _deserialize(type, value)
|
162
|
-
case type.to_sym
|
163
|
-
when :DateTime
|
164
|
-
DateTime.parse(value)
|
165
|
-
when :Date
|
166
|
-
Date.parse(value)
|
167
|
-
when :String
|
168
|
-
value.to_s
|
169
|
-
when :Integer
|
170
|
-
value.to_i
|
171
|
-
when :Float
|
172
|
-
value.to_f
|
173
|
-
when :Boolean
|
174
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
175
|
-
true
|
176
|
-
else
|
177
|
-
false
|
178
|
-
end
|
179
|
-
when :Object
|
180
|
-
# generic object (usually a Hash), return directly
|
181
|
-
value
|
182
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
183
|
-
inner_type = Regexp.last_match[:inner_type]
|
184
|
-
value.map { |v| _deserialize(inner_type, v) }
|
185
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
186
|
-
k_type = Regexp.last_match[:k_type]
|
187
|
-
v_type = Regexp.last_match[:v_type]
|
188
|
-
{}.tap do |hash|
|
189
|
-
value.each do |k, v|
|
190
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
191
|
-
end
|
192
|
-
end
|
193
|
-
else # model
|
194
|
-
PulpRpmClient.const_get(type).build_from_hash(value)
|
195
|
-
end
|
196
|
-
end
|
197
|
-
|
198
|
-
# Returns the string representation of the object
|
199
|
-
# @return [String] String presentation of the object
|
200
|
-
def to_s
|
201
|
-
to_hash.to_s
|
202
|
-
end
|
203
|
-
|
204
|
-
# to_body is an alias to to_hash (backward compatibility)
|
205
|
-
# @return [Hash] Returns the object in the form of hash
|
206
|
-
def to_body
|
207
|
-
to_hash
|
208
|
-
end
|
209
|
-
|
210
|
-
# Returns the object in the form of hash
|
211
|
-
# @return [Hash] Returns the object in the form of hash
|
212
|
-
def to_hash
|
213
|
-
hash = {}
|
214
|
-
self.class.attribute_map.each_pair do |attr, param|
|
215
|
-
value = self.send(attr)
|
216
|
-
if value.nil?
|
217
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
218
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
219
|
-
end
|
220
|
-
|
221
|
-
hash[param] = _to_hash(value)
|
222
|
-
end
|
223
|
-
hash
|
224
|
-
end
|
225
|
-
|
226
|
-
# Outputs non-array value in the form of hash
|
227
|
-
# For object, use to_hash. Otherwise, just return the value
|
228
|
-
# @param [Object] value Any valid value
|
229
|
-
# @return [Hash] Returns the value in the form of hash
|
230
|
-
def _to_hash(value)
|
231
|
-
if value.is_a?(Array)
|
232
|
-
value.compact.map { |v| _to_hash(v) }
|
233
|
-
elsif value.is_a?(Hash)
|
234
|
-
{}.tap do |hash|
|
235
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
-
end
|
237
|
-
elsif value.respond_to? :to_hash
|
238
|
-
value.to_hash
|
239
|
-
else
|
240
|
-
value
|
241
|
-
end
|
242
|
-
end
|
243
|
-
end
|
244
|
-
end
|
@@ -1,331 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpRpmClient
|
16
|
-
class RpmRpmDistributionRead
|
17
|
-
attr_accessor :pulp_href
|
18
|
-
|
19
|
-
# Timestamp of creation.
|
20
|
-
attr_accessor :pulp_created
|
21
|
-
|
22
|
-
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
23
|
-
attr_accessor :base_path
|
24
|
-
|
25
|
-
# The URL for accessing the publication as defined by this distribution.
|
26
|
-
attr_accessor :base_url
|
27
|
-
|
28
|
-
# An optional content-guard.
|
29
|
-
attr_accessor :content_guard
|
30
|
-
|
31
|
-
# A unique name. Ex, `rawhide` and `stable`.
|
32
|
-
attr_accessor :name
|
33
|
-
|
34
|
-
# Publication to be served
|
35
|
-
attr_accessor :publication
|
36
|
-
|
37
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
-
def self.attribute_map
|
39
|
-
{
|
40
|
-
:'pulp_href' => :'pulp_href',
|
41
|
-
:'pulp_created' => :'pulp_created',
|
42
|
-
:'base_path' => :'base_path',
|
43
|
-
:'base_url' => :'base_url',
|
44
|
-
:'content_guard' => :'content_guard',
|
45
|
-
:'name' => :'name',
|
46
|
-
:'publication' => :'publication'
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
# Attribute type mapping.
|
51
|
-
def self.openapi_types
|
52
|
-
{
|
53
|
-
:'pulp_href' => :'String',
|
54
|
-
:'pulp_created' => :'DateTime',
|
55
|
-
:'base_path' => :'String',
|
56
|
-
:'base_url' => :'String',
|
57
|
-
:'content_guard' => :'String',
|
58
|
-
:'name' => :'String',
|
59
|
-
:'publication' => :'String'
|
60
|
-
}
|
61
|
-
end
|
62
|
-
|
63
|
-
# List of attributes with nullable: true
|
64
|
-
def self.openapi_nullable
|
65
|
-
Set.new([
|
66
|
-
:'content_guard',
|
67
|
-
:'publication'
|
68
|
-
])
|
69
|
-
end
|
70
|
-
|
71
|
-
# Initializes the object
|
72
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
-
def initialize(attributes = {})
|
74
|
-
if (!attributes.is_a?(Hash))
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmRpmDistributionRead` initialize method"
|
76
|
-
end
|
77
|
-
|
78
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RpmRpmDistributionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
-
end
|
83
|
-
h[k.to_sym] = v
|
84
|
-
}
|
85
|
-
|
86
|
-
if attributes.key?(:'pulp_href')
|
87
|
-
self.pulp_href = attributes[:'pulp_href']
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.key?(:'pulp_created')
|
91
|
-
self.pulp_created = attributes[:'pulp_created']
|
92
|
-
end
|
93
|
-
|
94
|
-
if attributes.key?(:'base_path')
|
95
|
-
self.base_path = attributes[:'base_path']
|
96
|
-
end
|
97
|
-
|
98
|
-
if attributes.key?(:'base_url')
|
99
|
-
self.base_url = attributes[:'base_url']
|
100
|
-
end
|
101
|
-
|
102
|
-
if attributes.key?(:'content_guard')
|
103
|
-
self.content_guard = attributes[:'content_guard']
|
104
|
-
end
|
105
|
-
|
106
|
-
if attributes.key?(:'name')
|
107
|
-
self.name = attributes[:'name']
|
108
|
-
end
|
109
|
-
|
110
|
-
if attributes.key?(:'publication')
|
111
|
-
self.publication = attributes[:'publication']
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
116
|
-
# @return Array for valid properties with the reasons
|
117
|
-
def list_invalid_properties
|
118
|
-
invalid_properties = Array.new
|
119
|
-
if @base_path.nil?
|
120
|
-
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
121
|
-
end
|
122
|
-
|
123
|
-
if @base_path.to_s.length < 1
|
124
|
-
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
125
|
-
end
|
126
|
-
|
127
|
-
if !@base_url.nil? && @base_url.to_s.length < 1
|
128
|
-
invalid_properties.push('invalid value for "base_url", the character length must be great than or equal to 1.')
|
129
|
-
end
|
130
|
-
|
131
|
-
if @name.nil?
|
132
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
133
|
-
end
|
134
|
-
|
135
|
-
if @name.to_s.length < 1
|
136
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
137
|
-
end
|
138
|
-
|
139
|
-
invalid_properties
|
140
|
-
end
|
141
|
-
|
142
|
-
# Check to see if the all the properties in the model are valid
|
143
|
-
# @return true if the model is valid
|
144
|
-
def valid?
|
145
|
-
return false if @base_path.nil?
|
146
|
-
return false if @base_path.to_s.length < 1
|
147
|
-
return false if !@base_url.nil? && @base_url.to_s.length < 1
|
148
|
-
return false if @name.nil?
|
149
|
-
return false if @name.to_s.length < 1
|
150
|
-
true
|
151
|
-
end
|
152
|
-
|
153
|
-
# Custom attribute writer method with validation
|
154
|
-
# @param [Object] base_path Value to be assigned
|
155
|
-
def base_path=(base_path)
|
156
|
-
if base_path.nil?
|
157
|
-
fail ArgumentError, 'base_path cannot be nil'
|
158
|
-
end
|
159
|
-
|
160
|
-
if base_path.to_s.length < 1
|
161
|
-
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
162
|
-
end
|
163
|
-
|
164
|
-
@base_path = base_path
|
165
|
-
end
|
166
|
-
|
167
|
-
# Custom attribute writer method with validation
|
168
|
-
# @param [Object] base_url Value to be assigned
|
169
|
-
def base_url=(base_url)
|
170
|
-
if !base_url.nil? && base_url.to_s.length < 1
|
171
|
-
fail ArgumentError, 'invalid value for "base_url", the character length must be great than or equal to 1.'
|
172
|
-
end
|
173
|
-
|
174
|
-
@base_url = base_url
|
175
|
-
end
|
176
|
-
|
177
|
-
# Custom attribute writer method with validation
|
178
|
-
# @param [Object] name Value to be assigned
|
179
|
-
def name=(name)
|
180
|
-
if name.nil?
|
181
|
-
fail ArgumentError, 'name cannot be nil'
|
182
|
-
end
|
183
|
-
|
184
|
-
if name.to_s.length < 1
|
185
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
186
|
-
end
|
187
|
-
|
188
|
-
@name = name
|
189
|
-
end
|
190
|
-
|
191
|
-
# Checks equality by comparing each attribute.
|
192
|
-
# @param [Object] Object to be compared
|
193
|
-
def ==(o)
|
194
|
-
return true if self.equal?(o)
|
195
|
-
self.class == o.class &&
|
196
|
-
pulp_href == o.pulp_href &&
|
197
|
-
pulp_created == o.pulp_created &&
|
198
|
-
base_path == o.base_path &&
|
199
|
-
base_url == o.base_url &&
|
200
|
-
content_guard == o.content_guard &&
|
201
|
-
name == o.name &&
|
202
|
-
publication == o.publication
|
203
|
-
end
|
204
|
-
|
205
|
-
# @see the `==` method
|
206
|
-
# @param [Object] Object to be compared
|
207
|
-
def eql?(o)
|
208
|
-
self == o
|
209
|
-
end
|
210
|
-
|
211
|
-
# Calculates hash code according to all attributes.
|
212
|
-
# @return [Integer] Hash code
|
213
|
-
def hash
|
214
|
-
[pulp_href, pulp_created, base_path, base_url, content_guard, name, publication].hash
|
215
|
-
end
|
216
|
-
|
217
|
-
# Builds the object from hash
|
218
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
219
|
-
# @return [Object] Returns the model itself
|
220
|
-
def self.build_from_hash(attributes)
|
221
|
-
new.build_from_hash(attributes)
|
222
|
-
end
|
223
|
-
|
224
|
-
# Builds the object from hash
|
225
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
-
# @return [Object] Returns the model itself
|
227
|
-
def build_from_hash(attributes)
|
228
|
-
return nil unless attributes.is_a?(Hash)
|
229
|
-
self.class.openapi_types.each_pair do |key, type|
|
230
|
-
if type =~ /\AArray<(.*)>/i
|
231
|
-
# check to ensure the input is an array given that the attribute
|
232
|
-
# is documented as an array but the input is not
|
233
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
235
|
-
end
|
236
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
238
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
239
|
-
end
|
240
|
-
|
241
|
-
self
|
242
|
-
end
|
243
|
-
|
244
|
-
# Deserializes the data based on type
|
245
|
-
# @param string type Data type
|
246
|
-
# @param string value Value to be deserialized
|
247
|
-
# @return [Object] Deserialized data
|
248
|
-
def _deserialize(type, value)
|
249
|
-
case type.to_sym
|
250
|
-
when :DateTime
|
251
|
-
DateTime.parse(value)
|
252
|
-
when :Date
|
253
|
-
Date.parse(value)
|
254
|
-
when :String
|
255
|
-
value.to_s
|
256
|
-
when :Integer
|
257
|
-
value.to_i
|
258
|
-
when :Float
|
259
|
-
value.to_f
|
260
|
-
when :Boolean
|
261
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
262
|
-
true
|
263
|
-
else
|
264
|
-
false
|
265
|
-
end
|
266
|
-
when :Object
|
267
|
-
# generic object (usually a Hash), return directly
|
268
|
-
value
|
269
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
270
|
-
inner_type = Regexp.last_match[:inner_type]
|
271
|
-
value.map { |v| _deserialize(inner_type, v) }
|
272
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
273
|
-
k_type = Regexp.last_match[:k_type]
|
274
|
-
v_type = Regexp.last_match[:v_type]
|
275
|
-
{}.tap do |hash|
|
276
|
-
value.each do |k, v|
|
277
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
278
|
-
end
|
279
|
-
end
|
280
|
-
else # model
|
281
|
-
PulpRpmClient.const_get(type).build_from_hash(value)
|
282
|
-
end
|
283
|
-
end
|
284
|
-
|
285
|
-
# Returns the string representation of the object
|
286
|
-
# @return [String] String presentation of the object
|
287
|
-
def to_s
|
288
|
-
to_hash.to_s
|
289
|
-
end
|
290
|
-
|
291
|
-
# to_body is an alias to to_hash (backward compatibility)
|
292
|
-
# @return [Hash] Returns the object in the form of hash
|
293
|
-
def to_body
|
294
|
-
to_hash
|
295
|
-
end
|
296
|
-
|
297
|
-
# Returns the object in the form of hash
|
298
|
-
# @return [Hash] Returns the object in the form of hash
|
299
|
-
def to_hash
|
300
|
-
hash = {}
|
301
|
-
self.class.attribute_map.each_pair do |attr, param|
|
302
|
-
value = self.send(attr)
|
303
|
-
if value.nil?
|
304
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
305
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
306
|
-
end
|
307
|
-
|
308
|
-
hash[param] = _to_hash(value)
|
309
|
-
end
|
310
|
-
hash
|
311
|
-
end
|
312
|
-
|
313
|
-
# Outputs non-array value in the form of hash
|
314
|
-
# For object, use to_hash. Otherwise, just return the value
|
315
|
-
# @param [Object] value Any valid value
|
316
|
-
# @return [Hash] Returns the value in the form of hash
|
317
|
-
def _to_hash(value)
|
318
|
-
if value.is_a?(Array)
|
319
|
-
value.compact.map { |v| _to_hash(v) }
|
320
|
-
elsif value.is_a?(Hash)
|
321
|
-
{}.tap do |hash|
|
322
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
323
|
-
end
|
324
|
-
elsif value.respond_to? :to_hash
|
325
|
-
value.to_hash
|
326
|
-
else
|
327
|
-
value
|
328
|
-
end
|
329
|
-
end
|
330
|
-
end
|
331
|
-
end
|