pulp_python_client 3.0.0b9.dev01590959185 → 3.0.0b10
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 +7 -13
 - data/docs/ContentPackagesApi.md +4 -6
 - data/docs/DistributionsPypiApi.md +2 -2
 - data/docs/InlineResponse200.md +1 -1
 - data/docs/InlineResponse2001.md +1 -1
 - data/docs/InlineResponse2002.md +1 -1
 - data/docs/InlineResponse2003.md +1 -1
 - data/docs/InlineResponse2004.md +1 -1
 - data/docs/InlineResponse2005.md +1 -1
 - data/docs/PublicationsPypiApi.md +2 -2
 - data/docs/{PythonPythonPackageContentRead.md → PythonPythonPackageContent.md} +3 -3
 - data/docs/PythonPythonRemote.md +2 -2
 - data/docs/RemotesPythonApi.md +60 -4
 - data/docs/RepositoriesPythonApi.md +4 -4
 - data/docs/RepositoriesPythonVersionsApi.md +6 -4
 - data/lib/pulp_python_client.rb +1 -7
 - data/lib/pulp_python_client/api/content_packages_api.rb +6 -17
 - data/lib/pulp_python_client/api/distributions_pypi_api.rb +3 -3
 - data/lib/pulp_python_client/api/publications_pypi_api.rb +3 -3
 - data/lib/pulp_python_client/api/remotes_python_api.rb +82 -6
 - data/lib/pulp_python_client/api/repositories_python_api.rb +6 -6
 - data/lib/pulp_python_client/api/repositories_python_versions_api.rb +9 -6
 - data/lib/pulp_python_client/models/inline_response200.rb +1 -1
 - data/lib/pulp_python_client/models/inline_response2001.rb +1 -1
 - data/lib/pulp_python_client/models/inline_response2002.rb +1 -1
 - data/lib/pulp_python_client/models/inline_response2003.rb +1 -1
 - data/lib/pulp_python_client/models/inline_response2004.rb +1 -1
 - data/lib/pulp_python_client/models/inline_response2005.rb +1 -1
 - data/lib/pulp_python_client/models/{python_python_package_content_read.rb → python_python_package_content.rb} +6 -15
 - data/lib/pulp_python_client/models/python_python_remote.rb +6 -10
 - data/lib/pulp_python_client/version.rb +1 -1
 - data/spec/api/content_packages_api_spec.rb +1 -2
 - data/spec/api/distributions_pypi_api_spec.rb +1 -1
 - data/spec/api/publications_pypi_api_spec.rb +1 -1
 - data/spec/api/remotes_python_api_spec.rb +15 -2
 - data/spec/api/repositories_python_api_spec.rb +2 -2
 - data/spec/api/repositories_python_versions_api_spec.rb +3 -2
 - data/spec/models/{python_python_package_content_read_spec.rb → python_python_package_content_spec.rb} +6 -6
 - metadata +20 -44
 - data/docs/ProjectSpecifier.md +0 -19
 - data/docs/PythonPythonDistributionRead.md +0 -29
 - data/docs/PythonPythonPublicationRead.md +0 -25
 - data/docs/PythonPythonRemoteRead.md +0 -49
 - data/docs/PythonPythonRepositoryRead.md +0 -27
 - data/docs/RepositoryVersionRead.md +0 -25
 - data/lib/pulp_python_client/models/project_specifier.rb +0 -242
 - data/lib/pulp_python_client/models/python_python_distribution_read.rb +0 -331
 - data/lib/pulp_python_client/models/python_python_publication_read.rb +0 -247
 - data/lib/pulp_python_client/models/python_python_remote_read.rb +0 -565
 - data/lib/pulp_python_client/models/python_python_repository_read.rb +0 -294
 - data/lib/pulp_python_client/models/repository_version_read.rb +0 -244
 - data/spec/models/project_specifier_spec.rb +0 -47
 - data/spec/models/python_python_distribution_read_spec.rb +0 -77
 - data/spec/models/python_python_publication_read_spec.rb +0 -65
 - data/spec/models/python_python_remote_read_spec.rb +0 -141
 - data/spec/models/python_python_repository_read_spec.rb +0 -71
 - data/spec/models/repository_version_read_spec.rb +0 -65
 
| 
         @@ -1,27 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # PulpPythonClient::PythonPythonRepositoryRead
         
     | 
