pulp_rpm_client 3.0.0b5 → 3.0.0b6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -6
  3. data/docs/ContentAdvisoriesApi.md +3 -3
  4. data/docs/ContentModulemdApi.md +210 -0
  5. data/docs/ContentModulemdDefaultsApi.md +200 -0
  6. data/docs/ContentPackagesApi.md +17 -9
  7. data/docs/DistributionTreesDistributionTreesApi.md +2 -2
  8. data/docs/DistributionsRpmApi.md +2 -2
  9. data/docs/InlineResponse2001.md +1 -1
  10. data/docs/InlineResponse2002.md +1 -1
  11. data/docs/InlineResponse2003.md +1 -1
  12. data/docs/InlineResponse2004.md +1 -1
  13. data/docs/InlineResponse2005.md +1 -1
  14. data/docs/InlineResponse2006.md +1 -1
  15. data/docs/InlineResponse2007.md +23 -0
  16. data/docs/InlineResponse2008.md +23 -0
  17. data/docs/Modulemd.md +45 -0
  18. data/docs/ModulemdDefaults.md +35 -0
  19. data/docs/Package.md +23 -19
  20. data/docs/PublicationsRpmApi.md +2 -2
  21. data/docs/RemotesRpmApi.md +2 -2
  22. data/docs/RepoMetadataFile.md +5 -1
  23. data/docs/RepoMetadataFilesRepoMetadataFilesApi.md +2 -2
  24. data/docs/RpmCopyApi.md +1 -1
  25. data/lib/pulp_rpm_client/api/content_advisories_api.rb +5 -5
  26. data/lib/pulp_rpm_client/api/content_modulemd_api.rb +319 -0
  27. data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +272 -0
  28. data/lib/pulp_rpm_client/api/content_packages_api.rb +32 -18
  29. data/lib/pulp_rpm_client/api/distribution_trees_distribution_trees_api.rb +3 -3
  30. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +3 -3
  31. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +3 -3
  32. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +3 -3
  33. data/lib/pulp_rpm_client/api/repo_metadata_files_repo_metadata_files_api.rb +3 -3
  34. data/lib/pulp_rpm_client/api/rpm_copy_api.rb +1 -1
  35. data/lib/pulp_rpm_client/models/inline_response2001.rb +1 -1
  36. data/lib/pulp_rpm_client/models/inline_response2002.rb +1 -1
  37. data/lib/pulp_rpm_client/models/inline_response2003.rb +1 -1
  38. data/lib/pulp_rpm_client/models/inline_response2004.rb +1 -1
  39. data/lib/pulp_rpm_client/models/inline_response2005.rb +1 -1
  40. data/lib/pulp_rpm_client/models/inline_response2006.rb +1 -1
  41. data/lib/pulp_rpm_client/models/inline_response2007.rb +235 -0
  42. data/lib/pulp_rpm_client/models/inline_response2008.rb +235 -0
  43. data/lib/pulp_rpm_client/models/modulemd.rb +544 -0
  44. data/lib/pulp_rpm_client/models/modulemd_defaults.rb +396 -0
  45. data/lib/pulp_rpm_client/models/package.rb +73 -156
  46. data/lib/pulp_rpm_client/models/repo_metadata_file.rb +21 -6
  47. data/lib/pulp_rpm_client/version.rb +1 -1
  48. data/lib/pulp_rpm_client.rb +6 -1
  49. data/spec/api/content_advisories_api_spec.rb +2 -2
  50. data/spec/api/content_modulemd_api_spec.rb +88 -0
  51. data/spec/api/content_modulemd_defaults_api_spec.rb +83 -0
  52. data/spec/api/content_packages_api_spec.rb +7 -4
  53. data/spec/api/distribution_trees_distribution_trees_api_spec.rb +1 -1
  54. data/spec/api/distributions_rpm_api_spec.rb +1 -1
  55. data/spec/api/publications_rpm_api_spec.rb +1 -1
  56. data/spec/api/remotes_rpm_api_spec.rb +1 -1
  57. data/spec/api/repo_metadata_files_repo_metadata_files_api_spec.rb +1 -1
  58. data/spec/models/inline_response2007_spec.rb +59 -0
  59. data/spec/models/inline_response2008_spec.rb +59 -0
  60. data/spec/models/modulemd_defaults_spec.rb +95 -0
  61. data/spec/models/modulemd_spec.rb +125 -0
  62. data/spec/models/package_spec.rb +16 -4
  63. data/spec/models/repo_metadata_file_spec.rb +12 -0
  64. metadata +26 -6
  65. data/docs/RpmUploadApi.md +0 -66
  66. data/lib/pulp_rpm_client/api/rpm_upload_api.rb +0 -90
  67. data/spec/api/rpm_upload_api_spec.rb +0 -48
