openlayer 0.3.0 → 0.4.1
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/.ignore +2 -0
- data/CHANGELOG.md +36 -0
- data/README.md +280 -39
- data/SECURITY.md +27 -0
- data/lib/openlayer/client.rb +64 -59
- data/lib/openlayer/errors.rb +228 -0
- data/lib/openlayer/file_part.rb +58 -0
- data/lib/openlayer/internal/transport/base_client.rb +567 -0
- data/lib/openlayer/internal/transport/pooled_net_requester.rb +198 -0
- data/lib/openlayer/internal/type/array_of.rb +168 -0
- data/lib/openlayer/internal/type/base_model.rb +531 -0
- data/lib/openlayer/internal/type/base_page.rb +55 -0
- data/lib/openlayer/internal/type/boolean.rb +77 -0
- data/lib/openlayer/internal/type/converter.rb +327 -0
- data/lib/openlayer/internal/type/enum.rb +131 -0
- data/lib/openlayer/internal/type/file_input.rb +111 -0
- data/lib/openlayer/internal/type/hash_of.rb +188 -0
- data/lib/openlayer/internal/type/request_parameters.rb +42 -0
- data/lib/openlayer/internal/type/union.rb +237 -0
- data/lib/openlayer/internal/type/unknown.rb +81 -0
- data/lib/openlayer/internal/util.rb +914 -0
- data/lib/openlayer/internal.rb +20 -0
- data/lib/openlayer/models/commit_retrieve_params.rb +14 -0
- data/lib/openlayer/models/commit_retrieve_response.rb +275 -0
- data/lib/openlayer/models/commits/test_result_list_params.rb +91 -0
- data/lib/openlayer/models/commits/test_result_list_response.rb +566 -0
- data/lib/openlayer/models/inference_pipeline_delete_params.rb +14 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_params.rb +33 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +605 -0
- data/lib/openlayer/models/inference_pipeline_update_params.rb +42 -0
- data/lib/openlayer/models/inference_pipeline_update_response.rb +605 -0
- data/lib/openlayer/models/inference_pipelines/data_stream_params.rb +463 -0
- data/lib/openlayer/models/inference_pipelines/data_stream_response.rb +28 -0
- data/lib/openlayer/models/inference_pipelines/row_update_params.rb +90 -0
- data/lib/openlayer/models/inference_pipelines/row_update_response.rb +28 -0
- data/lib/openlayer/models/inference_pipelines/test_result_list_params.rb +83 -0
- data/lib/openlayer/models/inference_pipelines/test_result_list_response.rb +568 -0
- data/lib/openlayer/models/project_create_params.rb +51 -0
- data/lib/openlayer/models/project_create_response.rb +262 -0
- data/lib/openlayer/models/project_list_params.rb +59 -0
- data/lib/openlayer/models/project_list_response.rb +274 -0
- data/lib/openlayer/models/projects/commit_create_params.rb +61 -0
- data/lib/openlayer/models/projects/commit_create_response.rb +277 -0
- data/lib/openlayer/models/projects/commit_list_params.rb +32 -0
- data/lib/openlayer/models/projects/commit_list_response.rb +288 -0
- data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +229 -0
- data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +612 -0
- data/lib/openlayer/models/projects/inference_pipeline_list_params.rb +40 -0
- data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +623 -0
- data/lib/openlayer/models/projects/test_create_params.rb +367 -0
- data/lib/openlayer/models/projects/test_create_response.rb +438 -0
- data/lib/openlayer/models/projects/test_list_params.rb +91 -0
- data/lib/openlayer/models/projects/test_list_response.rb +452 -0
- data/lib/openlayer/models/projects/test_update_params.rb +262 -0
- data/lib/openlayer/models/projects/test_update_response.rb +24 -0
- data/lib/openlayer/models/storage/presigned_url_create_params.rb +24 -0
- data/lib/openlayer/models/storage/presigned_url_create_response.rb +35 -0
- data/lib/openlayer/models.rb +61 -0
- data/lib/openlayer/request_options.rb +77 -0
- data/lib/openlayer/resources/commits/test_results.rb +51 -0
- data/lib/openlayer/resources/commits.rb +38 -0
- data/lib/openlayer/resources/inference_pipelines/data.rb +46 -0
- data/lib/openlayer/resources/inference_pipelines/rows.rb +46 -0
- data/lib/openlayer/resources/inference_pipelines/test_results.rb +49 -0
- data/lib/openlayer/resources/inference_pipelines.rb +101 -0
- data/lib/openlayer/resources/projects/commits.rb +72 -0
- data/lib/openlayer/resources/projects/inference_pipelines.rb +74 -0
- data/lib/openlayer/resources/projects/tests.rb +135 -0
- data/lib/openlayer/resources/projects.rb +80 -0
- data/lib/openlayer/resources/storage/presigned_url.rb +38 -0
- data/lib/openlayer/resources/storage.rb +18 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +96 -12
- data/manifest.yaml +15 -0
- data/rbi/openlayer/client.rbi +58 -0
- data/rbi/openlayer/errors.rbi +205 -0
- data/rbi/openlayer/file_part.rbi +37 -0
- data/rbi/openlayer/internal/transport/base_client.rbi +293 -0
- data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/openlayer/internal/type/array_of.rbi +104 -0
- data/rbi/openlayer/internal/type/base_model.rbi +304 -0
- data/rbi/openlayer/internal/type/base_page.rbi +42 -0
- data/rbi/openlayer/internal/type/boolean.rbi +58 -0
- data/rbi/openlayer/internal/type/converter.rbi +216 -0
- data/rbi/openlayer/internal/type/enum.rbi +82 -0
- data/rbi/openlayer/internal/type/file_input.rbi +59 -0
- data/rbi/openlayer/internal/type/hash_of.rbi +104 -0
- data/rbi/openlayer/internal/type/request_parameters.rbi +29 -0
- data/rbi/openlayer/internal/type/union.rbi +128 -0
- data/rbi/openlayer/internal/type/unknown.rbi +58 -0
- data/rbi/openlayer/internal/util.rbi +487 -0
- data/rbi/openlayer/internal.rbi +18 -0
- data/rbi/openlayer/models/commit_retrieve_params.rbi +27 -0
- data/rbi/openlayer/models/commit_retrieve_response.rbi +393 -0
- data/rbi/openlayer/models/commits/test_result_list_params.rbi +214 -0
- data/rbi/openlayer/models/commits/test_result_list_response.rbi +1256 -0
- data/rbi/openlayer/models/inference_pipeline_delete_params.rbi +30 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_params.rbi +101 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +1022 -0
- data/rbi/openlayer/models/inference_pipeline_update_params.rbi +67 -0
- data/rbi/openlayer/models/inference_pipeline_update_response.rbi +1018 -0
- data/rbi/openlayer/models/inference_pipelines/data_stream_params.rbi +750 -0
- data/rbi/openlayer/models/inference_pipelines/data_stream_response.rbi +73 -0
- data/rbi/openlayer/models/inference_pipelines/row_update_params.rbi +153 -0
- data/rbi/openlayer/models/inference_pipelines/row_update_response.rbi +73 -0
- data/rbi/openlayer/models/inference_pipelines/test_result_list_params.rbi +216 -0
- data/rbi/openlayer/models/inference_pipelines/test_result_list_response.rbi +1258 -0
- data/rbi/openlayer/models/project_create_params.rbi +99 -0
- data/rbi/openlayer/models/project_create_response.rbi +401 -0
- data/rbi/openlayer/models/project_list_params.rbi +121 -0
- data/rbi/openlayer/models/project_list_response.rbi +442 -0
- data/rbi/openlayer/models/projects/commit_create_params.rbi +125 -0
- data/rbi/openlayer/models/projects/commit_create_response.rbi +409 -0
- data/rbi/openlayer/models/projects/commit_list_params.rbi +62 -0
- data/rbi/openlayer/models/projects/commit_list_response.rbi +454 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +560 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +1027 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_params.rbi +73 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +1070 -0
- data/rbi/openlayer/models/projects/test_create_params.rbi +940 -0
- data/rbi/openlayer/models/projects/test_create_response.rbi +1026 -0
- data/rbi/openlayer/models/projects/test_list_params.rbi +165 -0
- data/rbi/openlayer/models/projects/test_list_response.rbi +1067 -0
- data/rbi/openlayer/models/projects/test_update_params.rbi +699 -0
- data/rbi/openlayer/models/projects/test_update_response.rbi +43 -0
- data/rbi/openlayer/models/storage/presigned_url_create_params.rbi +45 -0
- data/rbi/openlayer/models/storage/presigned_url_create_response.rbi +55 -0
- data/rbi/openlayer/models.rbi +26 -0
- data/rbi/openlayer/request_options.rbi +59 -0
- data/rbi/openlayer/resources/commits/test_results.rbi +45 -0
- data/rbi/openlayer/resources/commits.rbi +29 -0
- data/rbi/openlayer/resources/inference_pipelines/data.rbi +41 -0
- data/rbi/openlayer/resources/inference_pipelines/rows.rbi +40 -0
- data/rbi/openlayer/resources/inference_pipelines/test_results.rbi +46 -0
- data/rbi/openlayer/resources/inference_pipelines.rbi +79 -0
- data/rbi/openlayer/resources/projects/commits.rbi +60 -0
- data/rbi/openlayer/resources/projects/inference_pipelines.rbi +69 -0
- data/rbi/openlayer/resources/projects/tests.rbi +123 -0
- data/rbi/openlayer/resources/projects.rbi +64 -0
- data/rbi/openlayer/resources/storage/presigned_url.rbi +28 -0
- data/rbi/openlayer/resources/storage.rbi +15 -0
- data/rbi/openlayer/version.rbi +5 -0
- data/sig/openlayer/client.rbs +32 -0
- data/sig/openlayer/errors.rbs +117 -0
- data/sig/openlayer/file_part.rbs +21 -0
- data/sig/openlayer/internal/transport/base_client.rbs +131 -0
- data/sig/openlayer/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/openlayer/internal/type/array_of.rbs +48 -0
- data/sig/openlayer/internal/type/base_model.rbs +102 -0
- data/sig/openlayer/internal/type/base_page.rbs +24 -0
- data/sig/openlayer/internal/type/boolean.rbs +26 -0
- data/sig/openlayer/internal/type/converter.rbs +79 -0
- data/sig/openlayer/internal/type/enum.rbs +32 -0
- data/sig/openlayer/internal/type/file_input.rbs +25 -0
- data/sig/openlayer/internal/type/hash_of.rbs +48 -0
- data/sig/openlayer/internal/type/request_parameters.rbs +19 -0
- data/sig/openlayer/internal/type/union.rbs +52 -0
- data/sig/openlayer/internal/type/unknown.rbs +26 -0
- data/sig/openlayer/internal/util.rbs +185 -0
- data/sig/openlayer/internal.rbs +9 -0
- data/sig/openlayer/models/commit_retrieve_params.rbs +15 -0
- data/sig/openlayer/models/commit_retrieve_response.rbs +209 -0
- data/sig/openlayer/models/commits/test_result_list_params.rbs +91 -0
- data/sig/openlayer/models/commits/test_result_list_response.rbs +529 -0
- data/sig/openlayer/models/inference_pipeline_delete_params.rbs +15 -0
- data/sig/openlayer/models/inference_pipeline_retrieve_params.rbs +41 -0
- data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +493 -0
- data/sig/openlayer/models/inference_pipeline_update_params.rbs +34 -0
- data/sig/openlayer/models/inference_pipeline_update_response.rbs +493 -0
- data/sig/openlayer/models/inference_pipelines/data_stream_params.rbs +386 -0
- data/sig/openlayer/models/inference_pipelines/data_stream_response.rbs +32 -0
- data/sig/openlayer/models/inference_pipelines/row_update_params.rbs +75 -0
- data/sig/openlayer/models/inference_pipelines/row_update_response.rbs +32 -0
- data/sig/openlayer/models/inference_pipelines/test_result_list_params.rbs +84 -0
- data/sig/openlayer/models/inference_pipelines/test_result_list_response.rbs +529 -0
- data/sig/openlayer/models/project_create_params.rbs +53 -0
- data/sig/openlayer/models/project_create_response.rbs +210 -0
- data/sig/openlayer/models/project_list_params.rbs +68 -0
- data/sig/openlayer/models/project_list_response.rbs +225 -0
- data/sig/openlayer/models/projects/commit_create_params.rbs +82 -0
- data/sig/openlayer/models/projects/commit_create_response.rbs +211 -0
- data/sig/openlayer/models/projects/commit_list_params.rbs +34 -0
- data/sig/openlayer/models/projects/commit_list_response.rbs +228 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +308 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +495 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_params.rbs +40 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +512 -0
- data/sig/openlayer/models/projects/test_create_params.rbs +388 -0
- data/sig/openlayer/models/projects/test_create_response.rbs +427 -0
- data/sig/openlayer/models/projects/test_list_params.rbs +85 -0
- data/sig/openlayer/models/projects/test_list_response.rbs +442 -0
- data/sig/openlayer/models/projects/test_update_params.rbs +275 -0
- data/sig/openlayer/models/projects/test_update_response.rbs +25 -0
- data/sig/openlayer/models/storage/presigned_url_create_params.rbs +25 -0
- data/sig/openlayer/models/storage/presigned_url_create_response.rbs +22 -0
- data/sig/openlayer/models.rbs +21 -0
- data/sig/openlayer/request_options.rbs +34 -0
- data/sig/openlayer/resources/commits/test_results.rbs +19 -0
- data/sig/openlayer/resources/commits.rbs +14 -0
- data/sig/openlayer/resources/inference_pipelines/data.rbs +16 -0
- data/sig/openlayer/resources/inference_pipelines/rows.rbs +17 -0
- data/sig/openlayer/resources/inference_pipelines/test_results.rbs +18 -0
- data/sig/openlayer/resources/inference_pipelines.rbs +32 -0
- data/sig/openlayer/resources/projects/commits.rbs +25 -0
- data/sig/openlayer/resources/projects/inference_pipelines.rbs +26 -0
- data/sig/openlayer/resources/projects/tests.rbs +45 -0
- data/sig/openlayer/resources/projects.rbs +28 -0
- data/sig/openlayer/resources/storage/presigned_url.rbs +14 -0
- data/sig/openlayer/resources/storage.rbs +9 -0
- data/sig/openlayer/version.rbs +3 -0
- metadata +223 -91
- data/.env +0 -0
- data/.rspec +0 -3
- data/.rubocop.yml +0 -13
- data/LICENSE +0 -21
- data/Rakefile +0 -12
- data/examples/staging/.DS_Store +0 -0
- data/examples/staging/commit.yaml +0 -2
- data/examples/staging/model/model_config.yaml +0 -12
- data/examples/staging/validation/dataset_config.yaml +0 -12
- data/lib/openlayer/error.rb +0 -5
- data/lib/openlayer/inference_pipeline.rb +0 -36
- data/lib/openlayer/object.rb +0 -28
- data/lib/openlayer/objects/project.rb +0 -185
- data/lib/openlayer/objects/project_version.rb +0 -89
- data/lib/openlayer/services/s3_presigned_client.rb +0 -47
- data/lib/openlayer/services/tar_file_helper.rb +0 -55
- data/openlayer.gemspec +0 -45
- data/sig/openlayer.rbs +0 -4
| @@ -0,0 +1,188 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Internal
         | 