| 
       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 
     | 
    
         
            -
            **versions_href** | **String** |  | [optional] [readonly] 
         
     | 
| 
       10 
     | 
    
         
            -
            **latest_version_href** | **String** |  | [optional] [readonly] 
         
     | 
| 
       11 
     | 
    
         
            -
            **name** | **String** | A unique name for this repository. | 
         
     | 
| 
       12 
     | 
    
         
            -
            **description** | **String** | An optional description. | [optional] 
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            ## Code Sample
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            ```ruby
         
     | 
| 
       17 
     | 
    
         
            -
            require 'PulpPythonClient'
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            instance = PulpPythonClient::PythonPythonRepositoryRead.new(pulp_href: null,
         
     | 
| 
       20 
     | 
    
         
            -
                                             pulp_created: null,
         
     | 
| 
       21 
     | 
    
         
            -
                                             versions_href: null,
         
     | 
| 
       22 
     | 
    
         
            -
                                             latest_version_href: null,
         
     | 
| 
       23 
     | 
    
         
            -
                                             name: null,
         
     | 
| 
       24 
     | 
    
         
            -
                                             description: null)
         
     | 
| 
       25 
     | 
    
         
            -
            ```
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
         @@ -1,25 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # PulpPythonClient::RepositoryVersionRead
         
     | 
| 
       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 
     | 
    
         
            -
            **number** | **Integer** |  | [optional] [readonly] 
         
     | 
| 
       10 
     | 
    
         
            -
            **base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional] 
         
     | 
| 
       11 
     | 
    
         
            -
            **content_summary** | [**ContentSummary**](ContentSummary.md) |  | [optional] 
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            ## Code Sample
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            ```ruby
         
     | 
| 
       16 
     | 
    
         
            -
            require 'PulpPythonClient'
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            instance = PulpPythonClient::RepositoryVersionRead.new(pulp_href: null,
         
     | 
| 
       19 
     | 
    
         
            -
                                             pulp_created: null,
         
     | 
| 
       20 
     | 
    
         
            -
                                             number: null,
         
     | 
| 
       21 
     | 
    
         
            -
                                             base_version: null,
         
     | 
| 
       22 
     | 
    
         
            -
                                             content_summary: null)
         
     | 
| 
       23 
     | 
    
         
            -
            ```
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
         @@ -1,242 +0,0 @@ 
     | 
|
| 
       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 PulpPythonClient
         
     | 
| 
       16 
     | 
    
         
            -
              # AKA \"Whitelist\". A list of dictionaries, expand for more information.         Example:          [{\"name\": \"django\", \"version_specifier\":\"~=2.0\"}] 
         
     | 
| 
       17 
     | 
    
         
            -
              class ProjectSpecifier
         
     | 
| 
       18 
     | 
    
         
            -
                # A python project name.
         
     | 
| 
       19 
     | 
    
         
            -
                attr_accessor :name
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                # A version specifier accepts standard python versions syntax: `>=`, `<=`, `==`, `~=`, `>`, `<`, `!` and can be used in conjunction with other specifiers i.e. `>1`,`<=3`,`!=3.0.2`. Note that the specifiers treat pre-released versions as `<` released versions, so 3.0.0a1 < 3.0.0. Not setting the version_specifier will sync all the pre-released and released versions.
         
     | 
| 
       22 
     | 
    
         
            -
                attr_accessor :version_specifier
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
       25 
     | 
    
         
            -
                def self.attribute_map
         
     | 
| 
       26 
     | 
    
         
            -
                  {
         
     | 
| 
       27 
     | 
    
         
            -
                    :'name' => :'name',
         
     | 
| 
       28 
     | 
    
         
            -
                    :'version_specifier' => :'version_specifier'
         
     | 
| 
       29 
     | 
    
         
            -
                  }
         
     | 
| 
       30 
     | 
    
         
            -
                end
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
                # Attribute type mapping.
         
     | 
| 
       33 
     | 
    
         
            -
                def self.openapi_types
         
     | 
| 
       34 
     | 
    
         
            -
                  {
         
     | 
| 
       35 
     | 
    
         
            -
                    :'name' => :'String',
         
     | 
| 
       36 
     | 
    
         
            -
                    :'version_specifier' => :'String'
         
     | 
| 
       37 
     | 
    
         
            -
                  }
         
     | 
