pulp_ostree_client 2.4.5 → 2.4.6
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 +16 -12
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentCommitsApi.md +80 -47
- data/docs/ContentConfigsApi.md +79 -46
- data/docs/ContentContentApi.md +107 -57
- data/docs/ContentObjectsApi.md +80 -47
- data/docs/ContentRefsApi.md +90 -57
- data/docs/ContentSummariesApi.md +79 -46
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsOstreeApi.md +385 -182
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/OstreeImportAll.md +10 -9
- data/docs/OstreeImportCommitsToRef.md +12 -11
- data/docs/OstreeOstreeCommitResponse.md +24 -23
- data/docs/OstreeOstreeConfigResponse.md +18 -17
- data/docs/OstreeOstreeContent.md +14 -13
- data/docs/OstreeOstreeContentResponse.md +20 -19
- data/docs/OstreeOstreeDistribution.md +20 -19
- data/docs/OstreeOstreeDistributionResponse.md +32 -31
- data/docs/OstreeOstreeObjectResponse.md +22 -21
- data/docs/OstreeOstreeRefResponse.md +24 -23
- data/docs/OstreeOstreeRemote.md +54 -53
- data/docs/OstreeOstreeRemoteResponse.md +54 -53
- data/docs/OstreeOstreeRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/OstreeOstreeRepository.md +18 -17
- data/docs/OstreeOstreeRepositoryResponse.md +30 -29
- data/docs/OstreeOstreeSummaryResponse.md +18 -17
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeCommitResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeConfigResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeContentResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeDistributionResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeObjectResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRefResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRemoteResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRepositoryResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeSummaryResponseList.md +14 -13
- data/docs/PatchedostreeOstreeDistribution.md +20 -19
- data/docs/PatchedostreeOstreeRemote.md +54 -53
- data/docs/PatchedostreeOstreeRepository.md +18 -17
- data/docs/PolicyEnum.md +4 -5
- data/docs/RemotesOstreeApi.md +389 -184
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesOstreeApi.md +502 -231
- data/docs/RepositoriesOstreeVersionsApi.md +152 -82
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositorySyncURL.md +10 -9
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_ostree_client/api/content_commits_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_configs_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_content_api.rb +20 -14
- data/lib/pulp_ostree_client/api/content_objects_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_refs_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_summaries_api.rb +11 -9
- data/lib/pulp_ostree_client/api/distributions_ostree_api.rb +89 -56
- data/lib/pulp_ostree_client/api/remotes_ostree_api.rb +104 -68
- data/lib/pulp_ostree_client/api/repositories_ostree_api.rb +125 -76
- data/lib/pulp_ostree_client/api/repositories_ostree_versions_api.rb +40 -30
- data/lib/pulp_ostree_client/api_client.rb +137 -102
- data/lib/pulp_ostree_client/api_error.rb +2 -1
- data/lib/pulp_ostree_client/configuration.rb +162 -21
- data/lib/pulp_ostree_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_ostree_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_ostree_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_ostree_client/models/nested_role.rb +32 -22
- data/lib/pulp_ostree_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_ostree_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_ostree_client/models/ostree_import_all.rb +34 -22
- data/lib/pulp_ostree_client/models/ostree_import_commits_to_ref.rb +36 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_commit_response.rb +40 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_config_response.rb +36 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_content.rb +36 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_content_response.rb +38 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution.rb +34 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution_response.rb +36 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_object_response.rb +40 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_ref_response.rb +40 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_remote.rb +61 -23
- data/lib/pulp_ostree_client/models/ostree_ostree_remote_response.rb +64 -26
- data/lib/pulp_ostree_client/models/{ostree_ostree_remote_response_hidden_fields.rb → ostree_ostree_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_repository.rb +32 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_repository_response.rb +34 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_summary_response.rb +36 -24
- data/lib/pulp_ostree_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_commit_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_config_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_content_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_distribution_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_object_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_ref_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_remote_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_repository_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_summary_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/patchedostree_ostree_distribution.rb +40 -24
- data/lib/pulp_ostree_client/models/patchedostree_ostree_remote.rb +67 -25
- data/lib/pulp_ostree_client/models/patchedostree_ostree_repository.rb +35 -23
- data/lib/pulp_ostree_client/models/policy_enum.rb +8 -4
- data/lib/pulp_ostree_client/models/repair.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_ostree_client/models/set_label.rb +34 -22
- data/lib/pulp_ostree_client/models/set_label_response.rb +34 -22
- data/lib/pulp_ostree_client/models/unset_label.rb +32 -22
- data/lib/pulp_ostree_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_ostree_client/version.rb +2 -2
- data/lib/pulp_ostree_client.rb +2 -2
- data/pulp_ostree_client.gemspec +9 -6
- data/spec/api/content_commits_api_spec.rb +3 -3
- data/spec/api/content_configs_api_spec.rb +3 -3
- data/spec/api/content_content_api_spec.rb +4 -4
- data/spec/api/content_objects_api_spec.rb +3 -3
- data/spec/api/content_refs_api_spec.rb +3 -3
- data/spec/api/content_summaries_api_spec.rb +3 -3
- data/spec/api/distributions_ostree_api_spec.rb +13 -13
- data/spec/api/remotes_ostree_api_spec.rb +20 -19
- data/spec/api/repositories_ostree_api_spec.rb +17 -17
- data/spec/api/repositories_ostree_versions_api_spec.rb +12 -11
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/ostree_import_all_spec.rb +8 -13
- data/spec/models/ostree_import_commits_to_ref_spec.rb +9 -14
- data/spec/models/ostree_ostree_commit_response_spec.rb +15 -20
- data/spec/models/ostree_ostree_config_response_spec.rb +12 -17
- data/spec/models/ostree_ostree_content_response_spec.rb +13 -18
- data/spec/models/ostree_ostree_content_spec.rb +10 -15
- data/spec/models/ostree_ostree_distribution_response_spec.rb +19 -24
- data/spec/models/ostree_ostree_distribution_spec.rb +13 -18
- data/spec/models/ostree_ostree_object_response_spec.rb +14 -19
- data/spec/models/ostree_ostree_ref_response_spec.rb +15 -20
- data/spec/models/{ostree_ostree_remote_response_hidden_fields_spec.rb → ostree_ostree_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/ostree_ostree_remote_response_spec.rb +30 -35
- data/spec/models/ostree_ostree_remote_spec.rb +30 -35
- data/spec/models/ostree_ostree_repository_response_spec.rb +18 -23
- data/spec/models/ostree_ostree_repository_spec.rb +12 -17
- data/spec/models/ostree_ostree_summary_response_spec.rb +12 -17
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_commit_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_config_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_content_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_object_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_ref_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_summary_response_list_spec.rb +10 -15
- data/spec/models/patchedostree_ostree_distribution_spec.rb +13 -18
- data/spec/models/patchedostree_ostree_remote_spec.rb +30 -35
- data/spec/models/patchedostree_ostree_repository_spec.rb +12 -17
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_sync_url_spec.rb +8 -13
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +84 -60
- data/docs/OstreeOstreeRemoteResponseHiddenFields.md +0 -19
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpOstreeClient
|
16
17
|
# A Serializer class for a remote OSTree repository.
|
@@ -86,6 +87,28 @@ module PulpOstreeClient
|
|
86
87
|
# A list of tags to exclude during a sync. The wildcards *, ? are recognized. 'exclude_refs' is evaluated after 'include_refs'.
|
87
88
|
attr_accessor :exclude_refs
|
88
89
|
|
90
|
+
class EnumAttributeValidator
|
91
|
+
attr_reader :datatype
|
92
|
+
attr_reader :allowable_values
|
93
|
+
|
94
|
+
def initialize(datatype, allowable_values)
|
95
|
+
@allowable_values = allowable_values.map do |value|
|
96
|
+
case datatype.to_s
|
97
|
+
when /Integer/i
|
98
|
+
value.to_i
|
99
|
+
when /Float/i
|
100
|
+
value.to_f
|
101
|
+
else
|
102
|
+
value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def valid?(value)
|
108
|
+
!value || allowable_values.include?(value)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
89
112
|
# Attribute mapping from ruby-style variable name to JSON key.
|
90
113
|
def self.attribute_map
|
91
114
|
{
|
@@ -116,6 +139,11 @@ module PulpOstreeClient
|
|
116
139
|
}
|
117
140
|
end
|
118
141
|
|
142
|
+
# Returns all the JSON keys this model knows about
|
143
|
+
def self.acceptable_attributes
|
144
|
+
attribute_map.values
|
145
|
+
end
|
146
|
+
|
119
147
|
# Attribute type mapping.
|
120
148
|
def self.openapi_types
|
121
149
|
{
|
@@ -186,10 +214,14 @@ module PulpOstreeClient
|
|
186
214
|
|
187
215
|
if attributes.key?(:'name')
|
188
216
|
self.name = attributes[:'name']
|
217
|
+
else
|
218
|
+
self.name = nil
|
189
219
|
end
|
190
220
|
|
191
221
|
if attributes.key?(:'url')
|
192
222
|
self.url = attributes[:'url']
|
223
|
+
else
|
224
|
+
self.url = nil
|
193
225
|
end
|
194
226
|
|
195
227
|
if attributes.key?(:'ca_cert')
|
@@ -294,6 +326,7 @@ module PulpOstreeClient
|
|
294
326
|
# Show invalid properties with the reasons. Usually used together with valid?
|
295
327
|
# @return Array for valid properties with the reasons
|
296
328
|
def list_invalid_properties
|
329
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
297
330
|
invalid_properties = Array.new
|
298
331
|
if @name.nil?
|
299
332
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -373,6 +406,7 @@ module PulpOstreeClient
|
|
373
406
|
# Check to see if the all the properties in the model are valid
|
374
407
|
# @return true if the model is valid
|
375
408
|
def valid?
|
409
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
376
410
|
return false if @name.nil?
|
377
411
|
return false if @name.to_s.length < 1
|
378
412
|
return false if @url.nil?
|
@@ -555,7 +589,11 @@ module PulpOstreeClient
|
|
555
589
|
# Custom attribute writer method with validation
|
556
590
|
# @param [Object] depth Value to be assigned
|
557
591
|
def depth=(depth)
|
558
|
-
if
|
592
|
+
if depth.nil?
|
593
|
+
fail ArgumentError, 'depth cannot be nil'
|
594
|
+
end
|
595
|
+
|
596
|
+
if depth < 0
|
559
597
|
fail ArgumentError, 'invalid value for "depth", must be greater than or equal to 0.'
|
560
598
|
end
|
561
599
|
|
@@ -609,37 +647,33 @@ module PulpOstreeClient
|
|
609
647
|
# @param [Hash] attributes Model attributes in the form of hash
|
610
648
|
# @return [Object] Returns the model itself
|
611
649
|
def self.build_from_hash(attributes)
|
612
|
-
new.build_from_hash(attributes)
|
613
|
-
end
|
614
|
-
|
615
|
-
# Builds the object from hash
|
616
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
617
|
-
# @return [Object] Returns the model itself
|
618
|
-
def build_from_hash(attributes)
|
619
650
|
return nil unless attributes.is_a?(Hash)
|
620
|
-
|
621
|
-
|
651
|
+
attributes = attributes.transform_keys(&:to_sym)
|
652
|
+
transformed_hash = {}
|
653
|
+
openapi_types.each_pair do |key, type|
|
654
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
655
|
+
transformed_hash["#{key}"] = nil
|
656
|
+
elsif type =~ /\AArray<(.*)>/i
|
622
657
|
# check to ensure the input is an array given that the attribute
|
623
658
|
# is documented as an array but the input is not
|
624
|
-
if attributes[
|
625
|
-
|
659
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
660
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
626
661
|
end
|
627
|
-
elsif !attributes[
|
628
|
-
|
629
|
-
end
|
662
|
+
elsif !attributes[attribute_map[key]].nil?
|
663
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
664
|
+
end
|
630
665
|
end
|
631
|
-
|
632
|
-
self
|
666
|
+
new(transformed_hash)
|
633
667
|
end
|
634
668
|
|
635
669
|
# Deserializes the data based on type
|
636
670
|
# @param string type Data type
|
637
671
|
# @param string value Value to be deserialized
|
638
672
|
# @return [Object] Deserialized data
|
639
|
-
def _deserialize(type, value)
|
673
|
+
def self._deserialize(type, value)
|
640
674
|
case type.to_sym
|
641
|
-
when :
|
642
|
-
|
675
|
+
when :Time
|
676
|
+
Time.parse(value)
|
643
677
|
when :Date
|
644
678
|
Date.parse(value)
|
645
679
|
when :String
|
@@ -669,7 +703,9 @@ module PulpOstreeClient
|
|
669
703
|
end
|
670
704
|
end
|
671
705
|
else # model
|
672
|
-
|
706
|
+
# models (e.g. Pet) or oneOf
|
707
|
+
klass = PulpOstreeClient.const_get(type)
|
708
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
673
709
|
end
|
674
710
|
end
|
675
711
|
|
@@ -695,7 +731,7 @@ module PulpOstreeClient
|
|
695
731
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
696
732
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
697
733
|
end
|
698
|
-
|
734
|
+
|
699
735
|
hash[param] = _to_hash(value)
|
700
736
|
end
|
701
737
|
hash
|
@@ -718,5 +754,7 @@ module PulpOstreeClient
|
|
718
754
|
value
|
719
755
|
end
|
720
756
|
end
|
757
|
+
|
721
758
|
end
|
759
|
+
|
722
760
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpOstreeClient
|
16
17
|
# A Serializer class for a remote OSTree repository.
|
@@ -85,6 +86,28 @@ module PulpOstreeClient
|
|
85
86
|
# A list of tags to exclude during a sync. The wildcards *, ? are recognized. 'exclude_refs' is evaluated after 'include_refs'.
|
86
87
|
attr_accessor :exclude_refs
|
87
88
|
|
89
|
+
class EnumAttributeValidator
|
90
|
+
attr_reader :datatype
|
91
|
+
attr_reader :allowable_values
|
92
|
+
|
93
|
+
def initialize(datatype, allowable_values)
|
94
|
+
@allowable_values = allowable_values.map do |value|
|
95
|
+
case datatype.to_s
|
96
|
+
when /Integer/i
|
97
|
+
value.to_i
|
98
|
+
when /Float/i
|
99
|
+
value.to_f
|
100
|
+
else
|
101
|
+
value
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def valid?(value)
|
107
|
+
!value || allowable_values.include?(value)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
88
111
|
# Attribute mapping from ruby-style variable name to JSON key.
|
89
112
|
def self.attribute_map
|
90
113
|
{
|
@@ -115,13 +138,18 @@ module PulpOstreeClient
|
|
115
138
|
}
|
116
139
|
end
|
117
140
|
|
141
|
+
# Returns all the JSON keys this model knows about
|
142
|
+
def self.acceptable_attributes
|
143
|
+
attribute_map.values
|
144
|
+
end
|
145
|
+
|
118
146
|
# Attribute type mapping.
|
119
147
|
def self.openapi_types
|
120
148
|
{
|
121
149
|
:'pulp_href' => :'String',
|
122
150
|
:'prn' => :'String',
|
123
|
-
:'pulp_created' => :'
|
124
|
-
:'pulp_last_updated' => :'
|
151
|
+
:'pulp_created' => :'Time',
|
152
|
+
:'pulp_last_updated' => :'Time',
|
125
153
|
:'name' => :'String',
|
126
154
|
:'url' => :'String',
|
127
155
|
:'ca_cert' => :'String',
|
@@ -138,7 +166,7 @@ module PulpOstreeClient
|
|
138
166
|
:'sock_read_timeout' => :'Float',
|
139
167
|
:'headers' => :'Array<Object>',
|
140
168
|
:'rate_limit' => :'Integer',
|
141
|
-
:'hidden_fields' => :'Array<
|
169
|
+
:'hidden_fields' => :'Array<OstreeOstreeRemoteResponseHiddenFieldsInner>',
|
142
170
|
:'depth' => :'Integer',
|
143
171
|
:'include_refs' => :'Array<String>',
|
144
172
|
:'exclude_refs' => :'Array<String>'
|
@@ -196,10 +224,14 @@ module PulpOstreeClient
|
|
196
224
|
|
197
225
|
if attributes.key?(:'name')
|
198
226
|
self.name = attributes[:'name']
|
227
|
+
else
|
228
|
+
self.name = nil
|
199
229
|
end
|
200
230
|
|
201
231
|
if attributes.key?(:'url')
|
202
232
|
self.url = attributes[:'url']
|
233
|
+
else
|
234
|
+
self.url = nil
|
203
235
|
end
|
204
236
|
|
205
237
|
if attributes.key?(:'ca_cert')
|
@@ -290,6 +322,7 @@ module PulpOstreeClient
|
|
290
322
|
# Show invalid properties with the reasons. Usually used together with valid?
|
291
323
|
# @return Array for valid properties with the reasons
|
292
324
|
def list_invalid_properties
|
325
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
293
326
|
invalid_properties = Array.new
|
294
327
|
if @name.nil?
|
295
328
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -329,6 +362,7 @@ module PulpOstreeClient
|
|
329
362
|
# Check to see if the all the properties in the model are valid
|
330
363
|
# @return true if the model is valid
|
331
364
|
def valid?
|
365
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
332
366
|
return false if @name.nil?
|
333
367
|
return false if @url.nil?
|
334
368
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
@@ -393,7 +427,11 @@ module PulpOstreeClient
|
|
393
427
|
# Custom attribute writer method with validation
|
394
428
|
# @param [Object] depth Value to be assigned
|
395
429
|
def depth=(depth)
|
396
|
-
if
|
430
|
+
if depth.nil?
|
431
|
+
fail ArgumentError, 'depth cannot be nil'
|
432
|
+
end
|
433
|
+
|
434
|
+
if depth < 0
|
397
435
|
fail ArgumentError, 'invalid value for "depth", must be greater than or equal to 0.'
|
398
436
|
end
|
399
437
|
|
@@ -447,37 +485,33 @@ module PulpOstreeClient
|
|
447
485
|
# @param [Hash] attributes Model attributes in the form of hash
|
448
486
|
# @return [Object] Returns the model itself
|
449
487
|
def self.build_from_hash(attributes)
|
450
|
-
new.build_from_hash(attributes)
|
451
|
-
end
|
452
|
-
|
453
|
-
# Builds the object from hash
|
454
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
455
|
-
# @return [Object] Returns the model itself
|
456
|
-
def build_from_hash(attributes)
|
457
488
|
return nil unless attributes.is_a?(Hash)
|
458
|
-
|
459
|
-
|
489
|
+
attributes = attributes.transform_keys(&:to_sym)
|
490
|
+
transformed_hash = {}
|
491
|
+
openapi_types.each_pair do |key, type|
|
492
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
493
|
+
transformed_hash["#{key}"] = nil
|
494
|
+
elsif type =~ /\AArray<(.*)>/i
|
460
495
|
# check to ensure the input is an array given that the attribute
|
461
496
|
# is documented as an array but the input is not
|
462
|
-
if attributes[
|
463
|
-
|
497
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
498
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
464
499
|
end
|
465
|
-
elsif !attributes[
|
466
|
-
|
467
|
-
end
|
500
|
+
elsif !attributes[attribute_map[key]].nil?
|
501
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
502
|
+
end
|
468
503
|
end
|
469
|
-
|
470
|
-
self
|
504
|
+
new(transformed_hash)
|
471
505
|
end
|
472
506
|
|
473
507
|
# Deserializes the data based on type
|
474
508
|
# @param string type Data type
|
475
509
|
# @param string value Value to be deserialized
|
476
510
|
# @return [Object] Deserialized data
|
477
|
-
def _deserialize(type, value)
|
511
|
+
def self._deserialize(type, value)
|
478
512
|
case type.to_sym
|
479
|
-
when :
|
480
|
-
|
513
|
+
when :Time
|
514
|
+
Time.parse(value)
|
481
515
|
when :Date
|
482
516
|
Date.parse(value)
|
483
517
|
when :String
|
@@ -507,7 +541,9 @@ module PulpOstreeClient
|
|
507
541
|
end
|
508
542
|
end
|
509
543
|
else # model
|
510
|
-
|
544
|
+
# models (e.g. Pet) or oneOf
|
545
|
+
klass = PulpOstreeClient.const_get(type)
|
546
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
511
547
|
end
|
512
548
|
end
|
513
549
|
|
@@ -533,7 +569,7 @@ module PulpOstreeClient
|
|
533
569
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
534
570
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
535
571
|
end
|
536
|
-
|
572
|
+
|
537
573
|
hash[param] = _to_hash(value)
|
538
574
|
end
|
539
575
|
hash
|
@@ -556,5 +592,7 @@ module PulpOstreeClient
|
|
556
592
|
value
|
557
593
|
end
|
558
594
|
end
|
595
|
+
|
559
596
|
end
|
597
|
+
|
560
598
|
end
|
@@ -6,14 +6,15 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpOstreeClient
|
16
|
-
class
|
17
|
+
class OstreeOstreeRemoteResponseHiddenFieldsInner
|
17
18
|
attr_accessor :name
|
18
19
|
|
19
20
|
attr_accessor :is_set
|
@@ -26,6 +27,11 @@ module PulpOstreeClient
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -44,29 +50,34 @@ module PulpOstreeClient
|
|
44
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
45
51
|
def initialize(attributes = {})
|
46
52
|
if (!attributes.is_a?(Hash))
|
47
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::OstreeOstreeRemoteResponseHiddenFieldsInner` initialize method"
|
48
54
|
end
|
49
55
|
|
50
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
51
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpOstreeClient::
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpOstreeClient::OstreeOstreeRemoteResponseHiddenFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
60
|
end
|
55
61
|
h[k.to_sym] = v
|
56
62
|
}
|
57
63
|
|
58
64
|
if attributes.key?(:'name')
|
59
65
|
self.name = attributes[:'name']
|
66
|
+
else
|
67
|
+
self.name = nil
|
60
68
|
end
|
61
69
|
|
62
70
|
if attributes.key?(:'is_set')
|
63
71
|
self.is_set = attributes[:'is_set']
|
72
|
+
else
|
73
|
+
self.is_set = nil
|
64
74
|
end
|
65
75
|
end
|
66
76
|
|
67
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
78
|
# @return Array for valid properties with the reasons
|
69
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
81
|
invalid_properties = Array.new
|
71
82
|
if @name.nil?
|
72
83
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -82,6 +93,7 @@ module PulpOstreeClient
|
|
82
93
|
# Check to see if the all the properties in the model are valid
|
83
94
|
# @return true if the model is valid
|
84
95
|
def valid?
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
97
|
return false if @name.nil?
|
86
98
|
return false if @is_set.nil?
|
87
99
|
true
|
@@ -112,37 +124,33 @@ module PulpOstreeClient
|
|
112
124
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
125
|
# @return [Object] Returns the model itself
|
114
126
|
def self.build_from_hash(attributes)
|
115
|
-
new.build_from_hash(attributes)
|
116
|
-
end
|
117
|
-
|
118
|
-
# Builds the object from hash
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
-
# @return [Object] Returns the model itself
|
121
|
-
def build_from_hash(attributes)
|
122
127
|
return nil unless attributes.is_a?(Hash)
|
123
|
-
|
124
|
-
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
129
|
+
transformed_hash = {}
|
130
|
+
openapi_types.each_pair do |key, type|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
132
|
+
transformed_hash["#{key}"] = nil
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
125
134
|
# check to ensure the input is an array given that the attribute
|
126
135
|
# is documented as an array but the input is not
|
127
|
-
if attributes[
|
128
|
-
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
129
138
|
end
|
130
|
-
elsif !attributes[
|
131
|
-
|
132
|
-
end
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
141
|
+
end
|
133
142
|
end
|
134
|
-
|
135
|
-
self
|
143
|
+
new(transformed_hash)
|
136
144
|
end
|
137
145
|
|
138
146
|
# Deserializes the data based on type
|
139
147
|
# @param string type Data type
|
140
148
|
# @param string value Value to be deserialized
|
141
149
|
# @return [Object] Deserialized data
|
142
|
-
def _deserialize(type, value)
|
150
|
+
def self._deserialize(type, value)
|
143
151
|
case type.to_sym
|
144
|
-
when :
|
145
|
-
|
152
|
+
when :Time
|
153
|
+
Time.parse(value)
|
146
154
|
when :Date
|
147
155
|
Date.parse(value)
|
148
156
|
when :String
|
@@ -172,7 +180,9 @@ module PulpOstreeClient
|
|
172
180
|
end
|
173
181
|
end
|
174
182
|
else # model
|
175
|
-
|
183
|
+
# models (e.g. Pet) or oneOf
|
184
|
+
klass = PulpOstreeClient.const_get(type)
|
185
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
186
|
end
|
177
187
|
end
|
178
188
|
|
@@ -198,7 +208,7 @@ module PulpOstreeClient
|
|
198
208
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
209
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
210
|
end
|
201
|
-
|
211
|
+
|
202
212
|
hash[param] = _to_hash(value)
|
203
213
|
end
|
204
214
|
hash
|
@@ -221,5 +231,7 @@ module PulpOstreeClient
|
|
221
231
|
value
|
222
232
|
end
|
223
233
|
end
|
234
|
+
|
224
235
|
end
|
236
|
+
|
225
237
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpOstreeClient
|
16
17
|
# A Serializer class for an OSTree repository.
|
@@ -43,6 +44,11 @@ module PulpOstreeClient
|
|
43
44
|
}
|
44
45
|
end
|
45
46
|
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
def self.acceptable_attributes
|
49
|
+
attribute_map.values
|
50
|
+
end
|
51
|
+
|
46
52
|
# Attribute type mapping.
|
47
53
|
def self.openapi_types
|
48
54
|
{
|
@@ -87,6 +93,8 @@ module PulpOstreeClient
|
|
87
93
|
|
88
94
|
if attributes.key?(:'name')
|
89
95
|
self.name = attributes[:'name']
|
96
|
+
else
|
97
|
+
self.name = nil
|
90
98
|
end
|
91
99
|
|
92
100
|
if attributes.key?(:'description')
|
@@ -111,6 +119,7 @@ module PulpOstreeClient
|
|
111
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
112
120
|
# @return Array for valid properties with the reasons
|
113
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
114
123
|
invalid_properties = Array.new
|
115
124
|
if @name.nil?
|
116
125
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -134,6 +143,7 @@ module PulpOstreeClient
|
|
134
143
|
# Check to see if the all the properties in the model are valid
|
135
144
|
# @return true if the model is valid
|
136
145
|
def valid?
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
137
147
|
return false if @name.nil?
|
138
148
|
return false if @name.to_s.length < 1
|
139
149
|
return false if !@description.nil? && @description.to_s.length < 1
|
@@ -204,37 +214,33 @@ module PulpOstreeClient
|
|
204
214
|
# @param [Hash] attributes Model attributes in the form of hash
|
205
215
|
# @return [Object] Returns the model itself
|
206
216
|
def self.build_from_hash(attributes)
|
207
|
-
new.build_from_hash(attributes)
|
208
|
-
end
|
209
|
-
|
210
|
-
# Builds the object from hash
|
211
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
-
# @return [Object] Returns the model itself
|
213
|
-
def build_from_hash(attributes)
|
214
217
|
return nil unless attributes.is_a?(Hash)
|
215
|
-
|
216
|
-
|
218
|
+
attributes = attributes.transform_keys(&:to_sym)
|
219
|
+
transformed_hash = {}
|
220
|
+
openapi_types.each_pair do |key, type|
|
221
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
222
|
+
transformed_hash["#{key}"] = nil
|
223
|
+
elsif type =~ /\AArray<(.*)>/i
|
217
224
|
# check to ensure the input is an array given that the attribute
|
218
225
|
# is documented as an array but the input is not
|
219
|
-
if attributes[
|
220
|
-
|
226
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
227
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
221
228
|
end
|
222
|
-
elsif !attributes[
|
223
|
-
|
224
|
-
end
|
229
|
+
elsif !attributes[attribute_map[key]].nil?
|
230
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
231
|
+
end
|
225
232
|
end
|
226
|
-
|
227
|
-
self
|
233
|
+
new(transformed_hash)
|
228
234
|
end
|
229
235
|
|
230
236
|
# Deserializes the data based on type
|
231
237
|
# @param string type Data type
|
232
238
|
# @param string value Value to be deserialized
|
233
239
|
# @return [Object] Deserialized data
|
234
|
-
def _deserialize(type, value)
|
240
|
+
def self._deserialize(type, value)
|
235
241
|
case type.to_sym
|
236
|
-
when :
|
237
|
-
|
242
|
+
when :Time
|
243
|
+
Time.parse(value)
|
238
244
|
when :Date
|
239
245
|
Date.parse(value)
|
240
246
|
when :String
|
@@ -264,7 +270,9 @@ module PulpOstreeClient
|
|
264
270
|
end
|
265
271
|
end
|
266
272
|
else # model
|
267
|
-
|
273
|
+
# models (e.g. Pet) or oneOf
|
274
|
+
klass = PulpOstreeClient.const_get(type)
|
275
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
268
276
|
end
|
269
277
|
end
|
270
278
|
|
@@ -290,7 +298,7 @@ module PulpOstreeClient
|
|
290
298
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
291
299
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
292
300
|
end
|
293
|
-
|
301
|
+
|
294
302
|
hash[param] = _to_hash(value)
|
295
303
|
end
|
296
304
|
hash
|
@@ -313,5 +321,7 @@ module PulpOstreeClient
|
|
313
321
|
value
|
314
322
|
end
|
315
323
|
end
|
324
|
+
|
316
325
|
end
|
326
|
+
|
317
327
|
end
|