| 5 | 
            +
                module Type
         | 
| 6 | 
            +
                  # @api private
         | 
| 7 | 
            +
                  #
         | 
| 8 | 
            +
                  # @abstract
         | 
| 9 | 
            +
                  #
         | 
| 10 | 
            +
                  # @generic Elem
         | 
| 11 | 
            +
                  #
         | 
| 12 | 
            +
                  # Hash of items of a given type.
         | 
| 13 | 
            +
                  class HashOf
         | 
| 14 | 
            +
                    include Openlayer::Internal::Type::Converter
         | 
| 15 | 
            +
                    include Openlayer::Internal::Util::SorbetRuntimeSupport
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                    private_class_method :new
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                    # @overload [](type_info, spec = {})
         | 
| 20 | 
            +
                    #
         | 
| 21 | 
            +
                    # @param type_info [Hash{Symbol=>Object}, Proc, Openlayer::Internal::Type::Converter, Class]
         | 
| 22 | 
            +
                    #
         | 
| 23 | 
            +
                    # @param spec [Hash{Symbol=>Object}] .
         | 
| 24 | 
            +
                    #
         | 
| 25 | 
            +
                    #   @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
         | 
| 26 | 
            +
                    #
         | 
| 27 | 
            +
                    #   @option spec [Proc] :enum
         | 