| 
       38 
     | 
    
         
            -
                end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                # List of attributes with nullable: true
         
     | 
| 
       41 
     | 
    
         
            -
                def self.openapi_nullable
         
     | 
| 
       42 
     | 
    
         
            -
                  Set.new([
         
     | 
| 
       43 
     | 
    
         
            -
                  ])
         
     | 
| 
       44 
     | 
    
         
            -
                end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                # Initializes the object
         
     | 
| 
       47 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       48 
     | 
    
         
            -
                def initialize(attributes = {})
         
     | 
| 
       49 
     | 
    
         
            -
                  if (!attributes.is_a?(Hash))
         
     | 
| 
       50 
     | 
    
         
            -
                    fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::ProjectSpecifier` initialize method"
         
     | 
| 
       51 
     | 
    
         
            -
                  end
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                  # check to see if the attribute exists and convert string to symbol for hash key
         
     | 
| 
       54 
     | 
    
         
            -
                  attributes = attributes.each_with_object({}) { |(k, v), h|
         
     | 
| 
       55 
     | 
    
         
            -
                    if (!self.class.attribute_map.key?(k.to_sym))
         
     | 
| 
       56 
     | 
    
         
            -
                      fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::ProjectSpecifier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
         
     | 
| 
       57 
     | 
    
         
            -
                    end
         
     | 
| 
       58 
     | 
    
         
            -
                    h[k.to_sym] = v
         
     | 
| 
       59 
     | 
    
         
            -
                  }
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                  if attributes.key?(:'name')
         
     | 
| 
       62 
     | 
    
         
            -
                    self.name = attributes[:'name']
         
     | 
| 
       63 
     | 
    
         
            -
                  end
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                  if attributes.key?(:'version_specifier')
         
     | 
| 
       66 
     | 
    
         
            -
                    self.version_specifier = attributes[:'version_specifier']
         
     | 
| 
       67 
     | 
    
         
            -
                  end
         
     | 
| 
       68 
     | 
    
         
            -
                end
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
       71 
     | 
    
         
            -
                # @return Array for valid properties with the reasons
         
     | 
| 
       72 
     | 
    
         
            -
                def list_invalid_properties
         
     | 
| 
       73 
     | 
    
         
            -
                  invalid_properties = Array.new
         
     | 
| 
       74 
     | 
    
         
            -
                  if @name.nil?
         
     | 
| 
       75 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "name", name cannot be nil.')
         
     | 
| 
       76 
     | 
    
         
            -
                  end
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
                  if @name.to_s.length < 1
         
     | 
| 
       79 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
         
     | 
| 
       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 @name.nil?
         
     | 
| 
       89 
     | 
    
         
            -
                  return false if @name.to_s.length < 1
         
     | 
| 
       90 
     | 
    
         
            -
                  true
         
     | 
| 
       91 
     | 
    
         
            -
                end
         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
                # Custom attribute writer method with validation
         
     | 
| 
       94 
     | 
    
         
            -
                # @param [Object] name Value to be assigned
         
     | 
| 
       95 
     | 
    
         
            -
                def name=(name)
         
     | 
| 
       96 
     | 
    
         
            -
                  if name.nil?
         
     | 
| 
       97 
     | 
    
         
            -
                    fail ArgumentError, 'name cannot be nil'
         
     | 
| 
       98 
     | 
    
         
            -
                  end
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
                  if name.to_s.length < 1
         
     | 
| 
       101 
     | 
    
         
            -
                    fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
         
     | 
| 
       102 
     | 
    
         
            -
                  end
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                  @name = name
         
     | 
| 
       105 
     | 
    
         
            -
                end
         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
                # Checks equality by comparing each attribute.
         
     | 
| 
       108 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       109 
     | 
    
         
            -
                def ==(o)
         
     | 
| 
       110 
     | 
    
         
            -
                  return true if self.equal?(o)
         
     | 
| 
       111 
     | 
    
         
            -
                  self.class == o.class &&
         
     | 
| 
       112 
     | 
    
         
            -
                      name == o.name &&
         
     | 
| 
       113 
     | 
    
         
            -
                      version_specifier == o.version_specifier
         
     | 
| 
       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 
     | 
    
         
            -
                  [name, version_specifier].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 
     | 
    
         
            -
                    PulpPythonClient.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,331 +0,0 @@ 
     | 
|
| 
       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 PulpPythonClient
         
     | 
| 
       16 
     | 
    
         
            -
              class PythonPythonDistributionRead
         
     | 
| 
       17 
     | 
    
         
            -
                attr_accessor :pulp_href
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                # Timestamp of creation.
         
     | 
| 
       20 
     | 
    
         
            -
                attr_accessor :pulp_created
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                # The base (relative) path component of the published url. Avoid paths that                     overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
         
     | 
| 
       23 
     | 
    
         
            -
                attr_accessor :base_path
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                # The URL for accessing the publication as defined by this distribution.
         
     | 
| 
       26 
     | 
    
         
            -
                attr_accessor :base_url
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                # An optional content-guard.
         
     | 
| 
       29 
     | 
    
         
            -
                attr_accessor :content_guard
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                # A unique name. Ex, `rawhide` and `stable`.
         
     | 
| 
       32 
     | 
    
         
            -
                attr_accessor :name
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                # Publication to be served
         
     | 
| 
       35 
     | 
    
         
            -
                attr_accessor :publication
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
       38 
     | 
    
         
            -
                def self.attribute_map
         
     | 
| 
       39 
     | 
    
         
            -
                  {
         
     | 
| 
       40 
     | 
    
         
            -
                    :'pulp_href' => :'pulp_href',
         
     | 
| 
       41 
     | 
    
         
            -
                    :'pulp_created' => :'pulp_created',
         
     | 
| 
       42 
     | 
    
         
            -
                    :'base_path' => :'base_path',
         
     | 
| 
       43 
     | 
    
         
            -
                    :'base_url' => :'base_url',
         
     | 
| 
       44 
     | 
    
         
            -
                    :'content_guard' => :'content_guard',
         
     | 
| 
       45 
     | 
    
         
            -
                    :'name' => :'name',
         
     | 
| 
       46 
     | 
    
         
            -
                    :'publication' => :'publication'
         
     | 
| 
       47 
     | 
    
         
            -
                  }
         
     | 
| 
       48 
     | 
    
         
            -
                end
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
                # Attribute type mapping.
         
     | 
| 
       51 
     | 
    
         
            -
                def self.openapi_types
         
     | 
| 
       52 
     | 
    
         
            -
                  {
         
     | 
| 
       53 
     | 
    
         
            -
                    :'pulp_href' => :'String',
         
     | 
| 
       54 
     | 
    
         
            -
                    :'pulp_created' => :'DateTime',
         
     | 
| 
       55 
     | 
    
         
            -
                    :'base_path' => :'String',
         
     | 
| 
       56 
     | 
    
         
            -
                    :'base_url' => :'String',
         
     | 
| 
       57 
     | 
    
         
            -
                    :'content_guard' => :'String',
         
     | 
| 
       58 
     | 
    
         
            -
                    :'name' => :'String',
         
     | 
| 
       59 
     | 
    
         
            -
                    :'publication' => :'String'
         
     | 
| 
       60 
     | 
    
         
            -
                  }
         
     | 
| 
       61 
     | 
    
         
            -
                end
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                # List of attributes with nullable: true
         
     | 
| 
       64 
     | 
    
         
            -
                def self.openapi_nullable
         
     | 
| 
       65 
     | 
    
         
            -
                  Set.new([
         
     | 
| 
       66 
     | 
    
         
            -
                    :'content_guard',
         
     | 
| 
       67 
     | 
    
         
            -
                    :'publication'
         
     | 
| 
       68 
     | 
    
         
            -
                  ])
         
     | 
| 
       69 
     | 
    
         
            -
                end
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
                # Initializes the object
         
     | 
| 
       72 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       73 
     | 
    
         
            -
                def initialize(attributes = {})
         
     | 
| 
       74 
     | 
    
         
            -
                  if (!attributes.is_a?(Hash))
         
     | 
| 
       75 
     | 
    
         
            -
                    fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonDistributionRead` initialize method"
         
     | 
