pulp_maven_client 0.25.1 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -4
- data/docs/ContentMavenIndexPageApi.md +341 -0
- data/docs/ContentPackageApi.md +6 -0
- data/docs/MavenMavenIndexPageResponse.md +32 -0
- data/docs/MavenMavenPackageResponse.md +2 -0
- data/docs/MavenPackageReleaseResponse.md +22 -0
- data/docs/MavenRepositoryMetricsResponse.md +22 -0
- data/docs/MavenRepositoryPackageResponse.md +24 -0
- data/docs/PaginatedMavenRepositoryPackageListResponse.md +24 -0
- data/docs/PaginatedmavenMavenIndexPageResponseList.md +24 -0
- data/docs/RepositoriesMavenApi.md +241 -0
- data/lib/pulp_maven_client/api/content_maven_index_page_api.rb +354 -0
- data/lib/pulp_maven_client/api/content_package_api.rb +9 -0
- data/lib/pulp_maven_client/api/repositories_maven_api.rb +222 -0
- data/lib/pulp_maven_client/models/maven_maven_index_page_response.rb +286 -0
- data/lib/pulp_maven_client/models/maven_maven_package_response.rb +11 -1
- data/lib/pulp_maven_client/models/maven_package_release_response.rb +257 -0
- data/lib/pulp_maven_client/models/maven_repository_metrics_response.rb +257 -0
- data/lib/pulp_maven_client/models/maven_repository_package_response.rb +278 -0
- data/lib/pulp_maven_client/models/nested_role.rb +1 -1
- data/lib/pulp_maven_client/models/nested_role_response.rb +1 -1
- data/lib/pulp_maven_client/models/paginated_maven_repository_package_list_response.rb +263 -0
- data/lib/pulp_maven_client/models/paginatedmaven_maven_index_page_response_list.rb +257 -0
- data/lib/pulp_maven_client/models/repository_add_remove_content.rb +1 -1
- data/lib/pulp_maven_client/models/repository_version_response.rb +1 -1
- data/lib/pulp_maven_client/version.rb +1 -1
- data/lib/pulp_maven_client.rb +7 -0
- data/spec/api/content_maven_index_page_api_spec.rb +104 -0
- data/spec/api/content_package_api_spec.rb +3 -0
- data/spec/api/repositories_maven_api_spec.rb +47 -0
- data/spec/models/maven_maven_index_page_response_spec.rb +78 -0
- data/spec/models/maven_maven_package_response_spec.rb +6 -0
- data/spec/models/maven_package_release_response_spec.rb +48 -0
- data/spec/models/maven_repository_metrics_response_spec.rb +48 -0
- data/spec/models/maven_repository_package_response_spec.rb +54 -0
- data/spec/models/paginated_maven_repository_package_list_response_spec.rb +54 -0
- data/spec/models/paginatedmaven_maven_index_page_response_list_spec.rb +54 -0
- metadata +60 -32
|
@@ -560,6 +560,81 @@ module PulpMavenClient
|
|
|
560
560
|
return data, status_code, headers
|
|
561
561
|
end
|
|
562
562
|
|
|
563
|
+
# Repository metrics
|
|
564
|
+
# Distinct counts for MavenPackage content in a repository version (latest complete version if repository_version is omitted). package_count is distinct (group_id, artifact_id). version_count is distinct (group_id, artifact_id, base_version) after rebuild-suffix strip. build_count is distinct (group_id, artifact_id, full version). Counts use MavenPackage (POM-backed GAV), not MavenArtifact files.
|
|
565
|
+
# @param maven_maven_repository_href [String]
|
|
566
|
+
# @param [Hash] opts the optional parameters
|
|
567
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
568
|
+
# @option opts [String] :repository_version HREF or PRN of a version of this repository. Defaults to the latest complete version.
|
|
569
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
570
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
571
|
+
# @return [MavenRepositoryMetricsResponse]
|
|
572
|
+
def metrics(maven_maven_repository_href, opts = {})
|
|
573
|
+
data, _status_code, _headers = metrics_with_http_info(maven_maven_repository_href, opts)
|
|
574
|
+
data
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# Repository metrics
|
|
578
|
+
# Distinct counts for MavenPackage content in a repository version (latest complete version if repository_version is omitted). package_count is distinct (group_id, artifact_id). version_count is distinct (group_id, artifact_id, base_version) after rebuild-suffix strip. build_count is distinct (group_id, artifact_id, full version). Counts use MavenPackage (POM-backed GAV), not MavenArtifact files.
|
|
579
|
+
# @param maven_maven_repository_href [String]
|
|
580
|
+
# @param [Hash] opts the optional parameters
|
|
581
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
582
|
+
# @option opts [String] :repository_version HREF or PRN of a version of this repository. Defaults to the latest complete version.
|
|
583
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
584
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
585
|
+
# @return [Array<(MavenRepositoryMetricsResponse, Integer, Hash)>] MavenRepositoryMetricsResponse data, response status code and response headers
|
|
586
|
+
def metrics_with_http_info(maven_maven_repository_href, opts = {})
|
|
587
|
+
if @api_client.config.debugging
|
|
588
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesMavenApi.metrics ...'
|
|
589
|
+
end
|
|
590
|
+
# verify the required parameter 'maven_maven_repository_href' is set
|
|
591
|
+
if @api_client.config.client_side_validation && maven_maven_repository_href.nil?
|
|
592
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_repository_href' when calling RepositoriesMavenApi.metrics"
|
|
593
|
+
end
|
|
594
|
+
# resource path
|
|
595
|
+
local_var_path = '{maven_maven_repository_href}metrics/'.sub('{' + 'maven_maven_repository_href' + '}', CGI.escape(maven_maven_repository_href.to_s).gsub('%2F', '/'))
|
|
596
|
+
|
|
597
|
+
# query parameters
|
|
598
|
+
query_params = opts[:query_params] || {}
|
|
599
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
600
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
601
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
602
|
+
|
|
603
|
+
# header parameters
|
|
604
|
+
header_params = opts[:header_params] || {}
|
|
605
|
+
# HTTP header 'Accept' (if needed)
|
|
606
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
607
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
608
|
+
|
|
609
|
+
# form parameters
|
|
610
|
+
form_params = opts[:form_params] || {}
|
|
611
|
+
|
|
612
|
+
# http body (model)
|
|
613
|
+
post_body = opts[:debug_body]
|
|
614
|
+
|
|
615
|
+
# return_type
|
|
616
|
+
return_type = opts[:debug_return_type] || 'MavenRepositoryMetricsResponse'
|
|
617
|
+
|
|
618
|
+
# auth_names
|
|
619
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
620
|
+
|
|
621
|
+
new_options = opts.merge(
|
|
622
|
+
:operation => :"RepositoriesMavenApi.metrics",
|
|
623
|
+
:header_params => header_params,
|
|
624
|
+
:query_params => query_params,
|
|
625
|
+
:form_params => form_params,
|
|
626
|
+
:body => post_body,
|
|
627
|
+
:auth_names => auth_names,
|
|
628
|
+
:return_type => return_type
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
632
|
+
if @api_client.config.debugging
|
|
633
|
+
@api_client.config.logger.debug "API called: RepositoriesMavenApi#metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
634
|
+
end
|
|
635
|
+
return data, status_code, headers
|
|
636
|
+
end
|
|
637
|
+
|
|
563
638
|
# Modify Repository Content
|
|
564
639
|
# Trigger an asynchronous task to create a new repository version.
|
|
565
640
|
# @param maven_maven_repository_href [String]
|
|
@@ -709,6 +784,87 @@ module PulpMavenClient
|
|
|
709
784
|
return data, status_code, headers
|
|
710
785
|
end
|
|
711
786
|
|
|
787
|
+
# List packages
|
|
788
|
+
# Return one row per distinct (group_id, artifact_id) in a repository version (latest complete version if repository_version is omitted). Pagination count is the number of distinct packages, not GAVs. Each row includes versions (logical version keys after rebuild-suffix strip) and latest_releases (newest rebuild per logical version). set(versions) === set(latest_releases[].version).
|
|
789
|
+
# @param maven_maven_repository_href [String]
|
|
790
|
+
# @param [Hash] opts the optional parameters
|
|
791
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
792
|
+
# @option opts [String] :artifact_id__istartswith Case-insensitive prefix on artifact_id.
|
|
793
|
+
# @option opts [String] :group_id__istartswith Case-insensitive prefix on group_id.
|
|
794
|
+
# @option opts [String] :repository_version HREF or PRN of a version of this repository. Defaults to the latest complete version.
|
|
795
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
796
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
797
|
+
# @return [PaginatedMavenRepositoryPackageListResponse]
|
|
798
|
+
def packages(maven_maven_repository_href, opts = {})
|
|
799
|
+
data, _status_code, _headers = packages_with_http_info(maven_maven_repository_href, opts)
|
|
800
|
+
data
|
|
801
|
+
end
|
|
802
|
+
|
|
803
|
+
# List packages
|
|
804
|
+
# Return one row per distinct (group_id, artifact_id) in a repository version (latest complete version if repository_version is omitted). Pagination count is the number of distinct packages, not GAVs. Each row includes versions (logical version keys after rebuild-suffix strip) and latest_releases (newest rebuild per logical version). set(versions) === set(latest_releases[].version).
|
|
805
|
+
# @param maven_maven_repository_href [String]
|
|
806
|
+
# @param [Hash] opts the optional parameters
|
|
807
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
808
|
+
# @option opts [String] :artifact_id__istartswith Case-insensitive prefix on artifact_id.
|
|
809
|
+
# @option opts [String] :group_id__istartswith Case-insensitive prefix on group_id.
|
|
810
|
+
# @option opts [String] :repository_version HREF or PRN of a version of this repository. Defaults to the latest complete version.
|
|
811
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
812
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
813
|
+
# @return [Array<(PaginatedMavenRepositoryPackageListResponse, Integer, Hash)>] PaginatedMavenRepositoryPackageListResponse data, response status code and response headers
|
|
814
|
+
def packages_with_http_info(maven_maven_repository_href, opts = {})
|
|
815
|
+
if @api_client.config.debugging
|
|
816
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesMavenApi.packages ...'
|
|
817
|
+
end
|
|
818
|
+
# verify the required parameter 'maven_maven_repository_href' is set
|
|
819
|
+
if @api_client.config.client_side_validation && maven_maven_repository_href.nil?
|
|
820
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_repository_href' when calling RepositoriesMavenApi.packages"
|
|
821
|
+
end
|
|
822
|
+
# resource path
|
|
823
|
+
local_var_path = '{maven_maven_repository_href}packages/'.sub('{' + 'maven_maven_repository_href' + '}', CGI.escape(maven_maven_repository_href.to_s).gsub('%2F', '/'))
|
|
824
|
+
|
|
825
|
+
# query parameters
|
|
826
|
+
query_params = opts[:query_params] || {}
|
|
827
|
+
query_params[:'artifact_id__istartswith'] = opts[:'artifact_id__istartswith'] if !opts[:'artifact_id__istartswith'].nil?
|
|
828
|
+
query_params[:'group_id__istartswith'] = opts[:'group_id__istartswith'] if !opts[:'group_id__istartswith'].nil?
|
|
829
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
830
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
831
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
832
|
+
|
|
833
|
+
# header parameters
|
|
834
|
+
header_params = opts[:header_params] || {}
|
|
835
|
+
# HTTP header 'Accept' (if needed)
|
|
836
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
837
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
838
|
+
|
|
839
|
+
# form parameters
|
|
840
|
+
form_params = opts[:form_params] || {}
|
|
841
|
+
|
|
842
|
+
# http body (model)
|
|
843
|
+
post_body = opts[:debug_body]
|
|
844
|
+
|
|
845
|
+
# return_type
|
|
846
|
+
return_type = opts[:debug_return_type] || 'PaginatedMavenRepositoryPackageListResponse'
|
|
847
|
+
|
|
848
|
+
# auth_names
|
|
849
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
850
|
+
|
|
851
|
+
new_options = opts.merge(
|
|
852
|
+
:operation => :"RepositoriesMavenApi.packages",
|
|
853
|
+
:header_params => header_params,
|
|
854
|
+
:query_params => query_params,
|
|
855
|
+
:form_params => form_params,
|
|
856
|
+
:body => post_body,
|
|
857
|
+
:auth_names => auth_names,
|
|
858
|
+
:return_type => return_type
|
|
859
|
+
)
|
|
860
|
+
|
|
861
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
862
|
+
if @api_client.config.debugging
|
|
863
|
+
@api_client.config.logger.debug "API called: RepositoriesMavenApi#packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
864
|
+
end
|
|
865
|
+
return data, status_code, headers
|
|
866
|
+
end
|
|
867
|
+
|
|
712
868
|
# Update a maven repository
|
|
713
869
|
# Update the entity partially and trigger an asynchronous task if necessary
|
|
714
870
|
# @param maven_maven_repository_href [String]
|
|
@@ -935,6 +1091,72 @@ module PulpMavenClient
|
|
|
935
1091
|
return data, status_code, headers
|
|
936
1092
|
end
|
|
937
1093
|
|
|
1094
|
+
# Repair index pages
|
|
1095
|
+
# Trigger an asynchronous task to generate (or regenerate) HTML directory index pages for every directory in the latest repository version. This is a one-time catch-up for repositories created before the pre-generation feature was deployed. After the task completes every directory URL will be served by a pre-generated page rather than the on-demand fallback.
|
|
1096
|
+
# @param maven_maven_repository_href [String]
|
|
1097
|
+
# @param [Hash] opts the optional parameters
|
|
1098
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
1099
|
+
# @return [AsyncOperationResponse]
|
|
1100
|
+
def repair_index_pages(maven_maven_repository_href, opts = {})
|
|
1101
|
+
data, _status_code, _headers = repair_index_pages_with_http_info(maven_maven_repository_href, opts)
|
|
1102
|
+
data
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1105
|
+
# Repair index pages
|
|
1106
|
+
# Trigger an asynchronous task to generate (or regenerate) HTML directory index pages for every directory in the latest repository version. This is a one-time catch-up for repositories created before the pre-generation feature was deployed. After the task completes every directory URL will be served by a pre-generated page rather than the on-demand fallback.
|
|
1107
|
+
# @param maven_maven_repository_href [String]
|
|
1108
|
+
# @param [Hash] opts the optional parameters
|
|
1109
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
1110
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
1111
|
+
def repair_index_pages_with_http_info(maven_maven_repository_href, opts = {})
|
|
1112
|
+
if @api_client.config.debugging
|
|
1113
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesMavenApi.repair_index_pages ...'
|
|
1114
|
+
end
|
|
1115
|
+
# verify the required parameter 'maven_maven_repository_href' is set
|
|
1116
|
+
if @api_client.config.client_side_validation && maven_maven_repository_href.nil?
|
|
1117
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_repository_href' when calling RepositoriesMavenApi.repair_index_pages"
|
|
1118
|
+
end
|
|
1119
|
+
# resource path
|
|
1120
|
+
local_var_path = '{maven_maven_repository_href}repair_index_pages/'.sub('{' + 'maven_maven_repository_href' + '}', CGI.escape(maven_maven_repository_href.to_s).gsub('%2F', '/'))
|
|
1121
|
+
|
|
1122
|
+
# query parameters
|
|
1123
|
+
query_params = opts[:query_params] || {}
|
|
1124
|
+
|
|
1125
|
+
# header parameters
|
|
1126
|
+
header_params = opts[:header_params] || {}
|
|
1127
|
+
# HTTP header 'Accept' (if needed)
|
|
1128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1129
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
1130
|
+
|
|
1131
|
+
# form parameters
|
|
1132
|
+
form_params = opts[:form_params] || {}
|
|
1133
|
+
|
|
1134
|
+
# http body (model)
|
|
1135
|
+
post_body = opts[:debug_body]
|
|
1136
|
+
|
|
1137
|
+
# return_type
|
|
1138
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
1139
|
+
|
|
1140
|
+
# auth_names
|
|
1141
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
1142
|
+
|
|
1143
|
+
new_options = opts.merge(
|
|
1144
|
+
:operation => :"RepositoriesMavenApi.repair_index_pages",
|
|
1145
|
+
:header_params => header_params,
|
|
1146
|
+
:query_params => query_params,
|
|
1147
|
+
:form_params => form_params,
|
|
1148
|
+
:body => post_body,
|
|
1149
|
+
:auth_names => auth_names,
|
|
1150
|
+
:return_type => return_type
|
|
1151
|
+
)
|
|
1152
|
+
|
|
1153
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1154
|
+
if @api_client.config.debugging
|
|
1155
|
+
@api_client.config.logger.debug "API called: RepositoriesMavenApi#repair_index_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1156
|
+
end
|
|
1157
|
+
return data, status_code, headers
|
|
1158
|
+
end
|
|
1159
|
+
|
|
938
1160
|
# Repair metadata
|
|
939
1161
|
# Trigger an asynchronous task to regenerate all maven-metadata.xml files and their checksums for every artifact in the repository.
|
|
940
1162
|
# @param maven_maven_repository_href [String]
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpMavenClient
|
|
17
|
+
# A read-only Serializer for MavenIndexPage.
|
|
18
|
+
class MavenMavenIndexPageResponse
|
|
19
|
+
attr_accessor :pulp_href
|
|
20
|
+
|
|
21
|
+
# The Pulp Resource Name (PRN).
|
|
22
|
+
attr_accessor :prn
|
|
23
|
+
|
|
24
|
+
# Timestamp of creation.
|
|
25
|
+
attr_accessor :pulp_created
|
|
26
|
+
|
|
27
|
+
# Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
|
|
28
|
+
attr_accessor :pulp_last_updated
|
|
29
|
+
|
|
30
|
+
# A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
31
|
+
attr_accessor :pulp_labels
|
|
32
|
+
|
|
33
|
+
attr_accessor :vuln_report
|
|
34
|
+
|
|
35
|
+
# Directory path this page indexes.
|
|
36
|
+
attr_accessor :path
|
|
37
|
+
|
|
38
|
+
# SHA256 digest of the HTML content.
|
|
39
|
+
attr_accessor :sha256
|
|
40
|
+
|
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'pulp_href' => :'pulp_href',
|
|
45
|
+
:'prn' => :'prn',
|
|
46
|
+
:'pulp_created' => :'pulp_created',
|
|
47
|
+
:'pulp_last_updated' => :'pulp_last_updated',
|
|
48
|
+
:'pulp_labels' => :'pulp_labels',
|
|
49
|
+
:'vuln_report' => :'vuln_report',
|
|
50
|
+
:'path' => :'path',
|
|
51
|
+
:'sha256' => :'sha256'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
def self.acceptable_attributes
|
|
57
|
+
attribute_map.values
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'pulp_href' => :'String',
|
|
64
|
+
:'prn' => :'String',
|
|
65
|
+
:'pulp_created' => :'Time',
|
|
66
|
+
:'pulp_last_updated' => :'Time',
|
|
67
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
68
|
+
:'vuln_report' => :'String',
|
|
69
|
+
:'path' => :'String',
|
|
70
|
+
:'sha256' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenIndexPageResponse` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenIndexPageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'pulp_href')
|
|
96
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'prn')
|
|
100
|
+
self.prn = attributes[:'prn']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'pulp_created')
|
|
104
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'pulp_last_updated')
|
|
108
|
+
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'pulp_labels')
|
|
112
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
113
|
+
self.pulp_labels = value
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'vuln_report')
|
|
118
|
+
self.vuln_report = attributes[:'vuln_report']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'path')
|
|
122
|
+
self.path = attributes[:'path']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'sha256')
|
|
126
|
+
self.sha256 = attributes[:'sha256']
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
131
|
+
# @return Array for valid properties with the reasons
|
|
132
|
+
def list_invalid_properties
|
|
133
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
134
|
+
invalid_properties = Array.new
|
|
135
|
+
invalid_properties
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Check to see if the all the properties in the model are valid
|
|
139
|
+
# @return true if the model is valid
|
|
140
|
+
def valid?
|
|
141
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Checks equality by comparing each attribute.
|
|
146
|
+
# @param [Object] Object to be compared
|
|
147
|
+
def ==(o)
|
|
148
|
+
return true if self.equal?(o)
|
|
149
|
+
self.class == o.class &&
|
|
150
|
+
pulp_href == o.pulp_href &&
|
|
151
|
+
prn == o.prn &&
|
|
152
|
+
pulp_created == o.pulp_created &&
|
|
153
|
+
pulp_last_updated == o.pulp_last_updated &&
|
|
154
|
+
pulp_labels == o.pulp_labels &&
|
|
155
|
+
vuln_report == o.vuln_report &&
|
|
156
|
+
path == o.path &&
|
|
157
|
+
sha256 == o.sha256
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# @see the `==` method
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def eql?(o)
|
|
163
|
+
self == o
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Calculates hash code according to all attributes.
|
|
167
|
+
# @return [Integer] Hash code
|
|
168
|
+
def hash
|
|
169
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, vuln_report, path, sha256].hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Builds the object from hash
|
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
+
# @return [Object] Returns the model itself
|
|
175
|
+
def self.build_from_hash(attributes)
|
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
+
transformed_hash = {}
|
|
179
|
+
openapi_types.each_pair do |key, type|
|
|
180
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
181
|
+
transformed_hash["#{key}"] = nil
|
|
182
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
183
|
+
# check to ensure the input is an array given that the attribute
|
|
184
|
+
# is documented as an array but the input is not
|
|
185
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
186
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
187
|
+
end
|
|
188
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
new(transformed_hash)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Deserializes the data based on type
|
|
196
|
+
# @param string type Data type
|
|
197
|
+
# @param string value Value to be deserialized
|
|
198
|
+
# @return [Object] Deserialized data
|
|
199
|
+
def self._deserialize(type, value)
|
|
200
|
+
case type.to_sym
|
|
201
|
+
when :Time
|
|
202
|
+
Time.parse(value)
|
|
203
|
+
when :Date
|
|
204
|
+
Date.parse(value)
|
|
205
|
+
when :String
|
|
206
|
+
value.to_s
|
|
207
|
+
when :Integer
|
|
208
|
+
value.to_i
|
|
209
|
+
when :Float
|
|
210
|
+
value.to_f
|
|
211
|
+
when :Boolean
|
|
212
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
213
|
+
true
|
|
214
|
+
else
|
|
215
|
+
false
|
|
216
|
+
end
|
|
217
|
+
when :Object
|
|
218
|
+
# generic object (usually a Hash), return directly
|
|
219
|
+
value
|
|
220
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
221
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
222
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
223
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
224
|
+
k_type = Regexp.last_match[:k_type]
|
|
225
|
+
v_type = Regexp.last_match[:v_type]
|
|
226
|
+
{}.tap do |hash|
|
|
227
|
+
value.each do |k, v|
|
|
228
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
else # model
|
|
232
|
+
# models (e.g. Pet) or oneOf
|
|
233
|
+
klass = PulpMavenClient.const_get(type)
|
|
234
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Returns the string representation of the object
|
|
239
|
+
# @return [String] String presentation of the object
|
|
240
|
+
def to_s
|
|
241
|
+
to_hash.to_s
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
|
246
|
+
def to_body
|
|
247
|
+
to_hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
if value.nil?
|
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
hash[param] = _to_hash(value)
|
|
262
|
+
end
|
|
263
|
+
hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Outputs non-array value in the form of hash
|
|
267
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
268
|
+
# @param [Object] value Any valid value
|
|
269
|
+
# @return [Hash] Returns the value in the form of hash
|
|
270
|
+
def _to_hash(value)
|
|
271
|
+
if value.is_a?(Array)
|
|
272
|
+
value.compact.map { |v| _to_hash(v) }
|
|
273
|
+
elsif value.is_a?(Hash)
|
|
274
|
+
{}.tap do |hash|
|
|
275
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
276
|
+
end
|
|
277
|
+
elsif value.respond_to? :to_hash
|
|
278
|
+
value.to_hash
|
|
279
|
+
else
|
|
280
|
+
value
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
end
|
|
@@ -41,6 +41,9 @@ module PulpMavenClient
|
|
|
41
41
|
# Version of the package.
|
|
42
42
|
attr_accessor :version
|
|
43
43
|
|
|
44
|
+
# The package version with a trailing rebuild suffix stripped (matching \\.[a-zA-Z]+-\\d+$). Equal to version when no suffix is present.
|
|
45
|
+
attr_accessor :base_version
|
|
46
|
+
|
|
44
47
|
# Human-readable name from the POM.
|
|
45
48
|
attr_accessor :name
|
|
46
49
|
|
|
@@ -72,6 +75,7 @@ module PulpMavenClient
|
|
|
72
75
|
:'group_id' => :'group_id',
|
|
73
76
|
:'artifact_id' => :'artifact_id',
|
|
74
77
|
:'version' => :'version',
|
|
78
|
+
:'base_version' => :'base_version',
|
|
75
79
|
:'name' => :'name',
|
|
76
80
|
:'description' => :'description',
|
|
77
81
|
:'packaging' => :'packaging',
|
|
@@ -99,6 +103,7 @@ module PulpMavenClient
|
|
|
99
103
|
:'group_id' => :'String',
|
|
100
104
|
:'artifact_id' => :'String',
|
|
101
105
|
:'version' => :'String',
|
|
106
|
+
:'base_version' => :'String',
|
|
102
107
|
:'name' => :'String',
|
|
103
108
|
:'description' => :'String',
|
|
104
109
|
:'packaging' => :'String',
|
|
@@ -175,6 +180,10 @@ module PulpMavenClient
|
|
|
175
180
|
self.version = attributes[:'version']
|
|
176
181
|
end
|
|
177
182
|
|
|
183
|
+
if attributes.key?(:'base_version')
|
|
184
|
+
self.base_version = attributes[:'base_version']
|
|
185
|
+
end
|
|
186
|
+
|
|
178
187
|
if attributes.key?(:'name')
|
|
179
188
|
self.name = attributes[:'name']
|
|
180
189
|
end
|
|
@@ -233,6 +242,7 @@ module PulpMavenClient
|
|
|
233
242
|
group_id == o.group_id &&
|
|
234
243
|
artifact_id == o.artifact_id &&
|
|
235
244
|
version == o.version &&
|
|
245
|
+
base_version == o.base_version &&
|
|
236
246
|
name == o.name &&
|
|
237
247
|
description == o.description &&
|
|
238
248
|
packaging == o.packaging &&
|
|
@@ -251,7 +261,7 @@ module PulpMavenClient
|
|
|
251
261
|
# Calculates hash code according to all attributes.
|
|
252
262
|
# @return [Integer] Hash code
|
|
253
263
|
def hash
|
|
254
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, vuln_report, group_id, artifact_id, version, name, description, packaging, url, licenses, dependencies, scm_url].hash
|
|
264
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, vuln_report, group_id, artifact_id, version, base_version, name, description, packaging, url, licenses, dependencies, scm_url].hash
|
|
255
265
|
end
|
|
256
266
|
|
|
257
267
|
# Builds the object from hash
|