| 28 | 
            +
                    #
         | 
| 29 | 
            +
                    #   @option spec [Proc] :union
         | 
| 30 | 
            +
                    #
         | 
| 31 | 
            +
                    #   @option spec [Boolean] :"nil?"
         | 
| 32 | 
            +
                    #
         | 
| 33 | 
            +
                    # @return [self]
         | 
| 34 | 
            +
                    def self.[](...) = new(...)
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                    # @api public
         | 
| 37 | 
            +
                    #
         | 
| 38 | 
            +
                    # @param other [Object]
         | 
| 39 | 
            +
                    #
         | 
| 40 | 
            +
                    # @return [Boolean]
         | 
| 41 | 
            +
                    def ===(other)
         | 
| 42 | 
            +
                      type = item_type
         | 
| 43 | 
            +
                      case other
         | 
| 44 | 
            +
                      in Hash
         | 
| 45 | 
            +
                        other.all? do |key, val|
         | 
| 46 | 
            +
                          case [key, val]
         | 
| 47 | 
            +
                          in [Symbol | String, ^type]
         | 
| 48 | 
            +
                            true
         | 
| 49 | 
            +
                          else
         | 
| 50 | 
            +
                            false
         | 
| 51 | 
            +
                          end
         | 
| 52 | 
            +
                        end
         | 