| 
       76 
     | 
    
         
            -
                  end
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
                  # check to see if the attribute exists and convert string to symbol for hash key
         
     | 
| 
       79 
     | 
    
         
            -
                  attributes = attributes.each_with_object({}) { |(k, v), h|
         
     | 
| 
       80 
     | 
    
         
            -
                    if (!self.class.attribute_map.key?(k.to_sym))
         
     | 
| 
       81 
     | 
    
         
            -
                      fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonDistributionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
         
     | 
| 
       82 
     | 
    
         
            -
                    end
         
     | 
| 
       83 
     | 
    
         
            -
                    h[k.to_sym] = v
         
     | 
| 
       84 
     | 
    
         
            -
                  }
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
                  if attributes.key?(:'pulp_href')
         
     | 
| 
       87 
     | 
    
         
            -
                    self.pulp_href = attributes[:'pulp_href']
         
     | 
| 
       88 
     | 
    
         
            -
                  end
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
                  if attributes.key?(:'pulp_created')
         
     | 
| 
       91 
     | 
    
         
            -
                    self.pulp_created = attributes[:'pulp_created']
         
     | 
| 
       92 
     | 
    
         
            -
                  end
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                  if attributes.key?(:'base_path')
         
     | 
| 
       95 
     | 
    
         
            -
                    self.base_path = attributes[:'base_path']
         
     | 