@@ -0,0 +1,23 @@
1
+ # PulpRpmClient::InlineResponse2007
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **count** | **Integer** | |
8
+ **_next** | **String** | | [optional]
9
+ **previous** | **String** | | [optional]
10
+ **results** | [**Array<RpmRemote>**](RpmRemote.md) | |
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'PulpRpmClient'
16
+
17
+ instance = PulpRpmClient::InlineResponse2007.new(count: null,
18
+ _next: null,
19
+ previous: null,
20
+ results: null)
21
+ ```
22
+
23
+
@@ -0,0 +1,23 @@
1
+ # PulpRpmClient::InlineResponse2008
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **count** | **Integer** | |
8
+ **_next** | **String** | | [optional]
9
+ **previous** | **String** | | [optional]
10
+ **results** | [**Array<RepoMetadataFile>**](RepoMetadataFile.md) | |
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'PulpRpmClient'
16
+
17
+ instance = PulpRpmClient::InlineResponse2008.new(count: null,
18
+ _next: null,
19
+ previous: null,
20
+ results: null)
21
+ ```
22
+
23
+
data/docs/Modulemd.md ADDED
@@ -0,0 +1,45 @@
1
+ # PulpRpmClient::Modulemd
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **_href** | **String** | | [optional]
8
+ **_created** | **DateTime** | Timestamp of creation. | [optional]
9
+ **_type** | **String** | | [optional]
10
+ **artifact** | **String** | Artifact file representing the physical content | [optional]
11
+ **relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **file** | **String** | An uploaded file that should be turned into the artifact of the content unit. | [optional]
13
+ **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional]
14
+ **name** | **String** | Modulemd name. |
15
+ **stream** | **String** | Stream name. |
16
+ **version** | **String** | Modulemd version. |
17
+ **context** | **String** | Modulemd context. |
18
+ **arch** | **String** | Modulemd architecture. |
19
+ **artifacts** | **String** | Modulemd artifacts. |
20
+ **dependencies** | **String** | Modulemd dependencies. |
21
+ **packages** | **Array<String>** | Modulemd artifacts' packages. | [optional]
22
+
23
+ ## Code Sample
24
+
25
+ ```ruby
26
+ require 'PulpRpmClient'
27
+
28
+ instance = PulpRpmClient::Modulemd.new(_href: null,
29
+ _created: null,
30
+ _type: null,
31
+ artifact: null,
32
+ relative_path: null,
33
+ file: null,
34
+ repository: null,
35
+ name: null,
36
+ stream: null,
37
+ version: null,
38
+ context: null,
39
+ arch: null,
40
+ artifacts: null,
41
+ dependencies: null,
42
+ packages: null)
43
+ ```
44
+
45
+
@@ -0,0 +1,35 @@
1
+ # PulpRpmClient::ModulemdDefaults
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **_href** | **String** | | [optional]
8
+ **_created** | **DateTime** | Timestamp of creation. | [optional]
9
+ **_type** | **String** | | [optional]
10
+ **artifact** | **String** | Artifact file representing the physical content | [optional]
11
+ **relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **file** | **String** | An uploaded file that should be turned into the artifact of the content unit. | [optional]
13
+ **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional]
14
+ **_module** | **String** | Modulemd name. |
15
+ **stream** | **String** | Modulemd default stream. |
16
+ **profiles** | **String** | Default profiles for modulemd streams. |
17
+
18
+ ## Code Sample
19
+
20
+ ```ruby
21
+ require 'PulpRpmClient'
22
+
23
+ instance = PulpRpmClient::ModulemdDefaults.new(_href: null,
24
+ _created: null,
25
+ _type: null,
26
+ artifact: null,
27
+ relative_path: null,
28
+ file: null,
29
+ repository: null,
30
+ _module: null,
31
+ stream: null,
32
+ profiles: null)
33
+ ```
34
+
35
+
data/docs/Package.md CHANGED
@@ -4,18 +4,20 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **relative_path** | **String** | File name of the package |
8
7
  **_href** | **String** | | [optional]
