pulp_ansible_client 0.2.0b14 → 0.2.0b15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -20
  3. data/docs/{AnsibleCollectionRead.md → AnsibleCollection.md} +2 -2
  4. data/docs/AnsibleCollectionRemote.md +5 -1
  5. data/docs/AnsibleCollectionVersion.md +3 -3
  6. data/docs/AnsibleRole.md +3 -3
  7. data/docs/{CollectionImportDetailRead.md → CollectionImportDetail.md} +2 -2
  8. data/docs/ContentCollectionVersionsApi.md +4 -4
  9. data/docs/ContentRolesApi.md +4 -4
  10. data/docs/DistributionsAnsibleApi.md +2 -2
  11. data/docs/{GalaxyCollectionVersionRead.md → GalaxyCollectionVersion.md} +2 -2
  12. data/docs/{GalaxyRoleRead.md → GalaxyRole.md} +2 -2
  13. data/docs/{GalaxyRoleVersionRead.md → GalaxyRoleVersion.md} +2 -2
  14. data/docs/InlineResponse200.md +1 -1
  15. data/docs/InlineResponse2001.md +1 -1
  16. data/docs/InlineResponse20010.md +1 -1
  17. data/docs/InlineResponse20011.md +1 -1
  18. data/docs/InlineResponse20012.md +1 -1
  19. data/docs/InlineResponse20013.md +1 -1
  20. data/docs/InlineResponse2002.md +1 -1
  21. data/docs/InlineResponse2003.md +1 -1
  22. data/docs/InlineResponse2004.md +1 -1
  23. data/docs/InlineResponse2005.md +1 -1
  24. data/docs/InlineResponse2006.md +1 -1
  25. data/docs/InlineResponse2007.md +1 -1
  26. data/docs/InlineResponse2008.md +1 -1
  27. data/docs/InlineResponse2009.md +1 -1
  28. data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +4 -4
  29. data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +2 -2
  30. data/docs/RemotesAnsibleApi.md +4 -4
  31. data/docs/RemotesCollectionApi.md +4 -4
  32. data/docs/RepositoriesAnsibleApi.md +4 -4
  33. data/docs/RepositoriesAnsibleVersionsApi.md +6 -4
  34. data/docs/{TagRead.md → Tag.md} +2 -2
  35. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
  36. data/lib/pulp_ansible_client/api/content_roles_api.rb +6 -6
  37. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +3 -3
  38. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +6 -6
  39. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +3 -3
  40. data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +6 -6
  41. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +6 -6
  42. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +6 -6
  43. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +9 -6
  44. data/lib/pulp_ansible_client/models/{ansible_collection_read.rb → ansible_collection.rb} +3 -3
  45. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +75 -5
  46. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +11 -11
  47. data/lib/pulp_ansible_client/models/ansible_role.rb +11 -11
  48. data/lib/pulp_ansible_client/models/{collection_import_detail_read.rb → collection_import_detail.rb} +3 -3
  49. data/lib/pulp_ansible_client/models/{galaxy_collection_version_read.rb → galaxy_collection_version.rb} +3 -3
  50. data/lib/pulp_ansible_client/models/{galaxy_role_read.rb → galaxy_role.rb} +3 -3
  51. data/lib/pulp_ansible_client/models/{galaxy_role_version_read.rb → galaxy_role_version.rb} +3 -3
  52. data/lib/pulp_ansible_client/models/inline_response200.rb +1 -1
  53. data/lib/pulp_ansible_client/models/inline_response2001.rb +1 -1
  54. data/lib/pulp_ansible_client/models/inline_response20010.rb +1 -1
  55. data/lib/pulp_ansible_client/models/inline_response20011.rb +1 -1
  56. data/lib/pulp_ansible_client/models/inline_response20012.rb +1 -1
  57. data/lib/pulp_ansible_client/models/inline_response20013.rb +1 -1
  58. data/lib/pulp_ansible_client/models/inline_response2002.rb +1 -1
  59. data/lib/pulp_ansible_client/models/inline_response2003.rb +1 -1
  60. data/lib/pulp_ansible_client/models/inline_response2004.rb +1 -1
  61. data/lib/pulp_ansible_client/models/inline_response2005.rb +1 -1
  62. data/lib/pulp_ansible_client/models/inline_response2006.rb +1 -1
  63. data/lib/pulp_ansible_client/models/inline_response2007.rb +1 -1
  64. data/lib/pulp_ansible_client/models/inline_response2008.rb +1 -1
  65. data/lib/pulp_ansible_client/models/inline_response2009.rb +1 -1
  66. data/lib/pulp_ansible_client/models/{tag_read.rb → tag.rb} +3 -3
  67. data/lib/pulp_ansible_client/version.rb +1 -1
  68. data/lib/pulp_ansible_client.rb +6 -16
  69. data/spec/api/content_collection_versions_api_spec.rb +2 -2
  70. data/spec/api/content_roles_api_spec.rb +2 -2
  71. data/spec/api/distributions_ansible_api_spec.rb +1 -1
  72. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +2 -2
  73. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +1 -1
  74. data/spec/api/remotes_ansible_api_spec.rb +2 -2
  75. data/spec/api/remotes_collection_api_spec.rb +2 -2
  76. data/spec/api/repositories_ansible_api_spec.rb +2 -2
  77. data/spec/api/repositories_ansible_versions_api_spec.rb +3 -2
  78. data/spec/models/ansible_collection_remote_spec.rb +12 -0
  79. data/spec/models/{ansible_collection_read_spec.rb → ansible_collection_spec.rb} +6 -6
  80. data/spec/models/ansible_collection_version_spec.rb +3 -3
  81. data/spec/models/ansible_role_spec.rb +3 -3
  82. data/spec/models/{collection_import_detail_read_spec.rb → collection_import_detail_spec.rb} +6 -6
  83. data/spec/models/{galaxy_collection_version_read_spec.rb → galaxy_collection_version_spec.rb} +6 -6
  84. data/spec/models/{galaxy_role_read_spec.rb → galaxy_role_spec.rb} +6 -6
  85. data/spec/models/{galaxy_role_version_read_spec.rb → galaxy_role_version_spec.rb} +6 -6
  86. data/spec/models/{tag_read_spec.rb → tag_spec.rb} +6 -6
  87. metadata +26 -66
  88. data/docs/AnsibleAnsibleDistributionRead.md +0 -31
  89. data/docs/AnsibleAnsibleRemoteRead.md +0 -43
  90. data/docs/AnsibleAnsibleRepositoryRead.md +0 -27
  91. data/docs/AnsibleCollectionRemoteRead.md +0 -45
  92. data/docs/AnsibleCollectionVersionRead.md +0 -67
  93. data/docs/AnsibleRoleRead.md +0 -27
  94. data/docs/CollectionRead.md +0 -31
  95. data/docs/CollectionVersionRead.md +0 -37
  96. data/docs/GalaxyCollectionRead.md +0 -23
  97. data/docs/RepositoryVersionRead.md +0 -25
  98. data/lib/pulp_ansible_client/models/ansible_ansible_distribution_read.rb +0 -327
  99. data/lib/pulp_ansible_client/models/ansible_ansible_remote_read.rb +0 -531
  100. data/lib/pulp_ansible_client/models/ansible_ansible_repository_read.rb +0 -294
  101. data/lib/pulp_ansible_client/models/ansible_collection_remote_read.rb +0 -557
  102. data/lib/pulp_ansible_client/models/ansible_collection_version_read.rb +0 -816
  103. data/lib/pulp_ansible_client/models/ansible_role_read.rb +0 -330
  104. data/lib/pulp_ansible_client/models/collection_read.rb +0 -314
  105. data/lib/pulp_ansible_client/models/collection_version_read.rb +0 -370
  106. data/lib/pulp_ansible_client/models/galaxy_collection_read.rb +0 -281
  107. data/lib/pulp_ansible_client/models/repository_version_read.rb +0 -244
  108. data/spec/models/ansible_ansible_distribution_read_spec.rb +0 -83
  109. data/spec/models/ansible_ansible_remote_read_spec.rb +0 -123
  110. data/spec/models/ansible_ansible_repository_read_spec.rb +0 -71
  111. data/spec/models/ansible_collection_remote_read_spec.rb +0 -129
  112. data/spec/models/ansible_collection_version_read_spec.rb +0 -191
  113. data/spec/models/ansible_role_read_spec.rb +0 -71
  114. data/spec/models/collection_read_spec.rb +0 -83
  115. data/spec/models/collection_version_read_spec.rb +0 -105
  116. data/spec/models/galaxy_collection_read_spec.rb +0 -59
  117. data/spec/models/repository_version_read_spec.rb +0 -65