| 53 | 
            +
                      else
         | 
| 54 | 
            +
                        false
         | 
| 55 | 
            +
                      end
         | 
| 56 | 
            +
                    end
         | 
| 57 | 
            +
             | 
| 58 | 
            +
                    # @api public
         | 
| 59 | 
            +
                    #
         | 
| 60 | 
            +
                    # @param other [Object]
         | 
| 61 | 
            +
                    #
         | 
| 62 | 
            +
                    # @return [Boolean]
         | 
| 63 | 
            +
                    def ==(other)
         | 
| 64 | 
            +
                      # rubocop:disable Layout/LineLength
         | 
| 65 | 
            +
                      other.is_a?(Openlayer::Internal::Type::HashOf) && other.nilable? == nilable? && other.item_type == item_type
         | 
| 66 | 
            +
                      # rubocop:enable Layout/LineLength
         | 
| 67 | 
            +
                    end
         | 
| 68 | 
            +
             | 
| 69 | 
            +
                    # @api public
         | 
| 70 | 
            +
                    #
         | 
| 71 | 
            +
                    # @return [Integer]
         | 
| 72 | 
            +
                    def hash = [self.class, item_type].hash
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                    # @api private
         | 
| 75 | 
            +
                    #
         | 
| 76 | 
            +
                    # @param value [Hash{Object=>Object}, Object]
         | 
| 77 | 
            +
                    #
         | 
| 78 | 
            +
                    # @param state [Hash{Symbol=>Object}] .
         | 
| 79 | 
            +
                    #
         | 
| 80 | 
            +
                    #   @option state [Boolean] :translate_names
         | 
| 81 | 
            +
                    #
         | 
| 82 | 
            +
                    #   @option state [Boolean] :strictness
         | 
| 83 | 
            +
                    #
         | 
| 84 | 
            +
                    #   @option state [Hash{Symbol=>Object}] :exactness
         | 
| 85 | 
            +
                    #
         | 
| 86 | 
            +
                    #   @option state [Class<StandardError>] :error
         | 
| 87 | 
            +
                    #
         | 
| 88 | 
            +
                    #   @option state [Integer] :branched
         | 
| 89 | 
            +
                    #
         | 
| 90 | 
            +
                    # @return [Hash{Symbol=>Object}, Object]
         | 
| 91 | 
            +
                    def coerce(value, state:)
         | 
| 92 | 
            +
                      exactness = state.fetch(:exactness)
         | 
| 93 | 
            +
             | 
| 94 | 
            +
                      unless value.is_a?(Hash)
         | 
| 95 | 
            +
                        exactness[:no] += 1
         | 
| 96 | 
            +
                        state[:error] = TypeError.new("#{value.class} can't be coerced into #{Hash}")
         | 
| 97 | 
            +
                        return value
         | 
| 98 | 
            +
                      end
         | 
| 99 | 
            +
             | 
| 100 | 
            +
                      target = item_type
         | 
| 101 | 
            +
                      exactness[:yes] += 1
         | 
| 102 | 
            +
                      value
         | 
| 103 | 
            +
                        .to_h do |key, val|
         | 
| 104 | 
            +
                          k = key.is_a?(String) ? key.to_sym : key
         | 
| 105 | 
            +
                          v =
         | 
| 106 | 
            +
                            case [nilable?, val]
         | 
| 107 | 
            +
                            in [true, nil]
         | 
| 108 | 
            +
                              exactness[:yes] += 1
         | 
| 109 | 
            +
                              nil
         | 
| 110 | 
            +
                            else
         | 
| 111 | 
            +
                              Openlayer::Internal::Type::Converter.coerce(target, val, state: state)
         | 
| 112 | 
            +
                            end
         | 
| 113 | 
            +
             | 
| 114 | 
            +
                          exactness[:no] += 1 unless k.is_a?(Symbol)
         | 
| 115 | 
            +
                          [k, v]
         | 
| 116 | 
            +
                        end
         | 
| 117 | 
            +
                    end
         | 
| 118 | 
            +
             | 
| 119 | 
            +
                    # @api private
         | 
| 120 | 
            +
                    #
         | 
| 121 | 
            +
                    # @param value [Hash{Object=>Object}, Object]
         | 
| 122 | 
            +
                    #
         | 
| 123 | 
            +
                    # @param state [Hash{Symbol=>Object}] .
         | 
| 124 | 
            +
                    #
         | 
| 125 | 
            +
                    #   @option state [Boolean] :can_retry
         | 
| 126 | 
            +
                    #
         | 
| 127 | 
            +
                    # @return [Hash{Symbol=>Object}, Object]
         | 
| 128 | 
            +
                    def dump(value, state:)
         | 
| 129 | 
            +
                      target = item_type
         | 
| 130 | 
            +
                      if value.is_a?(Hash)
         | 
| 131 | 
            +
                        value.transform_values do
         | 
| 132 | 
            +
                          Openlayer::Internal::Type::Converter.dump(target, _1, state: state)
         | 
| 133 | 
            +
                        end
         | 
| 134 | 
            +
                      else
         | 
| 135 | 
            +
                        super
         | 
| 136 | 
            +
                      end
         | 
| 137 | 
            +
                    end
         | 
| 138 | 
            +
             | 
| 139 | 
            +
                    # @api private
         | 
| 140 | 
            +
                    #
         | 
| 141 | 
            +
                    # @return [Object]
         | 
| 142 | 
            +
                    def to_sorbet_type
         | 