9
8
  **_created** | **DateTime** | Timestamp of creation. | [optional]
10
- **artifact** | **String** | Artifact file representing the physical content |
11
9
  **_type** | **String** | | [optional]
12
- **name** | **String** | Name of the package |
10
+ **artifact** | **String** | Artifact file representing the physical content | [optional]
11
+ **relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **file** | **String** | An uploaded file that should be turned into the artifact of the content unit. | [optional]
13
+ **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional]
14
+ **name** | **String** | Name of the package | [optional]
13
15
  **epoch** | **String** | The package's epoch | [optional]
14
- **version** | **String** | The version of the package. For example, '2.8.0' |
15
- **release** | **String** | The release of a particular version of the package. e.g. '1.el7' or '3.f24' |
16
- **arch** | **String** | The target architecture for a package.For example, 'x86_64', 'i686', or 'noarch' |
17
- **pkg_id** | **String** | Checksum of the package file |
18
- **checksum_type** | **String** | Type of checksum, e.g. 'sha256', 'md5' |
16
+ **version** | **String** | The version of the package. For example, '2.8.0' | [optional]
17
+ **release** | **String** | The release of a particular version of the package. e.g. '1.el7' or '3.f24' | [optional]
18
+ **arch** | **String** | The target architecture for a package.For example, 'x86_64', 'i686', or 'noarch' | [optional]
19
+ **pkg_id** | **String** | Checksum of the package file | [optional]
20
+ **checksum_type** | **String** | Type of checksum, e.g. 'sha256', 'md5' | [optional]
19
21
  **summary** | **String** | Short description of the packaged software | [optional]
20
22
  **description** | **String** | In-depth description of the packaged software | [optional]
21
23
  **url** | **String** | URL with more information about the packaged software | [optional]
@@ -30,32 +32,34 @@ Name | Type | Description | Notes
30
32
  **recommends** | **String** | Capabilities the package recommends | [optional] [default to '[]']
31
33
  **supplements** | **String** | Capabilities the package supplements | [optional] [default to '[]']
32
34
  **location_base** | **String** | Base location of this package | [optional]
33
- **location_href** | **String** | Relative location of package to the repodata |
35
+ **location_href** | **String** | Relative location of package to the repodata | [optional]
34
36
  **rpm_buildhost** | **String** | Hostname of the system that built the package | [optional]