@@ -1,43 +0,0 @@
1
- # PulpAnsibleClient::AnsibleAnsibleRemoteRead
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. | [optional] [default to 'immediate']
21
-
22
- ## Code Sample
23
-
24
- ```ruby
25
- require 'PulpAnsibleClient'
26
-
27
- instance = PulpAnsibleClient::AnsibleAnsibleRemoteRead.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,27 +0,0 @@
1
- # PulpAnsibleClient::AnsibleAnsibleRepositoryRead
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
-
14
- ## Code Sample
15
-
16
- ```ruby
17
- require 'PulpAnsibleClient'
18
-
19
- instance = PulpAnsibleClient::AnsibleAnsibleRepositoryRead.new(pulp_href: null,
20
- pulp_created: null,
21
- versions_href: null,
22
- latest_version_href: null,
23
- name: null,
24
- description: null)
25
- ```
26
-
27
-
@@ -1,45 +0,0 @@
1
- # PulpAnsibleClient::AnsibleCollectionRemoteRead
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. | [optional] [default to 'immediate']
21
- **requirements_file** | **String** | The string version of Collection requirements yaml. | [optional]
22
-
23
- ## Code Sample
24
-
25
- ```ruby
26
- require 'PulpAnsibleClient'
27
-
28
- instance = PulpAnsibleClient::AnsibleCollectionRemoteRead.new(pulp_href: null,
29
- pulp_created: null,
30
- name: null,
31
- url: null,
32
- ca_cert: null,
33
- client_cert: null,
34
- client_key: null,
35
- tls_validation: null,
36
- proxy_url: null,
37
- username: null,
38
- password: null,
39
- pulp_last_updated: null,
40
- download_concurrency: null,
41
- policy: null,
42
- requirements_file: null)
43
- ```
44
-
45
-
@@ -1,67 +0,0 @@
1
- # PulpAnsibleClient::AnsibleCollectionVersionRead
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **pulp_href** | **String** | | [optional] [readonly]
8
- **artifact** | **String** | Artifact file representing the physical content |
9
- **pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
10
- **md5** | **String** | The MD5 checksum if available. | [optional] [readonly]
11
- **sha1** | **String** | The SHA-1 checksum if available. | [optional] [readonly]
12
- **sha224** | **String** | The SHA-224 checksum if available. | [optional] [readonly]
13
- **sha256** | **String** | The SHA-256 checksum if available. | [optional] [readonly]
14
- **sha384** | **String** | The SHA-384 checksum if available. | [optional] [readonly]
15
- **sha512** | **String** | The SHA-512 checksum if available. | [optional] [readonly]
16
- **id** | **String** | A collection identifier. |
17
- **authors** | **Array<String>** | A list of the CollectionVersion content's authors. |
18
- **contents** | **Array<Hash<String, String>>** | A JSON field with data about the contents. |
19
- **dependencies** | **Hash<String, String>** | A dict declaring Collections that this collection requires to be installed for it to be usable. |
20
- **description** | **String** | A short summary description of the collection. |
21
- **docs_blob** | **Hash<String, String>** | A JSON field holding the various documentation blobs in the collection. |
22
- **documentation** | **String** | The URL to any online docs. |
23
- **homepage** | **String** | The URL to the homepage of the collection/project. |
24
- **issues** | **String** | The URL to the collection issue tracker. |
25
- **certification** | **String** | Indicates that the version is certified |
26
- **license** | **Array<String>** | A list of licenses for content inside of a collection. |
27
- **name** | **String** | The name of the collection. |
28
- **namespace** | **String** | The namespace of the collection. |
29
- **repository** | **String** | The URL of the originating SCM repository. |
30
- **tags** | [**Array<AnsibleTag>**](AnsibleTag.md) | | [optional] [readonly]
31
- **version** | **String** | The version of the collection. |
32
- **deprecated** | **Boolean** | Whether or not the collection has been deprecated. | [optional] [readonly]
33
-
34
- ## Code Sample
35
-
36
- ```ruby
37
- require 'PulpAnsibleClient'
38
-
39
- instance = PulpAnsibleClient::AnsibleCollectionVersionRead.new(pulp_href: null,
40
- artifact: null,
41
- pulp_created: null,
42
- md5: null,
43
- sha1: null,
44
- sha224: null,
45
- sha256: null,
46
- sha384: null,
47
- sha512: null,
48
- id: null,
49
- authors: null,
50
- contents: null,
51
- dependencies: null,
52
- description: null,
53
- docs_blob: null,
54
- documentation: null,
55
- homepage: null,
56
- issues: null,
57
- certification: null,
58
- license: null,
59
- name: null,
60
- namespace: null,
61
- repository: null,
62
- tags: null,
63
- version: null,
64
- deprecated: null)
65
- ```
66
-
67
-
@@ -1,27 +0,0 @@
1
- # PulpAnsibleClient::AnsibleRoleRead
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **pulp_href** | **String** | | [optional] [readonly]
8
- **artifact** | **String** | Artifact file representing the physical content |
9
- **pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
10
- **version** | **String** | |
11
- **name** | **String** | |
12
- **namespace** | **String** | |
13
-
14
- ## Code Sample
15
-
16
- ```ruby
17
- require 'PulpAnsibleClient'
18
-
19
- instance = PulpAnsibleClient::AnsibleRoleRead.new(pulp_href: null,
20
- artifact: null,
21
- pulp_created: null,
22
- version: null,
23
- name: null,
24
- namespace: null)
25
- ```
26
-
27
-
@@ -1,31 +0,0 @@
1
- # PulpAnsibleClient::CollectionRead
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **href** | **String** | | [optional] [readonly]
8
- **created_at** | **DateTime** | |
9
- **updated_at** | **DateTime** | |
10
- **namespace** | **String** | | [optional] [readonly]
11
- **name** | **String** | | [optional] [readonly]
12
- **deprecated** | **Boolean** | |
13
- **versions_url** | **String** | | [optional] [readonly]
14
- **highest_version** | **String** | | [optional] [readonly]
15
-
16
- ## Code Sample
17
-
18
- ```ruby
19
- require 'PulpAnsibleClient'
20
-
21
- instance = PulpAnsibleClient::CollectionRead.new(href: null,
22
- created_at: null,
23
- updated_at: null,
24
- namespace: null,
25
- name: null,
26
- deprecated: null,
27
- versions_url: null,
28
- highest_version: null)
29
- ```
30
-
31
-
@@ -1,37 +0,0 @@
1
- # PulpAnsibleClient::CollectionVersionRead
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **version** | **String** | | [optional] [readonly]
8
- **certification** | **String** | | [optional]
9
- **href** | **String** | | [optional] [readonly]
10
- **created_at** | **DateTime** | |
11
- **updated_at** | **DateTime** | |
12
- **artifact** | **String** | | [optional] [readonly]
13
- **collection** | [**CollectionRef**](CollectionRef.md) | | [optional]
14
- **download_url** | **String** | | [optional] [readonly]
15
- **name** | **String** | | [optional] [readonly]
16
- **namespace** | [**CollectionNamespace**](CollectionNamespace.md) | | [optional]
17
- **metadata** | [**CollectionMetadata**](CollectionMetadata.md) | | [optional]
18
-
19
- ## Code Sample
20
-
21
- ```ruby
22
- require 'PulpAnsibleClient'
23
-
24
- instance = PulpAnsibleClient::CollectionVersionRead.new(version: null,
25
- certification: null,
26
- href: null,
27
- created_at: null,
28
- updated_at: null,
29
- artifact: null,
30
- collection: null,
31
- download_url: null,
32
- name: null,
33
- namespace: null,
34
- metadata: null)
35
- ```
36
-
37
-
@@ -1,23 +0,0 @@
1
- # PulpAnsibleClient::GalaxyCollectionRead
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | |
8
- **namespace** | **String** | |
9
- **href** | **String** | | [optional] [readonly]
10
- **versions_url** | **String** | | [optional] [readonly]
11
-
12
- ## Code Sample
13
-
14
- ```ruby
15
- require 'PulpAnsibleClient'
16
-
17
- instance = PulpAnsibleClient::GalaxyCollectionRead.new(name: null,
18
- namespace: null,
19
- href: null,
20
- versions_url: null)
21
- ```
22
-
23
-
@@ -1,25 +0,0 @@
1
- # PulpAnsibleClient::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 'PulpAnsibleClient'
17
-
18
- instance = PulpAnsibleClient::RepositoryVersionRead.new(pulp_href: null,
19
- pulp_created: null,
20
- number: null,
21
- base_version: null,
22
- content_summary: null)
23
- ```
24
-
25
-
@@ -1,327 +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 PulpAnsibleClient
16
- class AnsibleAnsibleDistributionRead
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
- # An optional content-guard.
26
- attr_accessor :content_guard
27
-
28
- # A unique name. Ex, `rawhide` and `stable`.
29
- attr_accessor :name
30
-
31
- # The latest RepositoryVersion for this Repository will be served.
32
- attr_accessor :repository
33
-
34
- # RepositoryVersion to be served
35
- attr_accessor :repository_version
36
-
37
- # The URL of a Collection content source.
38
- attr_accessor :client_url
39
-
40
- # Attribute mapping from ruby-style variable name to JSON key.
41
- def self.attribute_map
42
- {
43
- :'pulp_href' => :'pulp_href',
44
- :'pulp_created' => :'pulp_created',
45
- :'base_path' => :'base_path',
46
- :'content_guard' => :'content_guard',
47
- :'name' => :'name',
48
- :'repository' => :'repository',
49
- :'repository_version' => :'repository_version',
50
- :'client_url' => :'client_url'
51
- }
52
- end
53
-
54
- # Attribute type mapping.
55
- def self.openapi_types
56
- {
57
- :'pulp_href' => :'String',
58
- :'pulp_created' => :'DateTime',
59
- :'base_path' => :'String',
60
- :'content_guard' => :'String',
61
- :'name' => :'String',
62
- :'repository' => :'String',
63
- :'repository_version' => :'String',
64
- :'client_url' => :'String'
65
- }
66
- end
67
-
68
- # List of attributes with nullable: true
69
- def self.openapi_nullable
70
- Set.new([
71
- :'content_guard',
72
- :'repository',
73
- :'repository_version',
74
- ])
75
- end
76
-
77
- # Initializes the object
78
- # @param [Hash] attributes Model attributes in the form of hash
79
- def initialize(attributes = {})
80
- if (!attributes.is_a?(Hash))
81
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleAnsibleDistributionRead` initialize method"
82
- end
83
-
84
- # check to see if the attribute exists and convert string to symbol for hash key
85
- attributes = attributes.each_with_object({}) { |(k, v), h|
86
- if (!self.class.attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleAnsibleDistributionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
- end
89
- h[k.to_sym] = v
90
- }
91
-
92
- if attributes.key?(:'pulp_href')
93
- self.pulp_href = attributes[:'pulp_href']
94
- end
95
-
96
- if attributes.key?(:'pulp_created')
97
- self.pulp_created = attributes[:'pulp_created']
98
- end
99
-
100
- if attributes.key?(:'base_path')
101
- self.base_path = attributes[:'base_path']
102
- end
103
-
104
- if attributes.key?(:'content_guard')
105
- self.content_guard = attributes[:'content_guard']
106
- end
107
-
108
- if attributes.key?(:'name')
109
- self.name = attributes[:'name']
110
- end
111
-
112
- if attributes.key?(:'repository')
113
- self.repository = attributes[:'repository']
114
- end
115
-
116
- if attributes.key?(:'repository_version')
117
- self.repository_version = attributes[:'repository_version']
118
- end
119
-
120
- if attributes.key?(:'client_url')
121
- self.client_url = attributes[:'client_url']
122
- end
123
- end
124
-
125
- # Show invalid properties with the reasons. Usually used together with valid?
126
- # @return Array for valid properties with the reasons
127
- def list_invalid_properties
128
- invalid_properties = Array.new
129
- if @base_path.nil?
130
- invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
131
- end
132
-
133
- if @base_path.to_s.length < 1
134
- invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
135
- end
136
-
137
- if @name.nil?
138
- invalid_properties.push('invalid value for "name", name cannot be nil.')
139
- end
140
-
141
- if @name.to_s.length < 1
142
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
143
- end
144
-
145
- invalid_properties
146
- end
147
-
148
- # Check to see if the all the properties in the model are valid
149
- # @return true if the model is valid
150
- def valid?
151
- return false if @base_path.nil?
152
- return false if @base_path.to_s.length < 1
153
- return false if @name.nil?
154
- return false if @name.to_s.length < 1
155
- true
156
- end
157
-
158
- # Custom attribute writer method with validation
159
- # @param [Object] base_path Value to be assigned
160
- def base_path=(base_path)
161
- if base_path.nil?
162
- fail ArgumentError, 'base_path cannot be nil'
163
- end
164
-
165
- if base_path.to_s.length < 1
166
- fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
167
- end
168
-
169
- @base_path = base_path
170
- end
171
-
172
- # Custom attribute writer method with validation
173
- # @param [Object] name Value to be assigned
174
- def name=(name)
175
- if name.nil?
176
- fail ArgumentError, 'name cannot be nil'
177
- end
178
-
179
- if name.to_s.length < 1
180
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
181
- end
182
-
183
- @name = name
184
- end
185
-
186
- # Checks equality by comparing each attribute.
187
- # @param [Object] Object to be compared
188
- def ==(o)
189
- return true if self.equal?(o)
190
- self.class == o.class &&
191
- pulp_href == o.pulp_href &&
192
- pulp_created == o.pulp_created &&
193
- base_path == o.base_path &&
194
- content_guard == o.content_guard &&
195
- name == o.name &&
196
- repository == o.repository &&
197
- repository_version == o.repository_version &&
198
- client_url == o.client_url
199
- end
200
-
201
- # @see the `==` method
202
- # @param [Object] Object to be compared
203
- def eql?(o)
204
- self == o
205
- end
206
-
207
- # Calculates hash code according to all attributes.
208
- # @return [Integer] Hash code
209
- def hash
210
- [pulp_href, pulp_created, base_path, content_guard, name, repository, repository_version, client_url].hash
211
- end
212
-
213
- # Builds the object from hash
214
- # @param [Hash] attributes Model attributes in the form of hash
215
- # @return [Object] Returns the model itself
216
- def self.build_from_hash(attributes)
217
- new.build_from_hash(attributes)
218
- end
219
-
220
- # Builds the object from hash
221
- # @param [Hash] attributes Model attributes in the form of hash
222
- # @return [Object] Returns the model itself
223
- def build_from_hash(attributes)
224
- return nil unless attributes.is_a?(Hash)
225
- self.class.openapi_types.each_pair do |key, type|
226
- if type =~ /\AArray<(.*)>/i
227
- # check to ensure the input is an array given that the attribute
228
- # is documented as an array but the input is not
229
- if attributes[self.class.attribute_map[key]].is_a?(Array)
230
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
231
- end
232
- elsif !attributes[self.class.attribute_map[key]].nil?
233
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
234
- end # or else data not found in attributes(hash), not an issue as the data can be optional
235
- end
236
-
237
- self
238
- end
239
-
240
- # Deserializes the data based on type
241
- # @param string type Data type
242
- # @param string value Value to be deserialized
243
- # @return [Object] Deserialized data
244
- def _deserialize(type, value)
245
- case type.to_sym
246
- when :DateTime
247
- DateTime.parse(value)
248
- when :Date
249
- Date.parse(value)
250
- when :String
251
- value.to_s
252
- when :Integer
253
- value.to_i
254
- when :Float
255
- value.to_f
256
- when :Boolean
257
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
258
- true
259
- else
260
- false
261
- end
262
- when :Object
263
- # generic object (usually a Hash), return directly
264
- value
265
- when /\AArray<(?<inner_type>.+)>\z/
266
- inner_type = Regexp.last_match[:inner_type]
267
- value.map { |v| _deserialize(inner_type, v) }
268
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
269
- k_type = Regexp.last_match[:k_type]
270
- v_type = Regexp.last_match[:v_type]
271
- {}.tap do |hash|
272
- value.each do |k, v|
273
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
274
- end
275
- end
276
- else # model
277
- PulpAnsibleClient.const_get(type).build_from_hash(value)
278
- end
279
- end
280
-
281
- # Returns the string representation of the object
282
- # @return [String] String presentation of the object
283
- def to_s
284
- to_hash.to_s
285
- end
286
-
287
- # to_body is an alias to to_hash (backward compatibility)
288
- # @return [Hash] Returns the object in the form of hash
289
- def to_body
290
- to_hash
291
- end
292
-
293
- # Returns the object in the form of hash
294
- # @return [Hash] Returns the object in the form of hash
295
- def to_hash
296
- hash = {}
297
- self.class.attribute_map.each_pair do |attr, param|
298
- value = self.send(attr)
299
- if value.nil?
300
- is_nullable = self.class.openapi_nullable.include?(attr)
301
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
302
- end
303
-
304
- hash[param] = _to_hash(value)
305
- end
306
- hash
307
- end
308
-
309
- # Outputs non-array value in the form of hash
310
- # For object, use to_hash. Otherwise, just return the value
311
- # @param [Object] value Any valid value
312
- # @return [Hash] Returns the value in the form of hash
313
- def _to_hash(value)
314
- if value.is_a?(Array)
315
- value.compact.map { |v| _to_hash(v) }
316
- elsif value.is_a?(Hash)
317
- {}.tap do |hash|
318
- value.each { |k, v| hash[k] = _to_hash(v) }
319
- end
320
- elsif value.respond_to? :to_hash
321
- value.to_hash
322
- else
323
- value
324
- end
325
- end
326
- end
327
- end