| 
       96 
     | 
    
         
            -
                  end
         
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
                  if attributes.key?(:'base_url')
         
     | 
| 
       99 
     | 
    
         
            -
                    self.base_url = attributes[:'base_url']
         
     | 
| 
       100 
     | 
    
         
            -
                  end
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
                  if attributes.key?(:'content_guard')
         
     | 
| 
       103 
     | 
    
         
            -
                    self.content_guard = attributes[:'content_guard']
         
     | 
| 
       104 
     | 
    
         
            -
                  end
         
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
                  if attributes.key?(:'name')
         
     | 
| 
       107 
     | 
    
         
            -
                    self.name = attributes[:'name']
         
     | 
| 
       108 
     | 
    
         
            -
                  end
         
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
                  if attributes.key?(:'publication')
         
     | 
| 
       111 
     | 
    
         
            -
                    self.publication = attributes[:'publication']
         
     | 
| 
       112 
     | 
    
         
            -
                  end
         
     | 
| 
       113 
     | 
    
         
            -
                end
         
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
       116 
     | 
    
         
            -
                # @return Array for valid properties with the reasons
         
     | 
| 
       117 
     | 
    
         
            -
                def list_invalid_properties
         
     | 
| 
       118 
     | 
    
         
            -
                  invalid_properties = Array.new
         
     | 
| 
       119 
     | 
    
         
            -
                  if @base_path.nil?
         
     | 
| 
       120 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
         
     | 
| 
       121 
     | 
    
         
            -
                  end
         
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
                  if @base_path.to_s.length < 1
         
     | 
| 
       124 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
         
     | 
| 
       125 
     | 
    
         
            -
                  end
         
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
                  if !@base_url.nil? && @base_url.to_s.length < 1
         
     | 
| 
       128 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "base_url", the character length must be great than or equal to 1.')
         
     | 
| 
       129 
     | 
    
         
            -
                  end
         
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
                  if @name.nil?
         
     | 
| 
       132 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "name", name cannot be nil.')
         
     | 
| 
       133 
     | 
    
         
            -
                  end
         
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
                  if @name.to_s.length < 1
         
     | 
| 
       136 
     | 
    
         
            -
                    invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
         
     | 
| 
       137 
     | 
    
         
            -
                  end
         
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
                  invalid_properties
         
     | 
| 
       140 
     | 
    
         
            -
                end
         
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
                # Check to see if the all the properties in the model are valid
         
     | 
| 
       143 
     | 
    
         
            -
                # @return true if the model is valid
         
     | 
| 
       144 
     | 
    
         
            -
                def valid?
         
     | 
| 
       145 
     | 
    
         
            -
                  return false if @base_path.nil?
         
     | 
| 
       146 
     | 
    
         
            -
                  return false if @base_path.to_s.length < 1
         
     | 
| 
       147 
     | 
    
         
            -
                  return false if !@base_url.nil? && @base_url.to_s.length < 1
         
     | 
| 
       148 
     | 
    
         
            -
                  return false if @name.nil?
         
     | 
| 
       149 
     | 
    
         
            -
                  return false if @name.to_s.length < 1
         
     | 
| 
       150 
     | 
    
         
            -
                  true
         
     | 
| 
       151 
     | 
    
         
            -
                end
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
                # Custom attribute writer method with validation
         
     | 
| 
       154 
     | 
    
         
            -
                # @param [Object] base_path Value to be assigned
         
     | 
