pulp_ansible_client 0.18.3 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -47
- data/docs/AnsibleCollectionRemoteResponseHiddenFields.md +2 -2
- data/docs/AnsibleCollectionVersion.md +3 -3
- data/docs/AnsibleCollectionVersionResponse.md +3 -3
- data/docs/AnsibleCollectionsApi.md +9 -15
- data/docs/AnsibleCopyApi.md +1 -1
- data/docs/AnsibleGitRemote.md +25 -25
- data/docs/AnsibleGitRemoteResponse.md +23 -23
- data/docs/AnsibleRole.md +3 -3
- data/docs/ApiCollectionsApi.md +1 -1
- data/docs/ApiRolesApi.md +1 -1
- data/docs/CollectionImportApi.md +1 -1
- data/docs/CollectionNamespaceResponse.md +1 -1
- data/docs/CollectionResponse.md +5 -3
- data/docs/CollectionVersionResponse.md +1 -1
- data/docs/CollectionVersionSignatureResponse.md +23 -0
- data/docs/ContentCollectionDeprecationsApi.md +1 -3
- data/docs/ContentCollectionMarksApi.md +2 -4
- data/docs/ContentCollectionSignaturesApi.md +3 -5
- data/docs/ContentCollectionVersionsApi.md +5 -5
- data/docs/ContentNamespacesApi.md +1 -19
- data/docs/ContentRolesApi.md +1 -3
- data/docs/DistributionsAnsibleApi.md +10 -136
- data/docs/GalaxyDetailApi.md +1 -1
- data/docs/{UnsetLabel.md → PatchedCollection.md} +3 -3
- data/docs/PatchedansibleGitRemote.md +25 -25
- data/docs/PulpAnsibleApiApi.md +1 -1
- data/docs/PulpAnsibleApiV2CollectionsVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3Api.md +1 -1
- data/docs/PulpAnsibleApiV3ArtifactsCollectionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsAllApi.md +1 -3
- data/docs/PulpAnsibleApiV3CollectionsApi.md +5 -7
- data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +3 -3
- data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleApiV3NamespacesApi.md +1 -19
- data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -3
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +5 -7
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +3 -3
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesApi.md +5 -23
- data/docs/{ApiPluginAnsibleSearchCollectionVersionsApi.md → PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsApi.md} +17 -18
- data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +1 -1
- data/docs/PulpAnsibleDefaultApiApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3Api.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionVersionsAllApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionsAllApi.md +1 -3
- data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +5 -7
- data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +3 -3
- data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3NamespacesApi.md +1 -19
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -3
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +5 -7
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +3 -3
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesApi.md +5 -23
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsApi.md +3 -4
- data/docs/PulpAnsibleTagsApi.md +1 -1
- data/docs/RemotesCollectionApi.md +9 -135
- data/docs/RemotesGitApi.md +9 -135
- data/docs/RemotesRoleApi.md +9 -135
- data/docs/RepositoriesAnsibleApi.md +10 -136
- data/docs/RepositoriesAnsibleVersionsApi.md +1 -3
- data/docs/UnpaginatedCollectionVersionResponse.md +1 -1
- data/docs/VersionsApi.md +1 -1
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +0 -11
- data/lib/pulp_ansible_client/api/content_collection_deprecations_api.rb +0 -3
- data/lib/pulp_ansible_client/api/content_collection_marks_api.rb +0 -3
- data/lib/pulp_ansible_client/api/content_collection_signatures_api.rb +0 -3
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
- data/lib/pulp_ansible_client/api/content_namespaces_api.rb +0 -27
- data/lib/pulp_ansible_client/api/content_roles_api.rb +0 -3
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +0 -163
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_all_api.rb +0 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_api.rb +9 -12
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_versions_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_namespaces_api.rb +0 -27
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections_api.rb +0 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api.rb +9 -12
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api.rb +8 -35
- data/lib/pulp_ansible_client/api/{api_plugin_ansible_search_collection_versions_api.rb → pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api.rb} +24 -26
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_all_api.rb +0 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_api.rb +9 -12
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_versions_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_namespaces_api.rb +0 -27
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections_api.rb +0 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api.rb +9 -12
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api.rb +8 -35
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api.rb +0 -2
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +0 -163
- data/lib/pulp_ansible_client/api/remotes_git_api.rb +0 -163
- data/lib/pulp_ansible_client/api/remotes_role_api.rb +0 -163
- data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +0 -163
- data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +0 -3
- data/lib/pulp_ansible_client/configuration.rb +3 -3
- data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_collection_remote_response_hidden_fields.rb +0 -10
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +11 -11
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +11 -11
- data/lib/pulp_ansible_client/models/ansible_git_remote.rb +217 -217
- data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +143 -143
- data/lib/pulp_ansible_client/models/ansible_role.rb +11 -11
- data/lib/pulp_ansible_client/models/ansible_role_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +20 -20
- data/lib/pulp_ansible_client/models/collection_namespace_response.rb +1 -0
- data/lib/pulp_ansible_client/models/collection_response.rb +19 -6
- data/lib/pulp_ansible_client/models/collection_version_response.rb +9 -2
- data/lib/pulp_ansible_client/models/{set_label.rb → collection_version_signature_response.rb} +49 -42
- data/lib/pulp_ansible_client/models/{unset_label_response.rb → patched_collection.rb} +11 -46
- data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +216 -216
- data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +9 -2
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/lib/pulp_ansible_client.rb +3 -5
- data/spec/api/ansible_collections_api_spec.rb +0 -5
- data/spec/api/content_collection_deprecations_api_spec.rb +0 -1
- data/spec/api/content_collection_marks_api_spec.rb +0 -1
- data/spec/api/content_collection_signatures_api_spec.rb +0 -1
- data/spec/api/content_collection_versions_api_spec.rb +2 -2
- data/spec/api/content_namespaces_api_spec.rb +0 -9
- data/spec/api/content_roles_api_spec.rb +0 -1
- data/spec/api/distributions_ansible_api_spec.rb +0 -35
- data/spec/api/pulp_ansible_api_v3_collections_all_api_spec.rb +0 -1
- data/spec/api/pulp_ansible_api_v3_collections_api_spec.rb +1 -2
- data/spec/api/pulp_ansible_api_v3_collections_versions_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_v3_namespaces_api_spec.rb +0 -9
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections_api_spec.rb +0 -1
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api_spec.rb +1 -2
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api_spec.rb +4 -13
- data/spec/api/{api_plugin_ansible_search_collection_versions_api_spec.rb → pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api_spec.rb} +8 -9
- data/spec/api/pulp_ansible_default_api_v3_collections_all_api_spec.rb +0 -1
- data/spec/api/pulp_ansible_default_api_v3_collections_api_spec.rb +1 -2
- data/spec/api/pulp_ansible_default_api_v3_collections_versions_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_default_api_v3_namespaces_api_spec.rb +0 -9
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections_api_spec.rb +0 -1
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api_spec.rb +1 -2
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api_spec.rb +4 -13
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +0 -1
- data/spec/api/remotes_collection_api_spec.rb +0 -35
- data/spec/api/remotes_git_api_spec.rb +0 -35
- data/spec/api/remotes_role_api_spec.rb +0 -35
- data/spec/api/repositories_ansible_api_spec.rb +0 -35
- data/spec/api/repositories_ansible_versions_api_spec.rb +0 -1
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/ansible_collection_version_response_spec.rb +2 -2
- data/spec/models/ansible_collection_version_spec.rb +3 -3
- data/spec/models/ansible_git_remote_response_spec.rb +16 -16
- data/spec/models/ansible_git_remote_spec.rb +19 -19
- data/spec/models/ansible_role_spec.rb +2 -2
- data/spec/models/collection_response_spec.rb +6 -0
- data/spec/models/collection_version_signature_response_spec.rb +59 -0
- data/spec/models/{unset_label_spec.rb → patched_collection_spec.rb} +7 -7
- data/spec/models/patchedansible_git_remote_spec.rb +19 -19
- metadata +155 -163
- data/docs/SetLabel.md +0 -19
- data/docs/SetLabelResponse.md +0 -19
- data/docs/UnsetLabelResponse.md +0 -19
- data/lib/pulp_ansible_client/models/set_label_response.rb +0 -243
- data/lib/pulp_ansible_client/models/unset_label.rb +0 -242
- data/spec/models/set_label_response_spec.rb +0 -47
- data/spec/models/set_label_spec.rb +0 -47
- data/spec/models/unset_label_response_spec.rb +0 -47
@@ -1,243 +0,0 @@
|
|
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
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpAnsibleClient
|
16
|
-
# Serializer for synchronously setting a label.
|
17
|
-
class SetLabelResponse
|
18
|
-
attr_accessor :key
|
19
|
-
|
20
|
-
attr_accessor :value
|
21
|
-
|
22
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
-
def self.attribute_map
|
24
|
-
{
|
25
|
-
:'key' => :'key',
|
26
|
-
:'value' => :'value'
|
27
|
-
}
|
28
|
-
end
|
29
|
-
|
30
|
-
# Attribute type mapping.
|
31
|
-
def self.openapi_types
|
32
|
-
{
|
33
|
-
:'key' => :'String',
|
34
|
-
:'value' => :'String'
|
35
|
-
}
|
36
|
-
end
|
37
|
-
|
38
|
-
# List of attributes with nullable: true
|
39
|
-
def self.openapi_nullable
|
40
|
-
Set.new([
|
41
|
-
:'value'
|
42
|
-
])
|
43
|
-
end
|
44
|
-
|
45
|
-
# Initializes the object
|
46
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
-
def initialize(attributes = {})
|
48
|
-
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::SetLabelResponse` initialize method"
|
50
|
-
end
|
51
|
-
|
52
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::SetLabelResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
-
end
|
57
|
-
h[k.to_sym] = v
|
58
|
-
}
|
59
|
-
|
60
|
-
if attributes.key?(:'key')
|
61
|
-
self.key = attributes[:'key']
|
62
|
-
end
|
63
|
-
|
64
|
-
if attributes.key?(:'value')
|
65
|
-
self.value = attributes[:'value']
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
-
# @return Array for valid properties with the reasons
|
71
|
-
def list_invalid_properties
|
72
|
-
invalid_properties = Array.new
|
73
|
-
if @key.nil?
|
74
|
-
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
75
|
-
end
|
76
|
-
|
77
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
78
|
-
if @key !~ pattern
|
79
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
80
|
-
end
|
81
|
-
|
82
|
-
invalid_properties
|
83
|
-
end
|
84
|
-
|
85
|
-
# Check to see if the all the properties in the model are valid
|
86
|
-
# @return true if the model is valid
|
87
|
-
def valid?
|
88
|
-
return false if @key.nil?
|
89
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
90
|
-
true
|
91
|
-
end
|
92
|
-
|
93
|
-
# Custom attribute writer method with validation
|
94
|
-
# @param [Object] key Value to be assigned
|
95
|
-
def key=(key)
|
96
|
-
if key.nil?
|
97
|
-
fail ArgumentError, 'key cannot be nil'
|
98
|
-
end
|
99
|
-
|
100
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
101
|
-
if key !~ pattern
|
102
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
103
|
-
end
|
104
|
-
|
105
|
-
@key = key
|
106
|
-
end
|
107
|
-
|
108
|
-
# Checks equality by comparing each attribute.
|
109
|
-
# @param [Object] Object to be compared
|
110
|
-
def ==(o)
|
111
|
-
return true if self.equal?(o)
|
112
|
-
self.class == o.class &&
|
113
|
-
key == o.key &&
|
114
|
-
value == o.value
|
115
|
-
end
|
116
|
-
|
117
|
-
# @see the `==` method
|
118
|
-
# @param [Object] Object to be compared
|
119
|
-
def eql?(o)
|
120
|
-
self == o
|
121
|
-
end
|
122
|
-
|
123
|
-
# Calculates hash code according to all attributes.
|
124
|
-
# @return [Integer] Hash code
|
125
|
-
def hash
|
126
|
-
[key, value].hash
|
127
|
-
end
|
128
|
-
|
129
|
-
# Builds the object from hash
|
130
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
-
# @return [Object] Returns the model itself
|
132
|
-
def self.build_from_hash(attributes)
|
133
|
-
new.build_from_hash(attributes)
|
134
|
-
end
|
135
|
-
|
136
|
-
# Builds the object from hash
|
137
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
-
# @return [Object] Returns the model itself
|
139
|
-
def build_from_hash(attributes)
|
140
|
-
return nil unless attributes.is_a?(Hash)
|
141
|
-
self.class.openapi_types.each_pair do |key, type|
|
142
|
-
if type =~ /\AArray<(.*)>/i
|
143
|
-
# check to ensure the input is an array given that the attribute
|
144
|
-
# is documented as an array but the input is not
|
145
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
146
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
147
|
-
end
|
148
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
149
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
150
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
151
|
-
end
|
152
|
-
|
153
|
-
self
|
154
|
-
end
|
155
|
-
|
156
|
-
# Deserializes the data based on type
|
157
|
-
# @param string type Data type
|
158
|
-
# @param string value Value to be deserialized
|
159
|
-
# @return [Object] Deserialized data
|
160
|
-
def _deserialize(type, value)
|
161
|
-
case type.to_sym
|
162
|
-
when :DateTime
|
163
|
-
DateTime.parse(value)
|
164
|
-
when :Date
|
165
|
-
Date.parse(value)
|
166
|
-
when :String
|
167
|
-
value.to_s
|
168
|
-
when :Integer
|
169
|
-
value.to_i
|
170
|
-
when :Float
|
171
|
-
value.to_f
|
172
|
-
when :Boolean
|
173
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
174
|
-
true
|
175
|
-
else
|
176
|
-
false
|
177
|
-
end
|
178
|
-
when :Object
|
179
|
-
# generic object (usually a Hash), return directly
|
180
|
-
value
|
181
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
182
|
-
inner_type = Regexp.last_match[:inner_type]
|
183
|
-
value.map { |v| _deserialize(inner_type, v) }
|
184
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
185
|
-
k_type = Regexp.last_match[:k_type]
|
186
|
-
v_type = Regexp.last_match[:v_type]
|
187
|
-
{}.tap do |hash|
|
188
|
-
value.each do |k, v|
|
189
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
else # model
|
193
|
-
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
# Returns the string representation of the object
|
198
|
-
# @return [String] String presentation of the object
|
199
|
-
def to_s
|
200
|
-
to_hash.to_s
|
201
|
-
end
|
202
|
-
|
203
|
-
# to_body is an alias to to_hash (backward compatibility)
|
204
|
-
# @return [Hash] Returns the object in the form of hash
|
205
|
-
def to_body
|
206
|
-
to_hash
|
207
|
-
end
|
208
|
-
|
209
|
-
# Returns the object in the form of hash
|
210
|
-
# @return [Hash] Returns the object in the form of hash
|
211
|
-
def to_hash
|
212
|
-
hash = {}
|
213
|
-
self.class.attribute_map.each_pair do |attr, param|
|
214
|
-
value = self.send(attr)
|
215
|
-
if value.nil?
|
216
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
217
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
218
|
-
end
|
219
|
-
|
220
|
-
hash[param] = _to_hash(value)
|
221
|
-
end
|
222
|
-
hash
|
223
|
-
end
|
224
|
-
|
225
|
-
# Outputs non-array value in the form of hash
|
226
|
-
# For object, use to_hash. Otherwise, just return the value
|
227
|
-
# @param [Object] value Any valid value
|
228
|
-
# @return [Hash] Returns the value in the form of hash
|
229
|
-
def _to_hash(value)
|
230
|
-
if value.is_a?(Array)
|
231
|
-
value.compact.map { |v| _to_hash(v) }
|
232
|
-
elsif value.is_a?(Hash)
|
233
|
-
{}.tap do |hash|
|
234
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
235
|
-
end
|
236
|
-
elsif value.respond_to? :to_hash
|
237
|
-
value.to_hash
|
238
|
-
else
|
239
|
-
value
|
240
|
-
end
|
241
|
-
end
|
242
|
-
end
|
243
|
-
end
|
@@ -1,242 +0,0 @@
|
|
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
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpAnsibleClient
|
16
|
-
# Serializer for synchronously setting a label.
|
17
|
-
class UnsetLabel
|
18
|
-
attr_accessor :key
|
19
|
-
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
-
def self.attribute_map
|
22
|
-
{
|
23
|
-
:'key' => :'key'
|
24
|
-
}
|
25
|
-
end
|
26
|
-
|
27
|
-
# Attribute type mapping.
|
28
|
-
def self.openapi_types
|
29
|
-
{
|
30
|
-
:'key' => :'String'
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
|
-
# List of attributes with nullable: true
|
35
|
-
def self.openapi_nullable
|
36
|
-
Set.new([
|
37
|
-
])
|
38
|
-
end
|
39
|
-
|
40
|
-
# Initializes the object
|
41
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
-
def initialize(attributes = {})
|
43
|
-
if (!attributes.is_a?(Hash))
|
44
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::UnsetLabel` initialize method"
|
45
|
-
end
|
46
|
-
|
47
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
48
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
50
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::UnsetLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
51
|
-
end
|
52
|
-
h[k.to_sym] = v
|
53
|
-
}
|
54
|
-
|
55
|
-
if attributes.key?(:'key')
|
56
|
-
self.key = attributes[:'key']
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
-
# @return Array for valid properties with the reasons
|
62
|
-
def list_invalid_properties
|
63
|
-
invalid_properties = Array.new
|
64
|
-
if @key.nil?
|
65
|
-
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
66
|
-
end
|
67
|
-
|
68
|
-
if @key.to_s.length < 1
|
69
|
-
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
|
70
|
-
end
|
71
|
-
|
72
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
73
|
-
if @key !~ pattern
|
74
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
75
|
-
end
|
76
|
-
|
77
|
-
invalid_properties
|
78
|
-
end
|
79
|
-
|
80
|
-
# Check to see if the all the properties in the model are valid
|
81
|
-
# @return true if the model is valid
|
82
|
-
def valid?
|
83
|
-
return false if @key.nil?
|
84
|
-
return false if @key.to_s.length < 1
|
85
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
86
|
-
true
|
87
|
-
end
|
88
|
-
|
89
|
-
# Custom attribute writer method with validation
|
90
|
-
# @param [Object] key Value to be assigned
|
91
|
-
def key=(key)
|
92
|
-
if key.nil?
|
93
|
-
fail ArgumentError, 'key cannot be nil'
|
94
|
-
end
|
95
|
-
|
96
|
-
if key.to_s.length < 1
|
97
|
-
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
|
98
|
-
end
|
99
|
-
|
100
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
101
|
-
if key !~ pattern
|
102
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
103
|
-
end
|
104
|
-
|
105
|
-
@key = key
|
106
|
-
end
|
107
|
-
|
108
|
-
# Checks equality by comparing each attribute.
|
109
|
-
# @param [Object] Object to be compared
|
110
|
-
def ==(o)
|
111
|
-
return true if self.equal?(o)
|
112
|
-
self.class == o.class &&
|
113
|
-
key == o.key
|
114
|
-
end
|
115
|
-
|
116
|
-
# @see the `==` method
|
117
|
-
# @param [Object] Object to be compared
|
118
|
-
def eql?(o)
|
119
|
-
self == o
|
120
|
-
end
|
121
|
-
|
122
|
-
# Calculates hash code according to all attributes.
|
123
|
-
# @return [Integer] Hash code
|
124
|
-
def hash
|
125
|
-
[key].hash
|
126
|
-
end
|
127
|
-
|
128
|
-
# Builds the object from hash
|
129
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
-
# @return [Object] Returns the model itself
|
131
|
-
def self.build_from_hash(attributes)
|
132
|
-
new.build_from_hash(attributes)
|
133
|
-
end
|
134
|
-
|
135
|
-
# Builds the object from hash
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
-
# @return [Object] Returns the model itself
|
138
|
-
def build_from_hash(attributes)
|
139
|
-
return nil unless attributes.is_a?(Hash)
|
140
|
-
self.class.openapi_types.each_pair do |key, type|
|
141
|
-
if type =~ /\AArray<(.*)>/i
|
142
|
-
# check to ensure the input is an array given that the attribute
|
143
|
-
# is documented as an array but the input is not
|
144
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
-
end
|
147
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
150
|
-
end
|
151
|
-
|
152
|
-
self
|
153
|
-
end
|
154
|
-
|
155
|
-
# Deserializes the data based on type
|
156
|
-
# @param string type Data type
|
157
|
-
# @param string value Value to be deserialized
|
158
|
-
# @return [Object] Deserialized data
|
159
|
-
def _deserialize(type, value)
|
160
|
-
case type.to_sym
|
161
|
-
when :DateTime
|
162
|
-
DateTime.parse(value)
|
163
|
-
when :Date
|
164
|
-
Date.parse(value)
|
165
|
-
when :String
|
166
|
-
value.to_s
|
167
|
-
when :Integer
|
168
|
-
value.to_i
|
169
|
-
when :Float
|
170
|
-
value.to_f
|
171
|
-
when :Boolean
|
172
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
-
true
|
174
|
-
else
|
175
|
-
false
|
176
|
-
end
|
177
|
-
when :Object
|
178
|
-
# generic object (usually a Hash), return directly
|
179
|
-
value
|
180
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
-
inner_type = Regexp.last_match[:inner_type]
|
182
|
-
value.map { |v| _deserialize(inner_type, v) }
|
183
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
-
k_type = Regexp.last_match[:k_type]
|
185
|
-
v_type = Regexp.last_match[:v_type]
|
186
|
-
{}.tap do |hash|
|
187
|
-
value.each do |k, v|
|
188
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
-
end
|
190
|
-
end
|
191
|
-
else # model
|
192
|
-
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
# Returns the string representation of the object
|
197
|
-
# @return [String] String presentation of the object
|
198
|
-
def to_s
|
199
|
-
to_hash.to_s
|
200
|
-
end
|
201
|
-
|
202
|
-
# to_body is an alias to to_hash (backward compatibility)
|
203
|
-
# @return [Hash] Returns the object in the form of hash
|
204
|
-
def to_body
|
205
|
-
to_hash
|
206
|
-
end
|
207
|
-
|
208
|
-
# Returns the object in the form of hash
|
209
|
-
# @return [Hash] Returns the object in the form of hash
|
210
|
-
def to_hash
|
211
|
-
hash = {}
|
212
|
-
self.class.attribute_map.each_pair do |attr, param|
|
213
|
-
value = self.send(attr)
|
214
|
-
if value.nil?
|
215
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
-
end
|
218
|
-
|
219
|
-
hash[param] = _to_hash(value)
|
220
|
-
end
|
221
|
-
hash
|
222
|
-
end
|
223
|
-
|
224
|
-
# Outputs non-array value in the form of hash
|
225
|
-
# For object, use to_hash. Otherwise, just return the value
|
226
|
-
# @param [Object] value Any valid value
|
227
|
-
# @return [Hash] Returns the value in the form of hash
|
228
|
-
def _to_hash(value)
|
229
|
-
if value.is_a?(Array)
|
230
|
-
value.compact.map { |v| _to_hash(v) }
|
231
|
-
elsif value.is_a?(Hash)
|
232
|
-
{}.tap do |hash|
|
233
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
-
end
|
235
|
-
elsif value.respond_to? :to_hash
|
236
|
-
value.to_hash
|
237
|
-
else
|
238
|
-
value
|
239
|
-
end
|
240
|
-
end
|
241
|
-
end
|
242
|
-
end
|
@@ -1,47 +0,0 @@
|
|
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
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for PulpAnsibleClient::SetLabelResponse
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe 'SetLabelResponse' do
|
21
|
-
before do
|
22
|
-
# run before each test
|
23
|
-
@instance = PulpAnsibleClient::SetLabelResponse.new
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
# run after each test
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test an instance of SetLabelResponse' do
|
31
|
-
it 'should create an instance of SetLabelResponse' do
|
32
|
-
expect(@instance).to be_instance_of(PulpAnsibleClient::SetLabelResponse)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
describe 'test attribute "key"' do
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe 'test attribute "value"' do
|
42
|
-
it 'should work' do
|
43
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
@@ -1,47 +0,0 @@
|
|
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
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for PulpAnsibleClient::SetLabel
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe 'SetLabel' do
|
21
|
-
before do
|
22
|
-
# run before each test
|
23
|
-
@instance = PulpAnsibleClient::SetLabel.new
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
# run after each test
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test an instance of SetLabel' do
|
31
|
-
it 'should create an instance of SetLabel' do
|
32
|
-
expect(@instance).to be_instance_of(PulpAnsibleClient::SetLabel)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
describe 'test attribute "key"' do
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe 'test attribute "value"' do
|
42
|
-
it 'should work' do
|
43
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
@@ -1,47 +0,0 @@
|
|
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
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for PulpAnsibleClient::UnsetLabelResponse
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe 'UnsetLabelResponse' do
|
21
|
-
before do
|
22
|
-
# run before each test
|
23
|
-
@instance = PulpAnsibleClient::UnsetLabelResponse.new
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
# run after each test
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test an instance of UnsetLabelResponse' do
|
31
|
-
it 'should create an instance of UnsetLabelResponse' do
|
32
|
-
expect(@instance).to be_instance_of(PulpAnsibleClient::UnsetLabelResponse)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
describe 'test attribute "key"' do
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe 'test attribute "value"' do
|
42
|
-
it 'should work' do
|
43
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|