35
37
  **rpm_group** | **String** | RPM group (See: http://fedoraproject.org/wiki/RPMGroups) | [optional]
36
38
  **rpm_license** | **String** | License term applicable to the package software (GPLv2, etc.) | [optional]
37
39
  **rpm_packager** | **String** | Person or persons responsible for creating the package | [optional]
38
40
  **rpm_sourcerpm** | **String** | Name of the source package (srpm) the package was built from | [optional]
39
41
  **rpm_vendor** | **String** | Name of the organization that produced the package | [optional]
40
- **rpm_header_start** | **Integer** | First byte of the header |
41
- **rpm_header_end** | **Integer** | Last byte of the header |
42
+ **rpm_header_start** | **Integer** | First byte of the header | [optional]
43
+ **rpm_header_end** | **Integer** | Last byte of the header | [optional]
42
44
  **is_modular** | **Boolean** | Flag to identify if the package is modular | [optional]
43
- **size_archive** | **Integer** | Size, in bytes, of the archive portion of the original package file |
44
- **size_installed** | **Integer** | Total size, in bytes, of every file installed by this package |
45
- **size_package** | **Integer** | Size, in bytes, of the package |
46
- **time_build** | **Integer** | Time the package was built in seconds since the epoch |
47
- **time_file** | **Integer** | The 'file' time attribute in the primary XML - file mtime in seconds since the epoch. |
45
+ **size_archive** | **Integer** | Size, in bytes, of the archive portion of the original package file | [optional]
46
+ **size_installed** | **Integer** | Total size, in bytes, of every file installed by this package | [optional]
47
+ **size_package** | **Integer** | Size, in bytes, of the package | [optional]
48
+ **time_build** | **Integer** | Time the package was built in seconds since the epoch | [optional]
49
+ **time_file** | **Integer** | The 'file' time attribute in the primary XML - file mtime in seconds since the epoch. | [optional]
48
50
 
49
51
  ## Code Sample
50
52
 
51
53
  ```ruby
52
54
  require 'PulpRpmClient'
53
55
 
54
- instance = PulpRpmClient::Package.new(relative_path: null,
55
- _href: null,
56
+ instance = PulpRpmClient::Package.new(_href: null,
56
57
  _created: null,
57
- artifact: null,
58
58
  _type: null,
59
+ artifact: null,
60
+ relative_path: null,
61
+ file: null,
62
+ repository: null,
59
63
  name: null,
60
64
  epoch: null,
61
65
  version: null,
@@ -118,7 +118,7 @@ nil (empty response body)
118
118
 
119
119
  ## list
120
120
 
121
- > InlineResponse2004 list(opts)
121
+ > InlineResponse2006 list(opts)
122
122
 
123
123
  List rpm publications
124
124
 
@@ -165,7 +165,7 @@ Name | Type | Description | Notes
165
165
 
166
166
  ### Return type
167
167
 
168
- [**InlineResponse2004**](InlineResponse2004.md)
168
+ [**InlineResponse2006**](InlineResponse2006.md)
169
169
 
170
170
  ### Authorization
171
171
 
@@ -122,7 +122,7 @@ Name | Type | Description | Notes
122
122
 
123
123
  ## list
124
124
 
125
- > InlineResponse2005 list(opts)
125
+ > InlineResponse2007 list(opts)
126
126
 
127
127
  List rpm remotes
128
128
 
@@ -183,7 +183,7 @@ Name | Type | Description | Notes
183
183
 
184
184
  ### Return type
185
185
 
186
- [**InlineResponse2005**](InlineResponse2005.md)
186
+ [**InlineResponse2007**](InlineResponse2007.md)
187
187
 
188
188
  ### Authorization
189
189
 
@@ -7,8 +7,10 @@ Name | Type | Description | Notes
7
7
  **_href** | **String** | | [optional]
8
8
  **_created** | **DateTime** | Timestamp of creation. | [optional]
9
9
  **_type** | **String** | | [optional]
10
- **artifact** | **String** | Artifact file representing the physical content |
10
+ **artifact** | **String** | Artifact file representing the physical content | [optional]
11
11
  **relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **file** | **String** | An uploaded file that should be turned into the artifact of the content unit. | [optional]
13
+ **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional]
12
14
  **data_type** | **String** | Metadata type. |
13
15
  **checksum_type** | **String** | Checksum type for the file. |
14
16
  **checksum** | **String** | Checksum for the file. |
@@ -23,6 +25,8 @@ instance = PulpRpmClient::RepoMetadataFile.new(_href: null,
23
25
  _type: null,
24
26
  artifact: null,
25
27
  relative_path: null,
28
+ file: null,
29
+ repository: null,
26
30
  data_type: null,
27
31
  checksum_type: null,
28
32
  checksum: null)
@@ -64,7 +64,7 @@ nil (empty response body)
64
64
 
65
65
  ## list
66
66
 
67
- > InlineResponse2006 list(opts)
67
+ > InlineResponse2008 list(opts)
68
68
 
69
69
  List repo metadata files
70
70
 
@@ -109,7 +109,7 @@ Name | Type | Description | Notes
109
109
 
110
110
  ### Return type
111
111
 
112
- [**InlineResponse2006**](InlineResponse2006.md)
112
+ [**InlineResponse2008**](InlineResponse2008.md)
113
113
 
114
114
  ### Authorization
115
115
 
data/docs/RpmCopyApi.md CHANGED
@@ -4,7 +4,7 @@ All URIs are relative to *http://localhost:24817*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**copy_content**](RpmCopyApi.md#copy_content) | **POST** /rpm/copy/ | Copy content
7
+ [**copy_content**](RpmCopyApi.md#copy_content) | **POST** /pulp/api/v3/rpm/copy/ | Copy content
8
8
 
9
9
 
10
10
 
@@ -20,20 +20,20 @@ module PulpRpmClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create an update record
23
- # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
24
24
  # @param data [UpdateRecord]
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [UpdateRecord]
26
+ # @return [AsyncOperationResponse]
27
27
  def create(data, opts = {})
28
28
  data, _status_code, _headers = create_with_http_info(data, opts)
29
29
  data
30
30
  end
31
31
 
32
32
  # Create an update record
33
- # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
33
+ # Trigger an asynchronous task to create content,optionally create new repository version.
34
34
  # @param data [UpdateRecord]
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(UpdateRecord, Integer, Hash)>] UpdateRecord data, response status code and response headers
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
37
37
  def create_with_http_info(data, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: ContentAdvisoriesApi.create ...'
@@ -62,7 +62,7 @@ module PulpRpmClient
62
62
  post_body = opts[:body] || @api_client.object_to_http_body(data)
63
63
 
64
64
  # return_type
65
- return_type = opts[:return_type] || 'UpdateRecord'
65
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
66
66
 
67
67
  # auth_names
68
68
  auth_names = opts[:auth_names] || ['Basic']
@@ -0,0 +1,319 @@
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.1.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpRpmClient
16
+ class ContentModulemdApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a modulemd
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
24
+ # @param relative_path [String] Path where the artifact is located relative to distributions base_path
25
+ # @param name [String] Modulemd name.
26
+ # @param stream [String] Stream name.
27
+ # @param version [String] Modulemd version.
28
+ # @param context [String] Modulemd context.
29
+ # @param arch [String] Modulemd architecture.
30
+ # @param artifacts [String] Modulemd artifacts.
31
+ # @param dependencies [String] Modulemd dependencies.
32
+ # @param [Hash] opts the optional parameters
33
+ # @option opts [String] :artifact Artifact file representing the physical content
34
+ # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
35
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
36
+ # @option opts [Array<String>] :packages Modulemd artifacts&#39; packages.
37
+ # @return [AsyncOperationResponse]
38
+ def create(relative_path, name, stream, version, context, arch, artifacts, dependencies, opts = {})
39
+ data, _status_code, _headers = create_with_http_info(relative_path, name, stream, version, context, arch, artifacts, dependencies, opts)
40
+ data
41
+ end
42
+
43
+ # Create a modulemd
44
+ # Trigger an asynchronous task to create content,optionally create new repository version.
45
+ # @param relative_path [String] Path where the artifact is located relative to distributions base_path
46
+ # @param name [String] Modulemd name.
47
+ # @param stream [String] Stream name.
48
+ # @param version [String] Modulemd version.
49
+ # @param context [String] Modulemd context.
50
+ # @param arch [String] Modulemd architecture.
51
+ # @param artifacts [String] Modulemd artifacts.
52
+ # @param dependencies [String] Modulemd dependencies.
53
+ # @param [Hash] opts the optional parameters
54
+ # @option opts [String] :artifact Artifact file representing the physical content
55
+ # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
56
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
57
+ # @option opts [Array<String>] :packages Modulemd artifacts&#39; packages.
58
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
59
+ def create_with_http_info(relative_path, name, stream, version, context, arch, artifacts, dependencies, opts = {})
60
+ if @api_client.config.debugging
61
+ @api_client.config.logger.debug 'Calling API: ContentModulemdApi.create ...'
62
+ end
63
+ # verify the required parameter 'relative_path' is set
64
+ if @api_client.config.client_side_validation && relative_path.nil?
65
+ fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentModulemdApi.create"
66
+ end
67
+ if @api_client.config.client_side_validation && relative_path.to_s.length < 1
68
+ fail ArgumentError, 'invalid value for "relative_path" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
69
+ end
70
+
71
+ # verify the required parameter 'name' is set
72
+ if @api_client.config.client_side_validation && name.nil?
73
+ fail ArgumentError, "Missing the required parameter 'name' when calling ContentModulemdApi.create"
74
+ end
75
+ if @api_client.config.client_side_validation && name.to_s.length < 1
76
+ fail ArgumentError, 'invalid value for "name" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
77
+ end
78
+
79
+ # verify the required parameter 'stream' is set
80
+ if @api_client.config.client_side_validation && stream.nil?
81
+ fail ArgumentError, "Missing the required parameter 'stream' when calling ContentModulemdApi.create"
82
+ end
83
+ if @api_client.config.client_side_validation && stream.to_s.length < 1
84
+ fail ArgumentError, 'invalid value for "stream" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
85
+ end
86
+
87
+ # verify the required parameter 'version' is set
88
+ if @api_client.config.client_side_validation && version.nil?
89
+ fail ArgumentError, "Missing the required parameter 'version' when calling ContentModulemdApi.create"
90
+ end
91
+ if @api_client.config.client_side_validation && version.to_s.length < 1
92
+ fail ArgumentError, 'invalid value for "version" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
93
+ end
94
+
95
+ # verify the required parameter 'context' is set
96
+ if @api_client.config.client_side_validation && context.nil?
97
+ fail ArgumentError, "Missing the required parameter 'context' when calling ContentModulemdApi.create"
98
+ end
99
+ if @api_client.config.client_side_validation && context.to_s.length < 1
100
+ fail ArgumentError, 'invalid value for "context" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
101
+ end
102
+
103
+ # verify the required parameter 'arch' is set
104
+ if @api_client.config.client_side_validation && arch.nil?
105
+ fail ArgumentError, "Missing the required parameter 'arch' when calling ContentModulemdApi.create"
106
+ end
107
+ if @api_client.config.client_side_validation && arch.to_s.length < 1
108
+ fail ArgumentError, 'invalid value for "arch" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
109
+ end
110
+
111
+ # verify the required parameter 'artifacts' is set
112
+ if @api_client.config.client_side_validation && artifacts.nil?
113
+ fail ArgumentError, "Missing the required parameter 'artifacts' when calling ContentModulemdApi.create"
114
+ end
115
+ if @api_client.config.client_side_validation && artifacts.to_s.length < 1
116
+ fail ArgumentError, 'invalid value for "artifacts" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
117
+ end
118
+
119
+ # verify the required parameter 'dependencies' is set
120
+ if @api_client.config.client_side_validation && dependencies.nil?
121
+ fail ArgumentError, "Missing the required parameter 'dependencies' when calling ContentModulemdApi.create"
122
+ end
123
+ if @api_client.config.client_side_validation && dependencies.to_s.length < 1
124
+ fail ArgumentError, 'invalid value for "dependencies" when calling ContentModulemdApi.create, the character length must be great than or equal to 1.'
125
+ end
126
+
127
+ # resource path
128
+ local_var_path = '/pulp/api/v3/content/rpm/modulemd/'
129
+
130
+ # query parameters
131
+ query_params = opts[:query_params] || {}
132
+
133
+ # header parameters
134
+ header_params = opts[:header_params] || {}
135
+ # HTTP header 'Accept' (if needed)
136
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
137
+ # HTTP header 'Content-Type'
138
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
139
+
140
+ # form parameters
141
+ form_params = opts[:form_params] || {}
142
+ form_params['relative_path'] = relative_path
143
+ form_params['name'] = name
144
+ form_params['stream'] = stream
145
+ form_params['version'] = version
146
+ form_params['context'] = context
147
+ form_params['arch'] = arch
148
+ form_params['artifacts'] = artifacts
149
+ form_params['dependencies'] = dependencies
150
+ form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
151
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
152
+ form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
153
+ form_params['packages'] = @api_client.build_collection_param(opts[:'packages'], :csv) if !opts[:'packages'].nil?
154
+
155
+ # http body (model)
156
+ post_body = opts[:body]
157
+
158
+ # return_type
159
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
160
+
161
+ # auth_names
162
+ auth_names = opts[:auth_names] || ['Basic']
163
+
164
+ new_options = opts.merge(
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type
171
+ )
172
+
173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: ContentModulemdApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ return data, status_code, headers
178
+ end
179
+
180
+ # List modulemds
181
+ # ViewSet for Modulemd.
182
+ # @param [Hash] opts the optional parameters
183
+ # @option opts [String] :repository_version Repository Version referenced by HREF
184
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
185
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
186
+ # @option opts [Integer] :limit Number of results to return per page.
187
+ # @option opts [Integer] :offset The initial index from which to return the results.
188
+ # @option opts [String] :fields A list of fields to include in the response.
189
+ # @return [InlineResponse2002]
190
+ def list(opts = {})
191
+ data, _status_code, _headers = list_with_http_info(opts)
192
+ data
193
+ end
194
+
195
+ # List modulemds
196
+ # ViewSet for Modulemd.
197
+ # @param [Hash] opts the optional parameters
198
+ # @option opts [String] :repository_version Repository Version referenced by HREF
199
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
200
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
201
+ # @option opts [Integer] :limit Number of results to return per page.
202
+ # @option opts [Integer] :offset The initial index from which to return the results.
203
+ # @option opts [String] :fields A list of fields to include in the response.
204
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
205
+ def list_with_http_info(opts = {})
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug 'Calling API: ContentModulemdApi.list ...'
208
+ end
209
+ # resource path
210
+ local_var_path = '/pulp/api/v3/content/rpm/modulemd/'
211
+
212
+ # query parameters
213
+ query_params = opts[:query_params] || {}
214
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
215
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
216
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
217
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
218
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
219
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
220
+
221
+ # header parameters
222
+ header_params = opts[:header_params] || {}
223
+ # HTTP header 'Accept' (if needed)
224
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
225
+
226
+ # form parameters
227
+ form_params = opts[:form_params] || {}
228
+
229
+ # http body (model)
230
+ post_body = opts[:body]
231
+
232
+ # return_type
233
+ return_type = opts[:return_type] || 'InlineResponse2002'
234
+
235
+ # auth_names
236
+ auth_names = opts[:auth_names] || ['Basic']
237
+
238
+ new_options = opts.merge(
239
+ :header_params => header_params,
240
+ :query_params => query_params,
241
+ :form_params => form_params,
242
+ :body => post_body,
243
+ :auth_names => auth_names,
244
+ :return_type => return_type
245
+ )
246
+
247
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: ContentModulemdApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+
254
+ # Inspect a modulemd
255
+ # ViewSet for Modulemd.
256
+ # @param modulemd_href [String] URI of Modulemd. e.g.: /pulp/api/v3/content/rpm/modulemd/1/
257
+ # @param [Hash] opts the optional parameters
258
+ # @option opts [String] :fields A list of fields to include in the response.
259
+ # @return [Modulemd]
260
+ def read(modulemd_href, opts = {})
261
+ data, _status_code, _headers = read_with_http_info(modulemd_href, opts)
262
+ data
263
+ end
264
+
265
+ # Inspect a modulemd
266
+ # ViewSet for Modulemd.
267
+ # @param modulemd_href [String] URI of Modulemd. e.g.: /pulp/api/v3/content/rpm/modulemd/1/
268
+ # @param [Hash] opts the optional parameters
269
+ # @option opts [String] :fields A list of fields to include in the response.
270
+ # @return [Array<(Modulemd, Integer, Hash)>] Modulemd data, response status code and response headers
271
+ def read_with_http_info(modulemd_href, opts = {})
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug 'Calling API: ContentModulemdApi.read ...'
274
+ end
275
+ # verify the required parameter 'modulemd_href' is set
276
+ if @api_client.config.client_side_validation && modulemd_href.nil?
277
+ fail ArgumentError, "Missing the required parameter 'modulemd_href' when calling ContentModulemdApi.read"
278
+ end
279
+ # resource path
280
+ local_var_path = '{modulemd_href}'.sub('{' + 'modulemd_href' + '}', CGI.escape(modulemd_href.to_s).gsub('%2F', '/'))
281
+
282
+ # query parameters
283
+ query_params = opts[:query_params] || {}
284
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
285
+
286
+ # header parameters
287
+ header_params = opts[:header_params] || {}
288
+ # HTTP header 'Accept' (if needed)
289
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
290
+
291
+ # form parameters
292
+ form_params = opts[:form_params] || {}
293
+
294
+ # http body (model)
295
+ post_body = opts[:body]
296
+
297
+ # return_type
298
+ return_type = opts[:return_type] || 'Modulemd'
299
+
300
+ # auth_names
301
+ auth_names = opts[:auth_names] || ['Basic']
302
+
303
+ new_options = opts.merge(
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names,
309
+ :return_type => return_type
310
+ )
311
+
312
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug "API called: ContentModulemdApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
315
+ end
316
+ return data, status_code, headers
317
+ end
318
+ end
319
+ end