pulp_2to3_migration_client 0.2.0b3.dev01590500248 → 0.2.0b3.dev01590586626
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -6
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/MigrationPlansApi.md +4 -4
- data/docs/Pulp2contentApi.md +2 -2
- data/docs/Pulp2repositoriesApi.md +2 -2
- data/docs/Pulp2to3MigrationMigrationPlanRead.md +21 -0
- data/docs/{Pulp2to3MigrationPulp2Content.md → Pulp2to3MigrationPulp2ContentRead.md} +2 -2
- data/docs/{Pulp2to3MigrationPulp2Repository.md → Pulp2to3MigrationPulp2RepositoryRead.md} +2 -2
- data/lib/pulp_2to3_migration_client.rb +3 -2
- data/lib/pulp_2to3_migration_client/api/migration_plans_api.rb +6 -6
- data/lib/pulp_2to3_migration_client/api/pulp2content_api.rb +3 -3
- data/lib/pulp_2to3_migration_client/api/pulp2repositories_api.rb +3 -3
- data/lib/pulp_2to3_migration_client/models/inline_response200.rb +1 -1
- data/lib/pulp_2to3_migration_client/models/inline_response2001.rb +1 -1
- data/lib/pulp_2to3_migration_client/models/inline_response2002.rb +1 -1
- data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan_read.rb +231 -0
- data/lib/pulp_2to3_migration_client/models/{pulp2to3_migration_pulp2_content.rb → pulp2to3_migration_pulp2_content_read.rb} +3 -3
- data/lib/pulp_2to3_migration_client/models/{pulp2to3_migration_pulp2_repository.rb → pulp2to3_migration_pulp2_repository_read.rb} +3 -3
- data/lib/pulp_2to3_migration_client/version.rb +1 -1
- data/pulpcore/client/pulp_2to3_migration/__init__.py +3 -2
- data/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +6 -6
- data/pulpcore/client/pulp_2to3_migration/api/pulp2content_api.py +3 -3
- data/pulpcore/client/pulp_2to3_migration/api/pulp2repositories_api.py +3 -3
- data/pulpcore/client/pulp_2to3_migration/models/__init__.py +3 -2
- data/pulpcore/client/pulp_2to3_migration/models/inline_response200.py +3 -3
- data/pulpcore/client/pulp_2to3_migration/models/inline_response2001.py +3 -3
- data/pulpcore/client/pulp_2to3_migration/models/inline_response2002.py +3 -3
- data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_read.py +177 -0
- data/pulpcore/client/pulp_2to3_migration/models/{pulp2to3_migration_pulp2_content.py → pulp2to3_migration_pulp2_content_read.py} +40 -40
- data/pulpcore/client/pulp_2to3_migration/models/{pulp2to3_migration_pulp2_repository.py → pulp2to3_migration_pulp2_repository_read.py} +52 -52
- data/spec/api/migration_plans_api_spec.rb +2 -2
- data/spec/api/pulp2content_api_spec.rb +1 -1
- data/spec/api/pulp2repositories_api_spec.rb +1 -1
- data/spec/models/pulp2to3_migration_migration_plan_read_spec.rb +53 -0
- data/spec/models/{pulp2to3_migration_pulp2_content_spec.rb → pulp2to3_migration_pulp2_content_read_spec.rb} +6 -6
- data/spec/models/{pulp2to3_migration_pulp2_repository_spec.rb → pulp2to3_migration_pulp2_repository_read_spec.rb} +6 -6
- data/test/test_inline_response200.py +2 -2
- data/test/test_inline_response2001.py +2 -2
- data/test/test_inline_response2002.py +2 -2
- data/test/test_pulp2to3_migration_migration_plan_read.py +55 -0
- data/test/{test_pulp2to3_migration_pulp2_content.py → test_pulp2to3_migration_pulp2_content_read.py} +9 -9
- data/test/{test_pulp2to3_migration_pulp2_repository.py → test_pulp2to3_migration_pulp2_repository_read.py} +9 -9
- metadata +20 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e1afc3b406baea143986193803c8ed6548285856a482477ab0f131a34ab1c27
|
4
|
+
data.tar.gz: 8988dae82c8be43e1e3a86831c10e5b033abbb82ab633aeab81eace97e6099e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f816613f16e26e6231b70487fc5612c35b67d03dca9ff4afa79dc03955de26aca2f2560478849ee1d80aa7db666147c1a04477fc068d53b63f2dd9d759965273
|
7
|
+
data.tar.gz: 4bede00130ad535dfe4e0808d113b17c0b8f2c9466d8cd4245484c8e90bdf252358cf526f45c8420b81138e271f5bb4707d87fdf423cf57a5484230b49db0923
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v3
|
10
|
-
- Package version: 0.2.0b3.
|
10
|
+
- Package version: 0.2.0b3.dev01590586626
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,16 +23,16 @@ gem build pulp_2to3_migration_client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./pulp_2to3_migration_client-0.2.0b3.
|
26
|
+
gem install ./pulp_2to3_migration_client-0.2.0b3.dev01590586626.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./pulp_2to3_migration_client-0.2.0b3.
|
29
|
+
(for development, run `gem install --dev ./pulp_2to3_migration_client-0.2.0b3.dev01590586626.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'pulp_2to3_migration_client', '~> 0.2.0b3.
|
35
|
+
gem 'pulp_2to3_migration_client', '~> 0.2.0b3.dev01590586626'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -101,8 +101,9 @@ Class | Method | HTTP request | Description
|
|
101
101
|
- [Pulp2to3MigrationClient::InlineResponse2002](docs/InlineResponse2002.md)
|
102
102
|
- [Pulp2to3MigrationClient::MigrationPlanRun](docs/MigrationPlanRun.md)
|
103
103
|
- [Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlan](docs/Pulp2to3MigrationMigrationPlan.md)
|
104
|
-
- [Pulp2to3MigrationClient::
|
105
|
-
- [Pulp2to3MigrationClient::
|
104
|
+
- [Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlanRead](docs/Pulp2to3MigrationMigrationPlanRead.md)
|
105
|
+
- [Pulp2to3MigrationClient::Pulp2to3MigrationPulp2ContentRead](docs/Pulp2to3MigrationPulp2ContentRead.md)
|
106
|
+
- [Pulp2to3MigrationClient::Pulp2to3MigrationPulp2RepositoryRead](docs/Pulp2to3MigrationPulp2RepositoryRead.md)
|
106
107
|
|
107
108
|
|
108
109
|
## Documentation for Authorization
|
data/docs/InlineResponse200.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**count** | **Integer** | |
|
8
8
|
**_next** | **String** | | [optional]
|
9
9
|
**previous** | **String** | | [optional]
|
10
|
-
**results** | [**Array<
|
10
|
+
**results** | [**Array<Pulp2to3MigrationMigrationPlanRead>**](Pulp2to3MigrationMigrationPlanRead.md) | |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
data/docs/InlineResponse2001.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**count** | **Integer** | |
|
8
8
|
**_next** | **String** | | [optional]
|
9
9
|
**previous** | **String** | | [optional]
|
10
|
-
**results** | [**Array<
|
10
|
+
**results** | [**Array<Pulp2to3MigrationPulp2ContentRead>**](Pulp2to3MigrationPulp2ContentRead.md) | |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
data/docs/InlineResponse2002.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**count** | **Integer** | |
|
8
8
|
**_next** | **String** | | [optional]
|
9
9
|
**previous** | **String** | | [optional]
|
10
|
-
**results** | [**Array<
|
10
|
+
**results** | [**Array<Pulp2to3MigrationPulp2RepositoryRead>**](Pulp2to3MigrationPulp2RepositoryRead.md) | |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
data/docs/MigrationPlansApi.md
CHANGED
@@ -14,7 +14,7 @@ Method | HTTP request | Description
|
|
14
14
|
|
15
15
|
## create
|
16
16
|
|
17
|
-
>
|
17
|
+
> Pulp2to3MigrationMigrationPlanRead create(data)
|
18
18
|
|
19
19
|
Create a migration plan
|
20
20
|
|
@@ -53,7 +53,7 @@ Name | Type | Description | Notes
|
|
53
53
|
|
54
54
|
### Return type
|
55
55
|
|
56
|
-
[**
|
56
|
+
[**Pulp2to3MigrationMigrationPlanRead**](Pulp2to3MigrationMigrationPlanRead.md)
|
57
57
|
|
58
58
|
### Authorization
|
59
59
|
|
@@ -182,7 +182,7 @@ Name | Type | Description | Notes
|
|
182
182
|
|
183
183
|
## read
|
184
184
|
|
185
|
-
>
|
185
|
+
> Pulp2to3MigrationMigrationPlanRead read(migration_plan_href, opts)
|
186
186
|
|
187
187
|
Inspect a migration plan
|
188
188
|
|
@@ -227,7 +227,7 @@ Name | Type | Description | Notes
|
|
227
227
|
|
228
228
|
### Return type
|
229
229
|
|
230
|
-
[**
|
230
|
+
[**Pulp2to3MigrationMigrationPlanRead**](Pulp2to3MigrationMigrationPlanRead.md)
|
231
231
|
|
232
232
|
### Authorization
|
233
233
|
|
data/docs/Pulp2contentApi.md
CHANGED
@@ -96,7 +96,7 @@ Name | Type | Description | Notes
|
|
96
96
|
|
97
97
|
## read
|
98
98
|
|
99
|
-
>
|
99
|
+
> Pulp2to3MigrationPulp2ContentRead read(pulp2_content_href, opts)
|
100
100
|
|
101
101
|
Inspect a pulp2 content
|
102
102
|
|
@@ -141,7 +141,7 @@ Name | Type | Description | Notes
|
|
141
141
|
|
142
142
|
### Return type
|
143
143
|
|
144
|
-
[**
|
144
|
+
[**Pulp2to3MigrationPulp2ContentRead**](Pulp2to3MigrationPulp2ContentRead.md)
|
145
145
|
|
146
146
|
### Authorization
|
147
147
|
|
@@ -82,7 +82,7 @@ Name | Type | Description | Notes
|
|
82
82
|
|
83
83
|
## read
|
84
84
|
|
85
|
-
>
|
85
|
+
> Pulp2to3MigrationPulp2RepositoryRead read(pulp2_repository_href, opts)
|
86
86
|
|
87
87
|
Inspect a pulp2 repository
|
88
88
|
|
@@ -127,7 +127,7 @@ Name | Type | Description | Notes
|
|
127
127
|
|
128
128
|
### Return type
|
129
129
|
|
130
|
-
[**
|
130
|
+
[**Pulp2to3MigrationPulp2RepositoryRead**](Pulp2to3MigrationPulp2RepositoryRead.md)
|
131
131
|
|
132
132
|
### Authorization
|
133
133
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlanRead
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
+
**plan** | [**Object**](.md) | Migration Plan in JSON format |
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'Pulp2to3MigrationClient'
|
15
|
+
|
16
|
+
instance = Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlanRead.new(pulp_href: null,
|
17
|
+
pulp_created: null,
|
18
|
+
plan: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Pulp2to3MigrationClient::
|
1
|
+
# Pulp2to3MigrationClient::Pulp2to3MigrationPulp2ContentRead
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -19,7 +19,7 @@ Name | Type | Description | Notes
|
|
19
19
|
```ruby
|
20
20
|
require 'Pulp2to3MigrationClient'
|
21
21
|
|
22
|
-
instance = Pulp2to3MigrationClient::
|
22
|
+
instance = Pulp2to3MigrationClient::Pulp2to3MigrationPulp2ContentRead.new(pulp_href: null,
|
23
23
|
pulp_created: null,
|
24
24
|
pulp2_id: null,
|
25
25
|
pulp2_content_type_id: null,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Pulp2to3MigrationClient::
|
1
|
+
# Pulp2to3MigrationClient::Pulp2to3MigrationPulp2RepositoryRead
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -22,7 +22,7 @@ Name | Type | Description | Notes
|
|
22
22
|
```ruby
|
23
23
|
require 'Pulp2to3MigrationClient'
|
24
24
|
|
25
|
-
instance = Pulp2to3MigrationClient::
|
25
|
+
instance = Pulp2to3MigrationClient::Pulp2to3MigrationPulp2RepositoryRead.new(pulp_href: null,
|
26
26
|
pulp_created: null,
|
27
27
|
pulp2_object_id: null,
|
28
28
|
pulp2_repo_id: null,
|
@@ -23,8 +23,9 @@ require 'pulp_2to3_migration_client/models/inline_response2001'
|
|
23
23
|
require 'pulp_2to3_migration_client/models/inline_response2002'
|
24
24
|
require 'pulp_2to3_migration_client/models/migration_plan_run'
|
25
25
|
require 'pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan'
|
26
|
-
require 'pulp_2to3_migration_client/models/
|
27
|
-
require 'pulp_2to3_migration_client/models/
|
26
|
+
require 'pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan_read'
|
27
|
+
require 'pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_content_read'
|
28
|
+
require 'pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_repository_read'
|
28
29
|
|
29
30
|
# APIs
|
30
31
|
require 'pulp_2to3_migration_client/api/migration_plans_api'
|
@@ -23,7 +23,7 @@ module Pulp2to3MigrationClient
|
|
23
23
|
# MigrationPlan ViewSet.
|
24
24
|
# @param data [Pulp2to3MigrationMigrationPlan]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [
|
26
|
+
# @return [Pulp2to3MigrationMigrationPlanRead]
|
27
27
|
def create(data, opts = {})
|
28
28
|
data, _status_code, _headers = create_with_http_info(data, opts)
|
29
29
|
data
|
@@ -33,7 +33,7 @@ module Pulp2to3MigrationClient
|
|
33
33
|
# MigrationPlan ViewSet.
|
34
34
|
# @param data [Pulp2to3MigrationMigrationPlan]
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(
|
36
|
+
# @return [Array<(Pulp2to3MigrationMigrationPlanRead, Integer, Hash)>] Pulp2to3MigrationMigrationPlanRead data, response status code and response headers
|
37
37
|
def create_with_http_info(data, opts = {})
|
38
38
|
if @api_client.config.debugging
|
39
39
|
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.create ...'
|
@@ -62,7 +62,7 @@ module Pulp2to3MigrationClient
|
|
62
62
|
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
63
63
|
|
64
64
|
# return_type
|
65
|
-
return_type = opts[:return_type] || '
|
65
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationMigrationPlanRead'
|
66
66
|
|
67
67
|
# auth_names
|
68
68
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -220,7 +220,7 @@ module Pulp2to3MigrationClient
|
|
220
220
|
# @param [Hash] opts the optional parameters
|
221
221
|
# @option opts [String] :fields A list of fields to include in the response.
|
222
222
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
223
|
-
# @return [
|
223
|
+
# @return [Pulp2to3MigrationMigrationPlanRead]
|
224
224
|
def read(migration_plan_href, opts = {})
|
225
225
|
data, _status_code, _headers = read_with_http_info(migration_plan_href, opts)
|
226
226
|
data
|
@@ -232,7 +232,7 @@ module Pulp2to3MigrationClient
|
|
232
232
|
# @param [Hash] opts the optional parameters
|
233
233
|
# @option opts [String] :fields A list of fields to include in the response.
|
234
234
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
235
|
-
# @return [Array<(
|
235
|
+
# @return [Array<(Pulp2to3MigrationMigrationPlanRead, Integer, Hash)>] Pulp2to3MigrationMigrationPlanRead data, response status code and response headers
|
236
236
|
def read_with_http_info(migration_plan_href, opts = {})
|
237
237
|
if @api_client.config.debugging
|
238
238
|
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.read ...'
|
@@ -261,7 +261,7 @@ module Pulp2to3MigrationClient
|
|
261
261
|
post_body = opts[:body]
|
262
262
|
|
263
263
|
# return_type
|
264
|
-
return_type = opts[:return_type] || '
|
264
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationMigrationPlanRead'
|
265
265
|
|
266
266
|
# auth_names
|
267
267
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -129,7 +129,7 @@ module Pulp2to3MigrationClient
|
|
129
129
|
# @param [Hash] opts the optional parameters
|
130
130
|
# @option opts [String] :fields A list of fields to include in the response.
|
131
131
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
132
|
-
# @return [
|
132
|
+
# @return [Pulp2to3MigrationPulp2ContentRead]
|
133
133
|
def read(pulp2_content_href, opts = {})
|
134
134
|
data, _status_code, _headers = read_with_http_info(pulp2_content_href, opts)
|
135
135
|
data
|
@@ -141,7 +141,7 @@ module Pulp2to3MigrationClient
|
|
141
141
|
# @param [Hash] opts the optional parameters
|
142
142
|
# @option opts [String] :fields A list of fields to include in the response.
|
143
143
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
144
|
-
# @return [Array<(
|
144
|
+
# @return [Array<(Pulp2to3MigrationPulp2ContentRead, Integer, Hash)>] Pulp2to3MigrationPulp2ContentRead data, response status code and response headers
|
145
145
|
def read_with_http_info(pulp2_content_href, opts = {})
|
146
146
|
if @api_client.config.debugging
|
147
147
|
@api_client.config.logger.debug 'Calling API: Pulp2contentApi.read ...'
|
@@ -170,7 +170,7 @@ module Pulp2to3MigrationClient
|
|
170
170
|
post_body = opts[:body]
|
171
171
|
|
172
172
|
# return_type
|
173
|
-
return_type = opts[:return_type] || '
|
173
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationPulp2ContentRead'
|
174
174
|
|
175
175
|
# auth_names
|
176
176
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -108,7 +108,7 @@ module Pulp2to3MigrationClient
|
|
108
108
|
# @param [Hash] opts the optional parameters
|
109
109
|
# @option opts [String] :fields A list of fields to include in the response.
|
110
110
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
111
|
-
# @return [
|
111
|
+
# @return [Pulp2to3MigrationPulp2RepositoryRead]
|
112
112
|
def read(pulp2_repository_href, opts = {})
|
113
113
|
data, _status_code, _headers = read_with_http_info(pulp2_repository_href, opts)
|
114
114
|
data
|
@@ -120,7 +120,7 @@ module Pulp2to3MigrationClient
|
|
120
120
|
# @param [Hash] opts the optional parameters
|
121
121
|
# @option opts [String] :fields A list of fields to include in the response.
|
122
122
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
123
|
-
# @return [Array<(
|
123
|
+
# @return [Array<(Pulp2to3MigrationPulp2RepositoryRead, Integer, Hash)>] Pulp2to3MigrationPulp2RepositoryRead data, response status code and response headers
|
124
124
|
def read_with_http_info(pulp2_repository_href, opts = {})
|
125
125
|
if @api_client.config.debugging
|
126
126
|
@api_client.config.logger.debug 'Calling API: Pulp2repositoriesApi.read ...'
|
@@ -149,7 +149,7 @@ module Pulp2to3MigrationClient
|
|
149
149
|
post_body = opts[:body]
|
150
150
|
|
151
151
|
# return_type
|
152
|
-
return_type = opts[:return_type] || '
|
152
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationPulp2RepositoryRead'
|
153
153
|
|
154
154
|
# auth_names
|
155
155
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -0,0 +1,231 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Pulp2to3MigrationClient
|
16
|
+
class Pulp2to3MigrationMigrationPlanRead
|
17
|
+
attr_accessor :pulp_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :pulp_created
|
21
|
+
|
22
|
+
# Migration Plan in JSON format
|
23
|
+
attr_accessor :plan
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'pulp_href' => :'pulp_href',
|
29
|
+
:'pulp_created' => :'pulp_created',
|
30
|
+
:'plan' => :'plan'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'pulp_href' => :'String',
|
38
|
+
:'pulp_created' => :'DateTime',
|
39
|
+
:'plan' => :'Object'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlanRead` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlanRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'pulp_href')
|
65
|
+
self.pulp_href = attributes[:'pulp_href']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'pulp_created')
|
69
|
+
self.pulp_created = attributes[:'pulp_created']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'plan')
|
73
|
+
self.plan = attributes[:'plan']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
if @plan.nil?
|
82
|
+
invalid_properties.push('invalid value for "plan", plan cannot be nil.')
|
83
|
+
end
|
84
|
+
|
85
|
+
invalid_properties
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check to see if the all the properties in the model are valid
|
89
|
+
# @return true if the model is valid
|
90
|
+
def valid?
|
91
|
+
return false if @plan.nil?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
pulp_href == o.pulp_href &&
|
101
|
+
pulp_created == o.pulp_created &&
|
102
|
+
plan == o.plan
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Integer] Hash code
|
113
|
+
def hash
|
114
|
+
[pulp_href, pulp_created, plan].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def self.build_from_hash(attributes)
|
121
|
+
new.build_from_hash(attributes)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :Boolean
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
Pulp2to3MigrationClient.const_get(type).build_from_hash(value)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_hash
|
200
|
+
hash = {}
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
202
|
+
value = self.send(attr)
|
203
|
+
if value.nil?
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
206
|
+
end
|
207
|
+
|
208
|
+
hash[param] = _to_hash(value)
|
209
|
+
end
|
210
|
+
hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Outputs non-array value in the form of hash
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
215
|
+
# @param [Object] value Any valid value
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|