| 
       155 
     | 
    
         
            -
                def base_path=(base_path)
         
     | 
| 
       156 
     | 
    
         
            -
                  if base_path.nil?
         
     | 
| 
       157 
     | 
    
         
            -
                    fail ArgumentError, 'base_path cannot be nil'
         
     | 
| 
       158 
     | 
    
         
            -
                  end
         
     | 
| 
       159 
     | 
    
         
            -
             
     | 
| 
       160 
     | 
    
         
            -
                  if base_path.to_s.length < 1
         
     | 
| 
       161 
     | 
    
         
            -
                    fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
         
     | 
| 
       162 
     | 
    
         
            -
                  end
         
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
       164 
     | 
    
         
            -
                  @base_path = base_path
         
     | 
| 
       165 
     | 
    
         
            -
                end
         
     | 
| 
       166 
     | 
    
         
            -
             
     | 
| 
       167 
     | 
    
         
            -
                # Custom attribute writer method with validation
         
     | 
| 
       168 
     | 
    
         
            -
                # @param [Object] base_url Value to be assigned
         
     | 
| 
       169 
     | 
    
         
            -
                def base_url=(base_url)
         
     | 
| 
       170 
     | 
    
         
            -
                  if !base_url.nil? && base_url.to_s.length < 1
         
     | 
| 
       171 
     | 
    
         
            -
                    fail ArgumentError, 'invalid value for "base_url", the character length must be great than or equal to 1.'
         
     | 
| 
       172 
     | 
    
         
            -
                  end
         
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
                  @base_url = base_url
         
     | 
| 
       175 
     | 
    
         
            -
                end
         
     | 
| 
       176 
     | 
    
         
            -
             
     | 
| 
       177 
     | 
    
         
            -
                # Custom attribute writer method with validation
         
     | 
| 
       178 
     | 
    
         
            -
                # @param [Object] name Value to be assigned
         
     | 
| 
       179 
     | 
    
         
            -
                def name=(name)
         
     | 
| 
       180 
     | 
    
         
            -
                  if name.nil?
         
     | 
| 
       181 
     | 
    
         
            -
                    fail ArgumentError, 'name cannot be nil'
         
     | 
| 
       182 
     | 
    
         
            -
                  end
         
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
                  if name.to_s.length < 1
         
     | 
| 
       185 
     | 
    
         
            -
                    fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
         
     | 
| 
       186 
     | 
    
         
            -
                  end
         
     | 
| 
       187 
     | 
    
         
            -
             
     | 
| 
       188 
     | 
    
         
            -
                  @name = name
         
     | 
| 
       189 
     | 
    
         
            -
                end
         
     | 
| 
       190 
     | 
    
         
            -
             
     | 
| 
       191 
     | 
    
         
            -
                # Checks equality by comparing each attribute.
         
     | 
| 
       192 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       193 
     | 
    
         
            -
                def ==(o)
         
     | 
| 
       194 
     | 
    
         
            -
                  return true if self.equal?(o)
         
     | 
| 
       195 
     | 
    
         
            -
                  self.class == o.class &&
         
     | 
| 
       196 
     | 
    
         
            -
                      pulp_href == o.pulp_href &&
         
     | 
| 
       197 
     | 
    
         
            -
                      pulp_created == o.pulp_created &&
         
     | 
| 
       198 
     | 
    
         
            -
                      base_path == o.base_path &&
         
     | 
| 
       199 
     | 
    
         
            -
                      base_url == o.base_url &&
         
     | 
| 
       200 
     | 
    
         
            -
                      content_guard == o.content_guard &&
         
     | 
| 
       201 
     | 
    
         
            -
                      name == o.name &&
         
     | 
| 
       202 
     | 
    
         
            -
                      publication == o.publication
         
     | 
| 
       203 
     | 
    
         
            -
                end
         
     | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
                # @see the `==` method
         
     | 
| 
       206 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       207 
     | 
    
         
            -
                def eql?(o)
         
     | 
| 
       208 
     | 
    
         
            -
                  self == o
         
     | 
| 
       209 
     | 
    
         
            -
                end
         
     | 
| 
       210 
     | 
    
         
            -
             
     | 
| 
       211 
     | 
    
         
            -
                # Calculates hash code according to all attributes.
         
     | 
| 
       212 
     | 
    
         
            -
                # @return [Integer] Hash code
         
     | 