| 143 | 
            +
                      T::Hash[Openlayer::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
         | 
| 144 | 
            +
                    end
         | 
| 145 | 
            +
             | 
| 146 | 
            +
                    # @api private
         | 
| 147 | 
            +
                    #
         | 
| 148 | 
            +
                    # @return [generic<Elem>]
         | 
| 149 | 
            +
                    protected def item_type = @item_type_fn.call
         | 
| 150 | 
            +
             | 
| 151 | 
            +
                    # @api private
         | 
| 152 | 
            +
                    #
         | 
| 153 | 
            +
                    # @return [Boolean]
         | 
| 154 | 
            +
                    protected def nilable? = @nilable
         | 
| 155 | 
            +
             | 
| 156 | 
            +
                    # @api private
         | 
| 157 | 
            +
                    #
         | 
| 158 | 
            +
                    # @param type_info [Hash{Symbol=>Object}, Proc, Openlayer::Internal::Type::Converter, Class]
         | 
| 159 | 
            +
                    #
         | 
| 160 | 
            +
                    # @param spec [Hash{Symbol=>Object}] .
         | 
| 161 | 
            +
                    #
         | 
| 162 | 
            +
                    #   @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
         | 
| 163 | 
            +
                    #
         | 
| 164 | 
            +
                    #   @option spec [Proc] :enum
         | 
| 165 | 
            +
                    #
         | 
| 166 | 
            +
                    #   @option spec [Proc] :union
         | 
| 167 | 
            +
                    #
         | 
| 168 | 
            +
                    #   @option spec [Boolean] :"nil?"
         | 
| 169 | 
            +
                    def initialize(type_info, spec = {})
         | 
| 170 | 
            +
                      @item_type_fn = Openlayer::Internal::Type::Converter.type_info(type_info || spec)
         | 
| 171 | 
            +
                      @meta = Openlayer::Internal::Type::Converter.meta_info(type_info, spec)
         | 
| 172 | 
            +
                      @nilable = spec.fetch(:nil?, false)
         | 
| 173 | 
            +
                    end
         | 
| 174 | 
            +
             | 
| 175 | 
            +
                    # @api private
         | 
| 176 | 
            +
                    #
         | 
| 177 | 
            +
                    # @param depth [Integer]
         | 
| 178 | 
            +
                    #
         | 
| 179 | 
            +
                    # @return [String]
         | 
| 180 | 
            +
                    def inspect(depth: 0)
         | 
| 181 | 
            +
                      items = Openlayer::Internal::Type::Converter.inspect(item_type, depth: depth.succ)
         | 
| 182 | 
            +
             | 
| 183 | 
            +
                      "#{self.class}[#{[items, nilable? ? 'nil' : nil].compact.join(' | ')}]"
         | 
| 184 | 
            +
                    end
         | 
| 185 | 
            +
                  end
         | 
| 186 | 
            +
                end
         | 
| 187 | 
            +
              end
         | 
| 188 | 
            +
            end
         | 
| @@ -0,0 +1,42 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Internal
         | 
| 5 | 
            +
                module Type
         | 
| 6 | 
            +
                  # @api private
         | 
| 7 | 
            +
                  module RequestParameters
         | 
| 8 | 
            +
                    # @!attribute request_options
         | 
| 9 | 
            +
                    # Options to specify HTTP behaviour for this request.
         | 
| 10 | 
            +
                    #
         | 
| 11 | 
            +
                    #   @return [Openlayer::RequestOptions, Hash{Symbol=>Object}]
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                    # @param mod [Module]
         | 
| 14 | 
            +
                    def self.included(mod)
         | 
| 15 | 
            +
                      raise ArgumentError.new(mod) unless mod <= Openlayer::Internal::Type::BaseModel
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                      mod.optional(:request_options, Openlayer::RequestOptions)
         | 
| 18 | 
            +
                    end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                    # @api private
         | 
| 21 | 
            +
                    module Converter
         | 
| 22 | 
            +
                      # @api private
         | 
| 23 | 
            +
                      #
         | 
| 24 | 
            +
                      # @param params [Object]
         | 
| 25 | 
            +
                      #
         | 
| 26 | 
            +
                      # @return [Array(Object, Hash{Symbol=>Object})]
         | 
| 27 | 
            +
                      def dump_request(params)
         | 
| 28 | 
            +
                        state = {can_retry: true}
         | 
| 29 | 
            +
                        case (dumped = dump(params, state: state))
         | 
| 30 | 
            +
                        in Hash
         | 
| 31 | 
            +
                          options = Openlayer::Internal::Util.coerce_hash!(dumped[:request_options]).to_h
         | 
| 32 | 
            +
                          request_options = state.fetch(:can_retry) ? options : {**options, max_retries: 0}
         | 
| 33 | 
            +
                          [dumped.except(:request_options), request_options]
         | 
| 34 | 
            +
                        else
         | 
| 35 | 
            +
                          [dumped, nil]
         | 
| 36 | 
            +
                        end
         | 
| 37 | 
            +
                      end
         | 
| 38 | 
            +
                    end
         | 
| 39 | 
            +
                  end
         | 
| 40 | 
            +
                end
         | 
| 41 | 
            +
              end
         | 
| 42 | 
            +
            end
         | 
| @@ -0,0 +1,237 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Internal
         | 
| 5 | 
            +
                module Type
         | 
| 6 | 
            +
                  # @api private
         | 
| 7 | 
            +
                  module Union
         | 
| 8 | 
            +
                    include Openlayer::Internal::Type::Converter
         | 
| 9 | 
            +
                    include Openlayer::Internal::Util::SorbetRuntimeSupport
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                    # @api private
         | 
| 12 | 
            +
                    #
         | 
| 13 | 
            +
                    # All of the specified variant info for this union.
         | 
| 14 | 
            +
                    #
         | 
| 15 | 
            +
                    # @return [Array<Array(Symbol, Proc, Hash{Symbol=>Object})>]
         | 
| 16 | 
            +
                    private def known_variants = (@known_variants ||= [])
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    # @api private
         | 
| 19 | 
            +
                    #
         | 
| 20 | 
            +
                    # @return [Array<Array(Symbol, Object, Hash{Symbol=>Object})>]
         | 
| 21 | 
            +
                    protected def derefed_variants
         | 
| 22 | 
            +
                      known_variants.map { |key, variant_fn, meta| [key, variant_fn.call, meta] }
         | 
| 23 | 
            +
                    end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                    # All of the specified variants for this union.
         | 
| 26 | 
            +
                    #
         | 
| 27 | 
            +
                    # @return [Array<Object>]
         | 
| 28 | 
            +
                    def variants = derefed_variants.map { _2 }
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                    # @api private
         | 
| 31 | 
            +
                    #
         | 
| 32 | 
            +
                    # @param property [Symbol]
         | 
| 33 | 
            +
                    private def discriminator(property)
         | 
| 34 | 
            +
                      case property
         | 
| 35 | 
            +
                      in Symbol
         | 
| 36 | 
            +
                        @discriminator = property
         | 
| 37 | 
            +
                      end
         | 
| 38 | 
            +
                    end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                    # @api private
         | 
| 41 | 
            +
                    #
         | 
| 42 | 
            +
                    # @param key [Symbol, Hash{Symbol=>Object}, Proc, Openlayer::Internal::Type::Converter, Class]
         | 
| 43 | 
            +
                    #
         | 
| 44 | 
            +
                    # @param spec [Hash{Symbol=>Object}, Proc, Openlayer::Internal::Type::Converter, Class] .
         | 
| 45 | 
            +
                    #
         | 
| 46 | 
            +
                    #   @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
         | 
| 47 | 
            +
                    #
         | 
| 48 | 
            +
                    #   @option spec [Proc] :enum
         | 
| 49 | 
            +
                    #
         | 
| 50 | 
            +
                    #   @option spec [Proc] :union
         | 
| 51 | 
            +
                    #
         | 
| 52 | 
            +
                    #   @option spec [Boolean] :"nil?"
         | 
| 53 | 
            +
                    private def variant(key, spec = nil)
         | 
| 54 | 
            +
                      meta = Openlayer::Internal::Type::Converter.meta_info(nil, spec)
         | 
| 55 | 
            +
                      variant_info =
         | 
| 56 | 
            +
                        case key
         | 
| 57 | 
            +
                        in Symbol
         | 
| 58 | 
            +
                          [key, Openlayer::Internal::Type::Converter.type_info(spec), meta]
         | 
| 59 | 
            +
                        in Proc | Openlayer::Internal::Type::Converter | Class | Hash
         | 
| 60 | 
            +
                          [nil, Openlayer::Internal::Type::Converter.type_info(key), meta]
         | 
| 61 | 
            +
                        end
         | 
| 62 | 
            +
             | 
| 63 | 
            +
                      known_variants << variant_info
         | 
| 64 | 
            +
                    end
         | 
| 65 | 
            +
             | 
| 66 | 
            +
                    # @api private
         | 
| 67 | 
            +
                    #
         | 
| 68 | 
            +
                    # @param value [Object]
         | 
| 69 | 
            +
                    #
         | 
| 70 | 
            +
                    # @return [Openlayer::Internal::Type::Converter, Class, nil]
         | 
| 71 | 
            +
                    private def resolve_variant(value)
         | 
| 72 | 
            +
                      case [@discriminator, value]
         | 
| 73 | 
            +
                      in [_, Openlayer::Internal::Type::BaseModel]
         | 
| 74 | 
            +
                        value.class
         | 
| 75 | 
            +
                      in [Symbol, Hash]
         | 
| 76 | 
            +
                        key = value.fetch(@discriminator) do
         | 
| 77 | 
            +
                          value.fetch(@discriminator.to_s, Openlayer::Internal::OMIT)
         | 
| 78 | 
            +
                        end
         | 
| 79 | 
            +
             | 
| 80 | 
            +
                        return nil if key == Openlayer::Internal::OMIT
         | 
| 81 | 
            +
             | 
| 82 | 
            +
                        key = key.to_sym if key.is_a?(String)
         | 
| 83 | 
            +
                        _, found = known_variants.find { |k,| k == key }
         | 
| 84 | 
            +
                        found&.call
         | 
| 85 | 
            +
                      else
         | 
| 86 | 
            +
                        nil
         | 
| 87 | 
            +
                      end
         | 
| 88 | 
            +
                    end
         | 
| 89 | 
            +
             | 
| 90 | 
            +
                    # rubocop:disable Style/HashEachMethods
         | 
| 91 | 
            +
                    # rubocop:disable Style/CaseEquality
         | 
| 92 | 
            +
             | 
| 93 | 
            +
                    # @api public
         | 
| 94 | 
            +
                    #
         | 
| 95 | 
            +
                    # @param other [Object]
         | 
| 96 | 
            +
                    #
         | 
| 97 | 
            +
                    # @return [Boolean]
         | 
| 98 | 
            +
                    def ===(other)
         | 
| 99 | 
            +
                      known_variants.any? do |_, variant_fn|
         | 
| 100 | 
            +
                        variant_fn.call === other
         | 
| 101 | 
            +
                      end
         | 
| 102 | 
            +
                    end
         | 
| 103 | 
            +
             | 
| 104 | 
            +
                    # @api public
         | 
| 105 | 
            +
                    #
         | 
| 106 | 
            +
                    # @param other [Object]
         | 
| 107 | 
            +
                    #
         | 
| 108 | 
            +
                    # @return [Boolean]
         | 
| 109 | 
            +
                    def ==(other)
         | 
| 110 | 
            +
                      Openlayer::Internal::Type::Union === other && other.derefed_variants == derefed_variants
         | 
| 111 | 
            +
                    end
         | 
| 112 | 
            +
             | 
| 113 | 
            +
                    # @api public
         | 
| 114 | 
            +
                    #
         | 
| 115 | 
            +
                    # @return [Integer]
         | 
| 116 | 
            +
                    def hash = variants.hash
         | 
| 117 | 
            +
             | 
| 118 | 
            +
                    # @api private
         | 
| 119 | 
            +
                    #
         | 
| 120 | 
            +
                    # Tries to efficiently coerce the given value to one of the known variants.
         | 
| 121 | 
            +
                    #
         | 
| 122 | 
            +
                    # If the value cannot match any of the known variants, the coercion is considered
         | 
| 123 | 
            +
                    # non-viable and returns the original value.
         | 
| 124 | 
            +
                    #
         | 
| 125 | 
            +
                    # @param value [Object]
         | 
| 126 | 
            +
                    #
         | 
| 127 | 
            +
                    # @param state [Hash{Symbol=>Object}] .
         | 
| 128 | 
            +
                    #
         | 
| 129 | 
            +
                    #   @option state [Boolean] :translate_names
         | 
| 130 | 
            +
                    #
         | 
| 131 | 
            +
                    #   @option state [Boolean] :strictness
         | 
| 132 | 
            +
                    #
         | 
| 133 | 
            +
                    #   @option state [Hash{Symbol=>Object}] :exactness
         | 
| 134 | 
            +
                    #
         | 
| 135 | 
            +
                    #   @option state [Class<StandardError>] :error
         | 
| 136 | 
            +
                    #
         | 
| 137 | 
            +
                    #   @option state [Integer] :branched
         | 
| 138 | 
            +
                    #
         | 
| 139 | 
            +
                    # @return [Object]
         | 
| 140 | 
            +
                    def coerce(value, state:)
         | 
| 141 | 
            +
                      if (target = resolve_variant(value))
         | 
| 142 | 
            +
                        return Openlayer::Internal::Type::Converter.coerce(target, value, state: state)
         | 
| 143 | 
            +
                      end
         | 
| 144 | 
            +
             | 
| 145 | 
            +
                      strictness = state.fetch(:strictness)
         | 
| 146 | 
            +
                      exactness = state.fetch(:exactness)
         | 
| 147 | 
            +
             | 
| 148 | 
            +
                      alternatives = []
         | 
| 149 | 
            +
                      known_variants.each do |_, variant_fn|
         | 
| 150 | 
            +
                        target = variant_fn.call
         | 
| 151 | 
            +
                        exact = state[:exactness] = {yes: 0, no: 0, maybe: 0}
         | 
| 152 | 
            +
                        state[:branched] += 1
         | 
| 153 | 
            +
             | 
| 154 | 
            +
                        coerced = Openlayer::Internal::Type::Converter.coerce(target, value, state: state)
         | 
| 155 | 
            +
                        yes, no, maybe = exact.values
         | 
| 156 | 
            +
                        if (no + maybe).zero? || (!strictness && yes.positive?)
         | 
| 157 | 
            +
                          exact.each { exactness[_1] += _2 }
         | 
| 158 | 
            +
                          state[:exactness] = exactness
         | 
| 159 | 
            +
                          return coerced
         | 
| 160 | 
            +
                        elsif maybe.positive?
         | 
| 161 | 
            +
                          alternatives << [[-yes, -maybe, no], exact, coerced]
         | 
| 162 | 
            +
                        end
         | 
| 163 | 
            +
                      end
         | 
| 164 | 
            +
             | 
| 165 | 
            +
                      case alternatives.sort_by!(&:first)
         | 
| 166 | 
            +
                      in []
         | 
| 167 | 
            +
                        exactness[:no] += 1
         | 
| 168 | 
            +
                        state[:error] = ArgumentError.new("no matching variant for #{value.inspect}")
         | 
| 169 | 
            +
                        value
         | 
| 170 | 
            +
                      in [[_, exact, coerced], *]
         | 
| 171 | 
            +
                        exact.each { exactness[_1] += _2 }
         | 
| 172 | 
            +
                        coerced
         | 
| 173 | 
            +
                      end
         | 
| 174 | 
            +
                        .tap { state[:exactness] = exactness }
         | 
| 175 | 
            +
                    ensure
         | 
| 176 | 
            +
                      state[:strictness] = strictness
         | 
| 177 | 
            +
                    end
         | 
| 178 | 
            +
             | 
| 179 | 
            +
                    # @api private
         | 
| 180 | 
            +
                    #
         | 
| 181 | 
            +
                    # @param value [Object]
         | 
| 182 | 
            +
                    #
         | 
| 183 | 
            +
                    # @param state [Hash{Symbol=>Object}] .
         | 
| 184 | 
            +
                    #
         | 
| 185 | 
            +
                    #   @option state [Boolean] :can_retry
         | 
| 186 | 
            +
                    #
         | 
| 187 | 
            +
                    # @return [Object]
         | 
| 188 | 
            +
                    def dump(value, state:)
         | 
| 189 | 
            +
                      if (target = resolve_variant(value))
         | 
| 190 | 
            +
                        return Openlayer::Internal::Type::Converter.dump(target, value, state: state)
         | 
| 191 | 
            +
                      end
         | 
| 192 | 
            +
             | 
| 193 | 
            +
                      known_variants.each do
         | 
| 194 | 
            +
                        target = _2.call
         | 
| 195 | 
            +
                        return Openlayer::Internal::Type::Converter.dump(target, value, state: state) if target === value
         | 
| 196 | 
            +
                      end
         | 
| 197 | 
            +
             | 
| 198 | 
            +
                      super
         | 
| 199 | 
            +
                    end
         | 
| 200 | 
            +
             | 
| 201 | 
            +
                    # @api private
         | 
| 202 | 
            +
                    #
         | 
| 203 | 
            +
                    # @return [Object]
         | 
| 204 | 
            +
                    def to_sorbet_type
         | 
| 205 | 
            +
                      types = variants.map { Openlayer::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
         | 
| 206 | 
            +
                      case types
         | 
| 207 | 
            +
                      in []
         | 
| 208 | 
            +
                        T.noreturn
         | 
| 209 | 
            +
                      in [type]
         | 
| 210 | 
            +
                        type
         | 
| 211 | 
            +
                      else
         | 
| 212 | 
            +
                        T.any(*types)
         | 
| 213 | 
            +
                      end
         | 
| 214 | 
            +
                    end
         | 
| 215 | 
            +
             | 
| 216 | 
            +
                    # rubocop:enable Style/CaseEquality
         | 
| 217 | 
            +
                    # rubocop:enable Style/HashEachMethods
         | 
| 218 | 
            +
             | 
| 219 | 
            +
                    # @api private
         | 
| 220 | 
            +
                    #
         | 
| 221 | 
            +
                    # @param depth [Integer]
         | 
| 222 | 
            +
                    #
         | 
| 223 | 
            +
                    # @return [String]
         | 
| 224 | 
            +
                    def inspect(depth: 0)
         | 
| 225 | 
            +
                      if depth.positive?
         | 
| 226 | 
            +
                        return is_a?(Module) ? super() : self.class.name
         | 
| 227 | 
            +
                      end
         | 
| 228 | 
            +
             | 
| 229 | 
            +
                      members = variants.map { Openlayer::Internal::Type::Converter.inspect(_1, depth: depth.succ) }
         | 
| 230 | 
            +
                      prefix = is_a?(Module) ? name : self.class.name
         | 
| 231 | 
            +
             | 
| 232 | 
            +
                      "#{prefix}[#{members.join(' | ')}]"
         | 
| 233 | 
            +
                    end
         | 
| 234 | 
            +
                  end
         | 
| 235 | 
            +
                end
         | 
| 236 | 
            +
              end
         | 
| 237 | 
            +
            end
         | 
| @@ -0,0 +1,81 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Internal
         | 
| 5 | 
            +
                module Type
         | 
| 6 | 
            +
                  # @api private
         | 
| 7 | 
            +
                  #
         | 
| 8 | 
            +
                  # @abstract
         | 
| 9 | 
            +
                  #
         | 
| 10 | 
            +
                  # When we don't know what to expect for the value.
         | 
| 11 | 
            +
                  class Unknown
         | 
| 12 | 
            +
                    extend Openlayer::Internal::Type::Converter
         | 
| 13 | 
            +
                    extend Openlayer::Internal::Util::SorbetRuntimeSupport
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                    # rubocop:disable Lint/UnusedMethodArgument
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                    private_class_method :new
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                    # @api public
         | 
| 20 | 
            +
                    #
         | 
| 21 | 
            +
                    # @param other [Object]
         | 
| 22 | 
            +
                    #
         | 
| 23 | 
            +
                    # @return [Boolean]
         | 
| 24 | 
            +
                    def self.===(other) = true
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                    # @api public
         | 
| 27 | 
            +
                    #
         | 
| 28 | 
            +
                    # @param other [Object]
         | 
| 29 | 
            +
                    #
         | 
| 30 | 
            +
                    # @return [Boolean]
         | 
| 31 | 
            +
                    def self.==(other) = other.is_a?(Class) && other <= Openlayer::Internal::Type::Unknown
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                    class << self
         | 
| 34 | 
            +
                      # @api private
         | 
| 35 | 
            +
                      #
         | 
| 36 | 
            +
                      # No coercion needed for Unknown type.
         | 
| 37 | 
            +
                      #
         | 
| 38 | 
            +
                      # @param value [Object]
         | 
| 39 | 
            +
                      #
         | 
| 40 | 
            +
                      # @param state [Hash{Symbol=>Object}] .
         | 
| 41 | 
            +
                      #
         | 
| 42 | 
            +
                      #   @option state [Boolean] :translate_names
         | 
| 43 | 
            +
                      #
         | 
| 44 | 
            +
                      #   @option state [Boolean] :strictness
         | 
| 45 | 
            +
                      #
         | 
| 46 | 
            +
                      #   @option state [Hash{Symbol=>Object}] :exactness
         | 
| 47 | 
            +
                      #
         | 
| 48 | 
            +
                      #   @option state [Class<StandardError>] :error
         | 
| 49 | 
            +
                      #
         | 
| 50 | 
            +
                      #   @option state [Integer] :branched
         | 
| 51 | 
            +
                      #
         | 
| 52 | 
            +
                      # @return [Object]
         | 
| 53 | 
            +
                      def coerce(value, state:)
         | 
| 54 | 
            +
                        state.fetch(:exactness)[:yes] += 1
         | 
| 55 | 
            +
                        value
         | 
| 56 | 
            +
                      end
         | 
| 57 | 
            +
             | 
| 58 | 
            +
                      # @!method dump(value, state:)
         | 
| 59 | 
            +
                      #   @api private
         | 
| 60 | 
            +
                      #
         | 
| 61 | 
            +
                      #   @param value [Object]
         | 
| 62 | 
            +
                      #
         | 
| 63 | 
            +
                      #   @param state [Hash{Symbol=>Object}] .
         | 
| 64 | 
            +
                      #
         | 
| 65 | 
            +
                      #     @option state [Boolean] :can_retry
         | 
| 66 | 
            +
                      #
         | 
| 67 | 
            +
                      #   @return [Object]
         | 
| 68 | 
            +
             | 
| 69 | 
            +
                      # @api private
         | 
| 70 | 
            +
                      #
         | 
| 71 | 
            +
                      # @return [Object]
         | 
| 72 | 
            +
                      def to_sorbet_type
         | 
| 73 | 
            +
                        T.anything
         | 
| 74 | 
            +
                      end
         | 
| 75 | 
            +
                    end
         | 
| 76 | 
            +
             | 
| 77 | 
            +
                    # rubocop:enable Lint/UnusedMethodArgument
         | 
| 78 | 
            +
                  end
         | 
| 79 | 
            +
                end
         | 
| 80 | 
            +
              end
         | 
| 81 | 
            +
            end
         |