| 
       213 
     | 
    
         
            -
                def hash
         
     | 
| 
       214 
     | 
    
         
            -
                  [pulp_href, pulp_created, base_path, base_url, content_guard, name, publication].hash
         
     | 
| 
       215 
     | 
    
         
            -
                end
         
     | 
| 
       216 
     | 
    
         
            -
             
     | 
| 
       217 
     | 
    
         
            -
                # Builds the object from hash
         
     | 
| 
       218 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       219 
     | 
    
         
            -
                # @return [Object] Returns the model itself
         
     | 
| 
       220 
     | 
    
         
            -
                def self.build_from_hash(attributes)
         
     | 
| 
       221 
     | 
    
         
            -
                  new.build_from_hash(attributes)
         
     | 
| 
       222 
     | 
    
         
            -
                end
         
     | 
| 
       223 
     | 
    
         
            -
             
     | 
| 
       224 
     | 
    
         
            -
                # Builds the object from hash
         
     | 
| 
       225 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       226 
     | 
    
         
            -
                # @return [Object] Returns the model itself
         
     | 
| 
       227 
     | 
    
         
            -
                def build_from_hash(attributes)
         
     | 
| 
       228 
     | 
    
         
            -
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
       229 
     | 
    
         
            -
                  self.class.openapi_types.each_pair do |key, type|
         
     | 
| 
       230 
     | 
    
         
            -
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
       231 
     | 
    
         
            -
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
       232 
     | 
    
         
            -
                      # is documented as an array but the input is not
         
     | 
| 
       233 
     | 
    
         
            -
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
       234 
     | 
    
         
            -
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
         
     | 
| 
       235 
     | 
    
         
            -
                      end
         
     | 
| 
       236 
     | 
    
         
            -
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
       237 
     | 
    
         
            -
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
       238 
     | 
    
         
            -
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
       239 
     | 
    
         
            -
                  end
         
     | 
| 
       240 
     | 
    
         
            -
             
     | 
| 
       241 
     | 
    
         
            -
                  self
         
     | 
| 
       242 
     | 
    
         
            -
                end
         
     | 
| 
       243 
     | 
    
         
            -
             
     | 
| 
       244 
     | 
    
         
            -
                # Deserializes the data based on type
         
     | 
| 
       245 
     | 
    
         
            -
                # @param string type Data type
         
     | 
| 
       246 
     | 
    
         
            -
                # @param string value Value to be deserialized
         
     | 
| 
       247 
     | 
    
         
            -
                # @return [Object] Deserialized data
         
     | 
| 
       248 
     | 
    
         
            -
                def _deserialize(type, value)
         
     | 
| 
       249 
     | 
    
         
            -
                  case type.to_sym
         
     | 
| 
       250 
     | 
    
         
            -
                  when :DateTime
         
     | 
| 
       251 
     | 
    
         
            -
                    DateTime.parse(value)
         
     | 
| 
       252 
     | 
    
         
            -
                  when :Date
         
     | 
| 
       253 
     | 
    
         
            -
                    Date.parse(value)
         
     | 
| 
       254 
     | 
    
         
            -
                  when :String
         
     | 
| 
       255 
     | 
    
         
            -
                    value.to_s
         
     | 
| 
       256 
     | 
    
         
            -
                  when :Integer
         
     | 
| 
       257 
     | 
    
         
            -
                    value.to_i
         
     | 
| 
       258 
     | 
    
         
            -
                  when :Float
         
     | 
| 
       259 
     | 
    
         
            -
                    value.to_f
         
     | 
| 
       260 
     | 
    
         
            -
                  when :Boolean
         
     | 
| 
       261 
     | 
    
         
            -
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
       262 
     | 
    
         
            -
                      true
         
     | 
| 
       263 
     | 
    
         
            -
                    else
         
     | 
| 
       264 
     | 
    
         
            -
                      false
         
     | 
| 
       265 
     | 
    
         
            -
                    end
         
     | 
| 
       266 
     | 
    
         
            -
                  when :Object
         
     | 
| 
       267 
     | 
    
         
            -
                    # generic object (usually a Hash), return directly
         
     | 
| 
       268 
     | 
    
         
            -
                    value
         
     | 
| 
       269 
     | 
    
         
            -
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
       270 
     | 
    
         
            -
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
       271 
     | 
    
         
            -
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
       272 
     | 
    
         
            -
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
       273 
     | 
    
         
            -
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
       274 
     | 
    
         
            -
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
       275 
     | 
    
         
            -
                    {}.tap do |hash|
         
     | 
| 
       276 
     | 
    
         
            -
                      value.each do |k, v|
         
     | 
| 
       277 
     | 
    
         
            -
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
       278 
     | 
    
         
            -
                      end
         
     | 
| 
       279 
     | 
    
         
            -
                    end
         
     | 
| 
       280 
     | 
    
         
            -
                  else # model
         
     | 
| 
       281 
     | 
    
         
            -
                    PulpPythonClient.const_get(type).build_from_hash(value)
         
     | 
| 
       282 
     | 
    
         
            -
                  end
         
     | 
| 
       283 
     | 
    
         
            -
                end
         
     | 
| 
       284 
     | 
    
         
            -
             
     | 
| 
       285 
     | 
    
         
            -
                # Returns the string representation of the object
         
     | 
| 
       286 
     | 
    
         
            -
                # @return [String] String presentation of the object
         
     | 
| 
       287 
     | 
    
         
            -
                def to_s
         
     | 
| 
       288 
     | 
    
         
            -
                  to_hash.to_s
         
     | 
| 
       289 
     | 
    
         
            -
                end
         
     | 
| 
       290 
     | 
    
         
            -
             
     | 
| 
       291 
     | 
    
         
            -
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
       292 
     | 
    
         
            -
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
       293 
     | 
    
         
            -
                def to_body
         
     | 
| 
       294 
     | 
    
         
            -
                  to_hash
         
     | 
| 
       295 
     | 
    
         
            -
                end
         
     | 
| 
       296 
     | 
    
         
            -
             
     | 
| 
       297 
     | 
    
         
            -
                # Returns the object in the form of hash
         
     | 
| 
       298 
     | 
    
         
            -
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
       299 
     | 
    
         
            -
                def to_hash
         
     | 
| 
       300 
     | 
    
         
            -
                  hash = {}
         
     | 
| 
       301 
     | 
    
         
            -
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
       302 
     | 
    
         
            -
                    value = self.send(attr)
         
     | 
| 
       303 
     | 
    
         
            -
                    if value.nil?
         
     | 
| 
       304 
     | 
    
         
            -
                      is_nullable = self.class.openapi_nullable.include?(attr)
         
     | 
| 
       305 
     | 
    
         
            -
                      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
         
     | 
| 
       306 
     | 
    
         
            -
                    end
         
     | 
| 
       307 
     | 
    
         
            -
                    
         
     | 
| 
       308 
     | 
    
         
            -
                    hash[param] = _to_hash(value)
         
     | 
| 
       309 
     | 
    
         
            -
                  end
         
     | 
| 
       310 
     | 
    
         
            -
                  hash
         
     | 
| 
       311 
     | 
    
         
            -
                end
         
     | 
| 
       312 
     | 
    
         
            -
             
     | 
| 
       313 
     | 
    
         
            -
                # Outputs non-array value in the form of hash
         
     | 
| 
       314 
     | 
    
         
            -
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
       315 
     | 
    
         
            -
                # @param [Object] value Any valid value
         
     | 
| 
       316 
     | 
    
         
            -
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
       317 
     | 
    
         
            -
                def _to_hash(value)
         
     | 
| 
       318 
     | 
    
         
            -
                  if value.is_a?(Array)
         
     | 
| 
       319 
     | 
    
         
            -
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
       320 
     | 
    
         
            -
                  elsif value.is_a?(Hash)
         
     | 
| 
       321 
     | 
    
         
            -
                    {}.tap do |hash|
         
     | 
| 
       322 
     | 
    
         
            -
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
       323 
     | 
    
         
            -
                    end
         
     | 
| 
       324 
     | 
    
         
            -
                  elsif value.respond_to? :to_hash
         
     | 
| 
       325 
     | 
    
         
            -
                    value.to_hash
         
     | 
| 
       326 
     | 
    
         
            -
                  else
         
     | 
| 
       327 
     | 
    
         
            -
                    value
         
     | 
| 
       328 
     | 
    
         
            -
                  end
         
     | 
| 
       329 
     | 
    
         
            -
                end
         
     | 
| 
       330 
     | 
    
         
            -
              end
         
     | 
| 
       331 
     | 
    
         
            -
            end
         
     |