spartera_api_sdk 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +372 -0
- data/Rakefile +10 -0
- data/docs/APIKeysApi.md +537 -0
- data/docs/Alerts.md +30 -0
- data/docs/AlertsApi.md +525 -0
- data/docs/AlertsInput.md +24 -0
- data/docs/AlertsUpdate.md +24 -0
- data/docs/ApiKeys.md +40 -0
- data/docs/ApiKeysInput.md +34 -0
- data/docs/ApiKeysUpdate.md +34 -0
- data/docs/AssetPriceHistory.md +30 -0
- data/docs/AssetPriceHistoryApi.md +597 -0
- data/docs/AssetPriceHistoryInput.md +24 -0
- data/docs/AssetPriceHistoryUpdate.md +24 -0
- data/docs/AssetUsecases.md +28 -0
- data/docs/AssetUsecasesApi.md +157 -0
- data/docs/Assets.md +142 -0
- data/docs/AssetsApi.md +1197 -0
- data/docs/AssetsInput.md +128 -0
- data/docs/AssetsUpdate.md +128 -0
- data/docs/CloudProviders.md +28 -0
- data/docs/CloudProvidersApi.md +157 -0
- data/docs/CloudProvidersInput.md +22 -0
- data/docs/CloudProvidersUpdate.md +22 -0
- data/docs/Companies.md +46 -0
- data/docs/CompaniesApi.md +805 -0
- data/docs/CompaniesInput.md +40 -0
- data/docs/CompaniesUpdate.md +40 -0
- data/docs/Connections.md +38 -0
- data/docs/ConnectionsApi.md +607 -0
- data/docs/ConnectionsInput.md +32 -0
- data/docs/ConnectionsUpdate.md +32 -0
- data/docs/CreateAlerts200Response.md +20 -0
- data/docs/CreateAlerts200ResponseData.md +18 -0
- data/docs/CreateApiKeys200Response.md +20 -0
- data/docs/CreateApiKeys200ResponseData.md +18 -0
- data/docs/CreateAssetPriceHistory200Response.md +20 -0
- data/docs/CreateAssetPriceHistory200ResponseData.md +18 -0
- data/docs/CreateAssetsAnalyze200Response.md +20 -0
- data/docs/CreateAssetsAnalyze200ResponseData.md +18 -0
- data/docs/CreateConnections200Response.md +20 -0
- data/docs/CreateConnections200ResponseData.md +18 -0
- data/docs/CreateEndpoints200Response.md +20 -0
- data/docs/CreateEndpoints200ResponseData.md +18 -0
- data/docs/CreateFavorites200Response.md +20 -0
- data/docs/CreateFavorites200ResponseData.md +18 -0
- data/docs/CreatePostgenIntegrations200Response.md +20 -0
- data/docs/CreatePostgenIntegrations200ResponseData.md +18 -0
- data/docs/CreatePosts200Response.md +20 -0
- data/docs/CreatePosts200ResponseData.md +18 -0
- data/docs/CreateUsers200Response.md +20 -0
- data/docs/CreateUsers200ResponseData.md +18 -0
- data/docs/DeleteAlerts200Response.md +20 -0
- data/docs/DeleteAlerts200ResponseData.md +18 -0
- data/docs/DeleteApiKeys200Response.md +20 -0
- data/docs/DeleteApiKeys200ResponseData.md +18 -0
- data/docs/DeleteAssetPriceHistory200Response.md +20 -0
- data/docs/DeleteAssetPriceHistory200ResponseData.md +18 -0
- data/docs/DeleteAssets200Response.md +20 -0
- data/docs/DeleteAssets200ResponseData.md +18 -0
- data/docs/DeleteConnections200Response.md +20 -0
- data/docs/DeleteConnections200ResponseData.md +18 -0
- data/docs/DeleteEndpoints200Response.md +20 -0
- data/docs/DeleteEndpoints200ResponseData.md +18 -0
- data/docs/DeleteFavorites200Response.md +20 -0
- data/docs/DeleteFavorites200ResponseData.md +18 -0
- data/docs/DeletePostgenIntegrations200Response.md +20 -0
- data/docs/DeletePostgenIntegrations200ResponseData.md +18 -0
- data/docs/DeletePosts200Response.md +20 -0
- data/docs/DeletePosts200ResponseData.md +18 -0
- data/docs/DeleteUsers200Response.md +20 -0
- data/docs/DeleteUsers200ResponseData.md +18 -0
- data/docs/Endpoints.md +96 -0
- data/docs/EndpointsApi.md +1189 -0
- data/docs/EndpointsInput.md +94 -0
- data/docs/EndpointsUpdate.md +94 -0
- data/docs/Error.md +24 -0
- data/docs/Favorites.md +34 -0
- data/docs/FavoritesApi.md +597 -0
- data/docs/FavoritesInput.md +28 -0
- data/docs/FavoritesUpdate.md +28 -0
- data/docs/GetAlertsById200Response.md +20 -0
- data/docs/GetApiKeysById200Response.md +20 -0
- data/docs/GetAssetPriceHistoryById200Response.md +20 -0
- data/docs/GetAssetUsecasesById200Response.md +20 -0
- data/docs/GetAssetsByIdAnalyze200Response.md +20 -0
- data/docs/GetCloudProvidersById200Response.md +20 -0
- data/docs/GetCompaniesById200Response.md +20 -0
- data/docs/GetConnectionsById200Response.md +20 -0
- data/docs/GetEndpointsByIdConnectionsDescribe200Response.md +20 -0
- data/docs/GetFavoritesById200Response.md +20 -0
- data/docs/GetIndustriesById200Response.md +20 -0
- data/docs/GetJobFunctionsById200Response.md +20 -0
- data/docs/GetPostgenIntegrationsById200Response.md +20 -0
- data/docs/GetPostsById200Response.md +20 -0
- data/docs/GetStorageEnginesById200Response.md +20 -0
- data/docs/GetUsersById200Response.md +20 -0
- data/docs/Industries.md +32 -0
- data/docs/IndustriesApi.md +237 -0
- data/docs/InlineObject.md +22 -0
- data/docs/InlineObject1.md +20 -0
- data/docs/InlineObject2.md +20 -0
- data/docs/InlineObject3.md +20 -0
- data/docs/InlineObject4.md +20 -0
- data/docs/InlineObject5.md +20 -0
- data/docs/InlineObject6.md +22 -0
- data/docs/InlineObject7.md +20 -0
- data/docs/JobFunctions.md +24 -0
- data/docs/JobFunctionsApi.md +157 -0
- data/docs/JobFunctionsInput.md +18 -0
- data/docs/JobFunctionsUpdate.md +18 -0
- data/docs/ListApiKeys200Response.md +20 -0
- data/docs/ListAssetUsecases200Response.md +20 -0
- data/docs/ListAssets200Response.md +20 -0
- data/docs/ListCloudProviders200Response.md +20 -0
- data/docs/ListCompaniesAnalyticsAssets200Response.md +20 -0
- data/docs/ListConnections200Response.md +20 -0
- data/docs/ListEndpoints200Response.md +20 -0
- data/docs/ListIndustries200Response.md +20 -0
- data/docs/ListJobFunctions200Response.md +20 -0
- data/docs/ListPostgenIntegrations200Response.md +20 -0
- data/docs/ListPosts200Response.md +20 -0
- data/docs/ListStorageEngines200Response.md +20 -0
- data/docs/ListUsers200Response.md +20 -0
- data/docs/PostPublications.md +40 -0
- data/docs/PostPublicationsInput.md +34 -0
- data/docs/PostPublicationsUpdate.md +34 -0
- data/docs/PostgenIntegrations.md +36 -0
- data/docs/PostgenIntegrationsApi.md +463 -0
- data/docs/PostgenIntegrationsInput.md +30 -0
- data/docs/PostgenIntegrationsUpdate.md +30 -0
- data/docs/Posts.md +68 -0
- data/docs/PostsApi.md +843 -0
- data/docs/PostsInput.md +62 -0
- data/docs/PostsUpdate.md +62 -0
- data/docs/StorageEngines.md +32 -0
- data/docs/StorageEnginesApi.md +161 -0
- data/docs/UpdateAlerts200Response.md +20 -0
- data/docs/UpdateAlerts200ResponseData.md +18 -0
- data/docs/UpdateApiKeys200Response.md +20 -0
- data/docs/UpdateApiKeys200ResponseData.md +18 -0
- data/docs/UpdateAssetPriceHistory200Response.md +20 -0
- data/docs/UpdateAssetPriceHistory200ResponseData.md +18 -0
- data/docs/UpdateAssets200Response.md +20 -0
- data/docs/UpdateAssets200ResponseData.md +18 -0
- data/docs/UpdateCompanies200Response.md +20 -0
- data/docs/UpdateCompanies200ResponseData.md +18 -0
- data/docs/UpdateConnections200Response.md +20 -0
- data/docs/UpdateConnections200ResponseData.md +18 -0
- data/docs/UpdateEndpoints200Response.md +20 -0
- data/docs/UpdateEndpoints200ResponseData.md +18 -0
- data/docs/UpdateFavorites200Response.md +20 -0
- data/docs/UpdateFavorites200ResponseData.md +18 -0
- data/docs/UpdatePostgenIntegrations200Response.md +20 -0
- data/docs/UpdatePostgenIntegrations200ResponseData.md +18 -0
- data/docs/UpdatePosts200Response.md +20 -0
- data/docs/UpdatePosts200ResponseData.md +18 -0
- data/docs/UpdateUsers200Response.md +20 -0
- data/docs/UpdateUsers200ResponseData.md +18 -0
- data/docs/Users.md +36 -0
- data/docs/UsersApi.md +639 -0
- data/docs/UsersInput.md +30 -0
- data/docs/UsersUpdate.md +30 -0
- data/git_push.sh +57 -0
- data/lib/spartera_api_sdk/api/alerts_api.rb +790 -0
- data/lib/spartera_api_sdk/api/api_keys_api.rb +746 -0
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +867 -0
- data/lib/spartera_api_sdk/api/asset_usecases_api.rb +190 -0
- data/lib/spartera_api_sdk/api/assets_api.rb +1554 -0
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +190 -0
- data/lib/spartera_api_sdk/api/companies_api.rb +1085 -0
- data/lib/spartera_api_sdk/api/connections_api.rb +828 -0
- data/lib/spartera_api_sdk/api/endpoints_api.rb +1613 -0
- data/lib/spartera_api_sdk/api/favorites_api.rb +870 -0
- data/lib/spartera_api_sdk/api/industries_api.rb +284 -0
- data/lib/spartera_api_sdk/api/job_functions_api.rb +190 -0
- data/lib/spartera_api_sdk/api/postgen_integrations_api.rb +634 -0
- data/lib/spartera_api_sdk/api/posts_api.rb +1190 -0
- data/lib/spartera_api_sdk/api/storage_engines_api.rb +228 -0
- data/lib/spartera_api_sdk/api/users_api.rb +891 -0
- data/lib/spartera_api_sdk/api_client.rb +397 -0
- data/lib/spartera_api_sdk/api_error.rb +58 -0
- data/lib/spartera_api_sdk/api_model_base.rb +88 -0
- data/lib/spartera_api_sdk/configuration.rb +312 -0
- data/lib/spartera_api_sdk/models/alerts.rb +260 -0
- data/lib/spartera_api_sdk/models/alerts_input.rb +213 -0
- data/lib/spartera_api_sdk/models/alerts_update.rb +179 -0
- data/lib/spartera_api_sdk/models/api_keys.rb +344 -0
- data/lib/spartera_api_sdk/models/api_keys_input.rb +263 -0
- data/lib/spartera_api_sdk/models/api_keys_update.rb +229 -0
- data/lib/spartera_api_sdk/models/asset_price_history.rb +209 -0
- data/lib/spartera_api_sdk/models/asset_price_history_input.rb +179 -0
- data/lib/spartera_api_sdk/models/asset_price_history_update.rb +179 -0
- data/lib/spartera_api_sdk/models/asset_usecases.rb +216 -0
- data/lib/spartera_api_sdk/models/assets.rb +1068 -0
- data/lib/spartera_api_sdk/models/assets_input.rb +918 -0
- data/lib/spartera_api_sdk/models/assets_update.rb +877 -0
- data/lib/spartera_api_sdk/models/cloud_providers.rb +216 -0
- data/lib/spartera_api_sdk/models/cloud_providers_input.rb +186 -0
- data/lib/spartera_api_sdk/models/cloud_providers_update.rb +169 -0
- data/lib/spartera_api_sdk/models/companies.rb +374 -0
- data/lib/spartera_api_sdk/models/companies_input.rb +327 -0
- data/lib/spartera_api_sdk/models/companies_update.rb +293 -0
- data/lib/spartera_api_sdk/models/connections.rb +317 -0
- data/lib/spartera_api_sdk/models/connections_input.rb +287 -0
- data/lib/spartera_api_sdk/models/connections_update.rb +253 -0
- data/lib/spartera_api_sdk/models/create_alerts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_alerts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_api_keys200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_api_keys200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_asset_price_history200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_asset_price_history200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_assets_analyze200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_assets_analyze200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_connections200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_connections200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_endpoints200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_endpoints200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_favorites200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_favorites200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_postgen_integrations200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_postgen_integrations200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_posts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_posts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_users200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_users200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_alerts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_alerts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_api_keys200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_api_keys200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_asset_price_history200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_asset_price_history200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_assets200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_assets200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_connections200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_connections200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_endpoints200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_endpoints200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_favorites200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_favorites200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_posts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_posts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_users200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_users200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/endpoints.rb +788 -0
- data/lib/spartera_api_sdk/models/endpoints_input.rb +686 -0
- data/lib/spartera_api_sdk/models/endpoints_update.rb +635 -0
- data/lib/spartera_api_sdk/models/error.rb +212 -0
- data/lib/spartera_api_sdk/models/favorites.rb +280 -0
- data/lib/spartera_api_sdk/models/favorites_input.rb +233 -0
- data/lib/spartera_api_sdk/models/favorites_update.rb +199 -0
- data/lib/spartera_api_sdk/models/get_alerts_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_api_keys_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_asset_price_history_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_asset_usecases_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_assets_by_id_analyze200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_cloud_providers_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_companies_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_connections_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_endpoints_by_id_connections_describe200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_favorites_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_industries_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_job_functions_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_postgen_integrations_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_posts_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_storage_engines_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_users_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/industries.rb +253 -0
- data/lib/spartera_api_sdk/models/inline_object.rb +167 -0
- data/lib/spartera_api_sdk/models/inline_object1.rb +156 -0
- data/lib/spartera_api_sdk/models/inline_object2.rb +156 -0
- data/lib/spartera_api_sdk/models/inline_object3.rb +156 -0
- data/lib/spartera_api_sdk/models/inline_object4.rb +156 -0
- data/lib/spartera_api_sdk/models/inline_object5.rb +156 -0
- data/lib/spartera_api_sdk/models/inline_object6.rb +166 -0
- data/lib/spartera_api_sdk/models/inline_object7.rb +156 -0
- data/lib/spartera_api_sdk/models/job_functions.rb +213 -0
- data/lib/spartera_api_sdk/models/job_functions_input.rb +166 -0
- data/lib/spartera_api_sdk/models/job_functions_update.rb +149 -0
- data/lib/spartera_api_sdk/models/list_api_keys200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_asset_usecases200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_assets200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_cloud_providers200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_companies_analytics_assets200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_connections200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_endpoints200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_industries200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_job_functions200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_postgen_integrations200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_posts200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_storage_engines200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_users200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/post_publications.rb +327 -0
- data/lib/spartera_api_sdk/models/post_publications_input.rb +280 -0
- data/lib/spartera_api_sdk/models/post_publications_update.rb +229 -0
- data/lib/spartera_api_sdk/models/postgen_integrations.rb +341 -0
- data/lib/spartera_api_sdk/models/postgen_integrations_input.rb +294 -0
- data/lib/spartera_api_sdk/models/postgen_integrations_update.rb +209 -0
- data/lib/spartera_api_sdk/models/posts.rb +586 -0
- data/lib/spartera_api_sdk/models/posts_input.rb +437 -0
- data/lib/spartera_api_sdk/models/posts_update.rb +369 -0
- data/lib/spartera_api_sdk/models/storage_engines.rb +294 -0
- data/lib/spartera_api_sdk/models/update_alerts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_alerts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_api_keys200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_api_keys200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_asset_price_history200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_asset_price_history200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_assets200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_assets200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_companies200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_companies200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_connections200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_connections200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_endpoints200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_endpoints200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_favorites200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_favorites200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_postgen_integrations200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_postgen_integrations200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_posts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_posts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_users200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_users200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/users.rb +331 -0
- data/lib/spartera_api_sdk/models/users_input.rb +260 -0
- data/lib/spartera_api_sdk/models/users_update.rb +243 -0
- data/lib/spartera_api_sdk/version.rb +15 -0
- data/lib/spartera_api_sdk.rb +201 -0
- data/spartera_api_sdk.gemspec +39 -0
- data/spec/api/alerts_api_spec.rb +126 -0
- data/spec/api/api_keys_api_spec.rb +130 -0
- data/spec/api/asset_price_history_api_spec.rb +138 -0
- data/spec/api/asset_usecases_api_spec.rb +61 -0
- data/spec/api/assets_api_spec.rb +243 -0
- data/spec/api/cloud_providers_api_spec.rb +61 -0
- data/spec/api/companies_api_spec.rb +186 -0
- data/spec/api/connections_api_spec.rb +141 -0
- data/spec/api/endpoints_api_spec.rb +240 -0
- data/spec/api/favorites_api_spec.rb +138 -0
- data/spec/api/industries_api_spec.rb +76 -0
- data/spec/api/job_functions_api_spec.rb +61 -0
- data/spec/api/postgen_integrations_api_spec.rb +117 -0
- data/spec/api/posts_api_spec.rb +186 -0
- data/spec/api/storage_engines_api_spec.rb +63 -0
- data/spec/api/users_api_spec.rb +154 -0
- data/spec/models/alerts_input_spec.rb +54 -0
- data/spec/models/alerts_spec.rb +72 -0
- data/spec/models/alerts_update_spec.rb +54 -0
- data/spec/models/api_keys_input_spec.rb +84 -0
- data/spec/models/api_keys_spec.rb +102 -0
- data/spec/models/api_keys_update_spec.rb +84 -0
- data/spec/models/asset_price_history_input_spec.rb +54 -0
- data/spec/models/asset_price_history_spec.rb +72 -0
- data/spec/models/asset_price_history_update_spec.rb +54 -0
- data/spec/models/asset_usecases_spec.rb +66 -0
- data/spec/models/assets_input_spec.rb +418 -0
- data/spec/models/assets_spec.rb +464 -0
- data/spec/models/assets_update_spec.rb +418 -0
- data/spec/models/cloud_providers_input_spec.rb +48 -0
- data/spec/models/cloud_providers_spec.rb +66 -0
- data/spec/models/cloud_providers_update_spec.rb +48 -0
- data/spec/models/companies_input_spec.rb +106 -0
- data/spec/models/companies_spec.rb +124 -0
- data/spec/models/companies_update_spec.rb +106 -0
- data/spec/models/connections_input_spec.rb +82 -0
- data/spec/models/connections_spec.rb +100 -0
- data/spec/models/connections_update_spec.rb +82 -0
- data/spec/models/create_alerts200_response_data_spec.rb +36 -0
- data/spec/models/create_alerts200_response_spec.rb +42 -0
- data/spec/models/create_api_keys200_response_data_spec.rb +36 -0
- data/spec/models/create_api_keys200_response_spec.rb +42 -0
- data/spec/models/create_asset_price_history200_response_data_spec.rb +36 -0
- data/spec/models/create_asset_price_history200_response_spec.rb +42 -0
- data/spec/models/create_assets_analyze200_response_data_spec.rb +36 -0
- data/spec/models/create_assets_analyze200_response_spec.rb +42 -0
- data/spec/models/create_connections200_response_data_spec.rb +36 -0
- data/spec/models/create_connections200_response_spec.rb +42 -0
- data/spec/models/create_endpoints200_response_data_spec.rb +36 -0
- data/spec/models/create_endpoints200_response_spec.rb +42 -0
- data/spec/models/create_favorites200_response_data_spec.rb +36 -0
- data/spec/models/create_favorites200_response_spec.rb +42 -0
- data/spec/models/create_postgen_integrations200_response_data_spec.rb +36 -0
- data/spec/models/create_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/create_posts200_response_data_spec.rb +36 -0
- data/spec/models/create_posts200_response_spec.rb +42 -0
- data/spec/models/create_users200_response_data_spec.rb +36 -0
- data/spec/models/create_users200_response_spec.rb +42 -0
- data/spec/models/delete_alerts200_response_data_spec.rb +36 -0
- data/spec/models/delete_alerts200_response_spec.rb +42 -0
- data/spec/models/delete_api_keys200_response_data_spec.rb +36 -0
- data/spec/models/delete_api_keys200_response_spec.rb +42 -0
- data/spec/models/delete_asset_price_history200_response_data_spec.rb +36 -0
- data/spec/models/delete_asset_price_history200_response_spec.rb +42 -0
- data/spec/models/delete_assets200_response_data_spec.rb +36 -0
- data/spec/models/delete_assets200_response_spec.rb +42 -0
- data/spec/models/delete_connections200_response_data_spec.rb +36 -0
- data/spec/models/delete_connections200_response_spec.rb +42 -0
- data/spec/models/delete_endpoints200_response_data_spec.rb +36 -0
- data/spec/models/delete_endpoints200_response_spec.rb +42 -0
- data/spec/models/delete_favorites200_response_data_spec.rb +36 -0
- data/spec/models/delete_favorites200_response_spec.rb +42 -0
- data/spec/models/delete_postgen_integrations200_response_data_spec.rb +36 -0
- data/spec/models/delete_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/delete_posts200_response_data_spec.rb +36 -0
- data/spec/models/delete_posts200_response_spec.rb +42 -0
- data/spec/models/delete_users200_response_data_spec.rb +36 -0
- data/spec/models/delete_users200_response_spec.rb +42 -0
- data/spec/models/endpoints_input_spec.rb +292 -0
- data/spec/models/endpoints_spec.rb +298 -0
- data/spec/models/endpoints_update_spec.rb +292 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/favorites_input_spec.rb +66 -0
- data/spec/models/favorites_spec.rb +84 -0
- data/spec/models/favorites_update_spec.rb +66 -0
- data/spec/models/get_alerts_by_id200_response_spec.rb +42 -0
- data/spec/models/get_api_keys_by_id200_response_spec.rb +42 -0
- data/spec/models/get_asset_price_history_by_id200_response_spec.rb +42 -0
- data/spec/models/get_asset_usecases_by_id200_response_spec.rb +42 -0
- data/spec/models/get_assets_by_id_analyze200_response_spec.rb +42 -0
- data/spec/models/get_cloud_providers_by_id200_response_spec.rb +42 -0
- data/spec/models/get_companies_by_id200_response_spec.rb +42 -0
- data/spec/models/get_connections_by_id200_response_spec.rb +42 -0
- data/spec/models/get_endpoints_by_id_connections_describe200_response_spec.rb +42 -0
- data/spec/models/get_favorites_by_id200_response_spec.rb +42 -0
- data/spec/models/get_industries_by_id200_response_spec.rb +42 -0
- data/spec/models/get_job_functions_by_id200_response_spec.rb +42 -0
- data/spec/models/get_postgen_integrations_by_id200_response_spec.rb +42 -0
- data/spec/models/get_posts_by_id200_response_spec.rb +42 -0
- data/spec/models/get_storage_engines_by_id200_response_spec.rb +42 -0
- data/spec/models/get_users_by_id200_response_spec.rb +42 -0
- data/spec/models/industries_spec.rb +78 -0
- data/spec/models/inline_object1_spec.rb +42 -0
- data/spec/models/inline_object2_spec.rb +42 -0
- data/spec/models/inline_object3_spec.rb +42 -0
- data/spec/models/inline_object4_spec.rb +42 -0
- data/spec/models/inline_object5_spec.rb +42 -0
- data/spec/models/inline_object6_spec.rb +48 -0
- data/spec/models/inline_object7_spec.rb +42 -0
- data/spec/models/inline_object_spec.rb +48 -0
- data/spec/models/job_functions_input_spec.rb +36 -0
- data/spec/models/job_functions_spec.rb +54 -0
- data/spec/models/job_functions_update_spec.rb +36 -0
- data/spec/models/list_api_keys200_response_spec.rb +42 -0
- data/spec/models/list_asset_usecases200_response_spec.rb +42 -0
- data/spec/models/list_assets200_response_spec.rb +42 -0
- data/spec/models/list_cloud_providers200_response_spec.rb +42 -0
- data/spec/models/list_companies_analytics_assets200_response_spec.rb +42 -0
- data/spec/models/list_connections200_response_spec.rb +42 -0
- data/spec/models/list_endpoints200_response_spec.rb +42 -0
- data/spec/models/list_industries200_response_spec.rb +42 -0
- data/spec/models/list_job_functions200_response_spec.rb +42 -0
- data/spec/models/list_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/list_posts200_response_spec.rb +42 -0
- data/spec/models/list_storage_engines200_response_spec.rb +42 -0
- data/spec/models/list_users200_response_spec.rb +42 -0
- data/spec/models/post_publications_input_spec.rb +84 -0
- data/spec/models/post_publications_spec.rb +102 -0
- data/spec/models/post_publications_update_spec.rb +84 -0
- data/spec/models/postgen_integrations_input_spec.rb +72 -0
- data/spec/models/postgen_integrations_spec.rb +90 -0
- data/spec/models/postgen_integrations_update_spec.rb +72 -0
- data/spec/models/posts_input_spec.rb +168 -0
- data/spec/models/posts_spec.rb +186 -0
- data/spec/models/posts_update_spec.rb +168 -0
- data/spec/models/storage_engines_spec.rb +82 -0
- data/spec/models/update_alerts200_response_data_spec.rb +36 -0
- data/spec/models/update_alerts200_response_spec.rb +42 -0
- data/spec/models/update_api_keys200_response_data_spec.rb +36 -0
- data/spec/models/update_api_keys200_response_spec.rb +42 -0
- data/spec/models/update_asset_price_history200_response_data_spec.rb +36 -0
- data/spec/models/update_asset_price_history200_response_spec.rb +42 -0
- data/spec/models/update_assets200_response_data_spec.rb +36 -0
- data/spec/models/update_assets200_response_spec.rb +42 -0
- data/spec/models/update_companies200_response_data_spec.rb +36 -0
- data/spec/models/update_companies200_response_spec.rb +42 -0
- data/spec/models/update_connections200_response_data_spec.rb +36 -0
- data/spec/models/update_connections200_response_spec.rb +42 -0
- data/spec/models/update_endpoints200_response_data_spec.rb +36 -0
- data/spec/models/update_endpoints200_response_spec.rb +42 -0
- data/spec/models/update_favorites200_response_data_spec.rb +36 -0
- data/spec/models/update_favorites200_response_spec.rb +42 -0
- data/spec/models/update_postgen_integrations200_response_data_spec.rb +36 -0
- data/spec/models/update_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/update_posts200_response_data_spec.rb +36 -0
- data/spec/models/update_posts200_response_spec.rb +42 -0
- data/spec/models/update_users200_response_data_spec.rb +36 -0
- data/spec/models/update_users200_response_spec.rb +42 -0
- data/spec/models/users_input_spec.rb +76 -0
- data/spec/models/users_spec.rb +94 -0
- data/spec/models/users_update_spec.rb +76 -0
- data/spec/spec_helper.rb +111 -0
- metadata +742 -0
|
@@ -0,0 +1,1554 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Spartera API Documentation
|
|
3
|
+
|
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.25.0
|
|
7
|
+
Contact: support@spartera.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SparteraApiSdk
|
|
16
|
+
class AssetsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a new asset
|
|
23
|
+
# @param company_id [String] Unique identifier for the Company
|
|
24
|
+
# @param assets_input [AssetsInput]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
27
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
28
|
+
# @option opts [String] :sort_by Field to sort by
|
|
29
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
30
|
+
# @option opts [String] :search Search term to filter results
|
|
31
|
+
# @return [CreateAssetsAnalyze200Response]
|
|
32
|
+
def create_assets(company_id, assets_input, opts = {})
|
|
33
|
+
data, _status_code, _headers = create_assets_with_http_info(company_id, assets_input, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Create a new asset
|
|
38
|
+
# @param company_id [String] Unique identifier for the Company
|
|
39
|
+
# @param assets_input [AssetsInput]
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
42
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
43
|
+
# @option opts [String] :sort_by Field to sort by
|
|
44
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
45
|
+
# @option opts [String] :search Search term to filter results
|
|
46
|
+
# @return [Array<(CreateAssetsAnalyze200Response, Integer, Hash)>] CreateAssetsAnalyze200Response data, response status code and response headers
|
|
47
|
+
def create_assets_with_http_info(company_id, assets_input, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.create_assets ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'company_id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.create_assets"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
56
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.create_assets, the character length must be smaller than or equal to 255.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
60
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.create_assets, the character length must be greater than or equal to 1.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
64
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
65
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.create_assets, must conform to the pattern #{pattern}."
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# verify the required parameter 'assets_input' is set
|
|
69
|
+
if @api_client.config.client_side_validation && assets_input.nil?
|
|
70
|
+
fail ArgumentError, "Missing the required parameter 'assets_input' when calling AssetsApi.create_assets"
|
|
71
|
+
end
|
|
72
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
73
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AssetsApi.create_assets, must be greater than or equal to 1.'
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
77
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AssetsApi.create_assets, must be smaller than or equal to 100.'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
81
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AssetsApi.create_assets, must be greater than or equal to 1.'
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
allowable_values = ["asc", "desc"]
|
|
85
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
86
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
87
|
+
end
|
|
88
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
89
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AssetsApi.create_assets, the character length must be smaller than or equal to 255.'
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
93
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AssetsApi.create_assets, the character length must be greater than or equal to 1.'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/companies/{company_id}/assets'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
102
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
103
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
104
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
105
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = opts[:header_params] || {}
|
|
109
|
+
# HTTP header 'Accept' (if needed)
|
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
111
|
+
# HTTP header 'Content-Type'
|
|
112
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
113
|
+
if !content_type.nil?
|
|
114
|
+
header_params['Content-Type'] = content_type
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assets_input)
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:debug_return_type] || 'CreateAssetsAnalyze200Response'
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:operation => :"AssetsApi.create_assets",
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => return_type
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug "API called: AssetsApi#create_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
|
+
end
|
|
143
|
+
return data, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Process (analyze) an asset with dynamic rate limiting applied via decorator.
|
|
147
|
+
# @param company_handle [String] Human-readable handle for the Company
|
|
148
|
+
# @param asset_slug [String] URL-friendly slug for the Asset
|
|
149
|
+
# @param assets_input [AssetsInput]
|
|
150
|
+
# @param [Hash] opts the optional parameters
|
|
151
|
+
# @return [CreateAssetsAnalyze200Response]
|
|
152
|
+
def create_assets_analyze(company_handle, asset_slug, assets_input, opts = {})
|
|
153
|
+
data, _status_code, _headers = create_assets_analyze_with_http_info(company_handle, asset_slug, assets_input, opts)
|
|
154
|
+
data
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Process (analyze) an asset with dynamic rate limiting applied via decorator.
|
|
158
|
+
# @param company_handle [String] Human-readable handle for the Company
|
|
159
|
+
# @param asset_slug [String] URL-friendly slug for the Asset
|
|
160
|
+
# @param assets_input [AssetsInput]
|
|
161
|
+
# @param [Hash] opts the optional parameters
|
|
162
|
+
# @return [Array<(CreateAssetsAnalyze200Response, Integer, Hash)>] CreateAssetsAnalyze200Response data, response status code and response headers
|
|
163
|
+
def create_assets_analyze_with_http_info(company_handle, asset_slug, assets_input, opts = {})
|
|
164
|
+
if @api_client.config.debugging
|
|
165
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.create_assets_analyze ...'
|
|
166
|
+
end
|
|
167
|
+
# verify the required parameter 'company_handle' is set
|
|
168
|
+
if @api_client.config.client_side_validation && company_handle.nil?
|
|
169
|
+
fail ArgumentError, "Missing the required parameter 'company_handle' when calling AssetsApi.create_assets_analyze"
|
|
170
|
+
end
|
|
171
|
+
# verify the required parameter 'asset_slug' is set
|
|
172
|
+
if @api_client.config.client_side_validation && asset_slug.nil?
|
|
173
|
+
fail ArgumentError, "Missing the required parameter 'asset_slug' when calling AssetsApi.create_assets_analyze"
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'assets_input' is set
|
|
176
|
+
if @api_client.config.client_side_validation && assets_input.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'assets_input' when calling AssetsApi.create_assets_analyze"
|
|
178
|
+
end
|
|
179
|
+
# resource path
|
|
180
|
+
local_var_path = '/analyze/{company_handle}/assets/{asset_slug}'.sub('{' + 'company_handle' + '}', CGI.escape(company_handle.to_s)).sub('{' + 'asset_slug' + '}', CGI.escape(asset_slug.to_s))
|
|
181
|
+
|
|
182
|
+
# query parameters
|
|
183
|
+
query_params = opts[:query_params] || {}
|
|
184
|
+
|
|
185
|
+
# header parameters
|
|
186
|
+
header_params = opts[:header_params] || {}
|
|
187
|
+
# HTTP header 'Accept' (if needed)
|
|
188
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
189
|
+
# HTTP header 'Content-Type'
|
|
190
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
191
|
+
if !content_type.nil?
|
|
192
|
+
header_params['Content-Type'] = content_type
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# form parameters
|
|
196
|
+
form_params = opts[:form_params] || {}
|
|
197
|
+
|
|
198
|
+
# http body (model)
|
|
199
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assets_input)
|
|
200
|
+
|
|
201
|
+
# return_type
|
|
202
|
+
return_type = opts[:debug_return_type] || 'CreateAssetsAnalyze200Response'
|
|
203
|
+
|
|
204
|
+
# auth_names
|
|
205
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
206
|
+
|
|
207
|
+
new_options = opts.merge(
|
|
208
|
+
:operation => :"AssetsApi.create_assets_analyze",
|
|
209
|
+
:header_params => header_params,
|
|
210
|
+
:query_params => query_params,
|
|
211
|
+
:form_params => form_params,
|
|
212
|
+
:body => post_body,
|
|
213
|
+
:auth_names => auth_names,
|
|
214
|
+
:return_type => return_type
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
218
|
+
if @api_client.config.debugging
|
|
219
|
+
@api_client.config.logger.debug "API called: AssetsApi#create_assets_analyze\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
220
|
+
end
|
|
221
|
+
return data, status_code, headers
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Scan a column in the asset's table to retrieve distinct values Request Body: column (str): Column name to scan limit (int, optional): Maximum distinct values to return (default 1000, max 5000) Returns: Flask Response with scan results
|
|
225
|
+
# @param company_id [String] Unique identifier for the Company
|
|
226
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
227
|
+
# @param assets_input [AssetsInput]
|
|
228
|
+
# @param [Hash] opts the optional parameters
|
|
229
|
+
# @return [CreateAssetsAnalyze200Response]
|
|
230
|
+
def create_assets_scan_column(company_id, asset_id, assets_input, opts = {})
|
|
231
|
+
data, _status_code, _headers = create_assets_scan_column_with_http_info(company_id, asset_id, assets_input, opts)
|
|
232
|
+
data
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Scan a column in the asset's table to retrieve distinct values Request Body: column (str): Column name to scan limit (int, optional): Maximum distinct values to return (default 1000, max 5000) Returns: Flask Response with scan results
|
|
236
|
+
# @param company_id [String] Unique identifier for the Company
|
|
237
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
238
|
+
# @param assets_input [AssetsInput]
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [Array<(CreateAssetsAnalyze200Response, Integer, Hash)>] CreateAssetsAnalyze200Response data, response status code and response headers
|
|
241
|
+
def create_assets_scan_column_with_http_info(company_id, asset_id, assets_input, opts = {})
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.create_assets_scan_column ...'
|
|
244
|
+
end
|
|
245
|
+
# verify the required parameter 'company_id' is set
|
|
246
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.create_assets_scan_column"
|
|
248
|
+
end
|
|
249
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
250
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.create_assets_scan_column, the character length must be smaller than or equal to 255.'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
254
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.create_assets_scan_column, the character length must be greater than or equal to 1.'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
258
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
259
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.create_assets_scan_column, must conform to the pattern #{pattern}."
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# verify the required parameter 'asset_id' is set
|
|
263
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
264
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.create_assets_scan_column"
|
|
265
|
+
end
|
|
266
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
267
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.create_assets_scan_column, the character length must be smaller than or equal to 255.'
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
271
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.create_assets_scan_column, the character length must be greater than or equal to 1.'
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
275
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
276
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.create_assets_scan_column, must conform to the pattern #{pattern}."
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# verify the required parameter 'assets_input' is set
|
|
280
|
+
if @api_client.config.client_side_validation && assets_input.nil?
|
|
281
|
+
fail ArgumentError, "Missing the required parameter 'assets_input' when calling AssetsApi.create_assets_scan_column"
|
|
282
|
+
end
|
|
283
|
+
# resource path
|
|
284
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/scan_column'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
285
|
+
|
|
286
|
+
# query parameters
|
|
287
|
+
query_params = opts[:query_params] || {}
|
|
288
|
+
|
|
289
|
+
# header parameters
|
|
290
|
+
header_params = opts[:header_params] || {}
|
|
291
|
+
# HTTP header 'Accept' (if needed)
|
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
293
|
+
# HTTP header 'Content-Type'
|
|
294
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
295
|
+
if !content_type.nil?
|
|
296
|
+
header_params['Content-Type'] = content_type
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# form parameters
|
|
300
|
+
form_params = opts[:form_params] || {}
|
|
301
|
+
|
|
302
|
+
# http body (model)
|
|
303
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assets_input)
|
|
304
|
+
|
|
305
|
+
# return_type
|
|
306
|
+
return_type = opts[:debug_return_type] || 'CreateAssetsAnalyze200Response'
|
|
307
|
+
|
|
308
|
+
# auth_names
|
|
309
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
310
|
+
|
|
311
|
+
new_options = opts.merge(
|
|
312
|
+
:operation => :"AssetsApi.create_assets_scan_column",
|
|
313
|
+
:header_params => header_params,
|
|
314
|
+
:query_params => query_params,
|
|
315
|
+
:form_params => form_params,
|
|
316
|
+
:body => post_body,
|
|
317
|
+
:auth_names => auth_names,
|
|
318
|
+
:return_type => return_type
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
322
|
+
if @api_client.config.debugging
|
|
323
|
+
@api_client.config.logger.debug "API called: AssetsApi#create_assets_scan_column\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
324
|
+
end
|
|
325
|
+
return data, status_code, headers
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# POST /companies/{company_id}/assets/{asset_id}/test
|
|
329
|
+
# @param company_id [String] Unique identifier for the Company
|
|
330
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
331
|
+
# @param assets_input [AssetsInput]
|
|
332
|
+
# @param [Hash] opts the optional parameters
|
|
333
|
+
# @return [CreateAssetsAnalyze200Response]
|
|
334
|
+
def create_assets_test(company_id, asset_id, assets_input, opts = {})
|
|
335
|
+
data, _status_code, _headers = create_assets_test_with_http_info(company_id, asset_id, assets_input, opts)
|
|
336
|
+
data
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# POST /companies/{company_id}/assets/{asset_id}/test
|
|
340
|
+
# @param company_id [String] Unique identifier for the Company
|
|
341
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
342
|
+
# @param assets_input [AssetsInput]
|
|
343
|
+
# @param [Hash] opts the optional parameters
|
|
344
|
+
# @return [Array<(CreateAssetsAnalyze200Response, Integer, Hash)>] CreateAssetsAnalyze200Response data, response status code and response headers
|
|
345
|
+
def create_assets_test_with_http_info(company_id, asset_id, assets_input, opts = {})
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.create_assets_test ...'
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'company_id' is set
|
|
350
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.create_assets_test"
|
|
352
|
+
end
|
|
353
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
354
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.create_assets_test, the character length must be smaller than or equal to 255.'
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
358
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.create_assets_test, the character length must be greater than or equal to 1.'
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
362
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
363
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.create_assets_test, must conform to the pattern #{pattern}."
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# verify the required parameter 'asset_id' is set
|
|
367
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
368
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.create_assets_test"
|
|
369
|
+
end
|
|
370
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
371
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.create_assets_test, the character length must be smaller than or equal to 255.'
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
375
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.create_assets_test, the character length must be greater than or equal to 1.'
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
379
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
380
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.create_assets_test, must conform to the pattern #{pattern}."
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# verify the required parameter 'assets_input' is set
|
|
384
|
+
if @api_client.config.client_side_validation && assets_input.nil?
|
|
385
|
+
fail ArgumentError, "Missing the required parameter 'assets_input' when calling AssetsApi.create_assets_test"
|
|
386
|
+
end
|
|
387
|
+
# resource path
|
|
388
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/test'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
389
|
+
|
|
390
|
+
# query parameters
|
|
391
|
+
query_params = opts[:query_params] || {}
|
|
392
|
+
|
|
393
|
+
# header parameters
|
|
394
|
+
header_params = opts[:header_params] || {}
|
|
395
|
+
# HTTP header 'Accept' (if needed)
|
|
396
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
397
|
+
# HTTP header 'Content-Type'
|
|
398
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
399
|
+
if !content_type.nil?
|
|
400
|
+
header_params['Content-Type'] = content_type
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# form parameters
|
|
404
|
+
form_params = opts[:form_params] || {}
|
|
405
|
+
|
|
406
|
+
# http body (model)
|
|
407
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assets_input)
|
|
408
|
+
|
|
409
|
+
# return_type
|
|
410
|
+
return_type = opts[:debug_return_type] || 'CreateAssetsAnalyze200Response'
|
|
411
|
+
|
|
412
|
+
# auth_names
|
|
413
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
414
|
+
|
|
415
|
+
new_options = opts.merge(
|
|
416
|
+
:operation => :"AssetsApi.create_assets_test",
|
|
417
|
+
:header_params => header_params,
|
|
418
|
+
:query_params => query_params,
|
|
419
|
+
:form_params => form_params,
|
|
420
|
+
:body => post_body,
|
|
421
|
+
:auth_names => auth_names,
|
|
422
|
+
:return_type => return_type
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
426
|
+
if @api_client.config.debugging
|
|
427
|
+
@api_client.config.logger.debug "API called: AssetsApi#create_assets_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
428
|
+
end
|
|
429
|
+
return data, status_code, headers
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Delete single asset by ID
|
|
433
|
+
# @param company_id [String] Unique identifier for the Company
|
|
434
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
435
|
+
# @param [Hash] opts the optional parameters
|
|
436
|
+
# @return [DeleteAssets200Response]
|
|
437
|
+
def delete_assets(company_id, asset_id, opts = {})
|
|
438
|
+
data, _status_code, _headers = delete_assets_with_http_info(company_id, asset_id, opts)
|
|
439
|
+
data
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Delete single asset by ID
|
|
443
|
+
# @param company_id [String] Unique identifier for the Company
|
|
444
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
445
|
+
# @param [Hash] opts the optional parameters
|
|
446
|
+
# @return [Array<(DeleteAssets200Response, Integer, Hash)>] DeleteAssets200Response data, response status code and response headers
|
|
447
|
+
def delete_assets_with_http_info(company_id, asset_id, opts = {})
|
|
448
|
+
if @api_client.config.debugging
|
|
449
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.delete_assets ...'
|
|
450
|
+
end
|
|
451
|
+
# verify the required parameter 'company_id' is set
|
|
452
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
453
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.delete_assets"
|
|
454
|
+
end
|
|
455
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
456
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.delete_assets, the character length must be smaller than or equal to 255.'
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
460
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.delete_assets, the character length must be greater than or equal to 1.'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
464
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
465
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.delete_assets, must conform to the pattern #{pattern}."
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# verify the required parameter 'asset_id' is set
|
|
469
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
470
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.delete_assets"
|
|
471
|
+
end
|
|
472
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
473
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.delete_assets, the character length must be smaller than or equal to 255.'
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
477
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.delete_assets, the character length must be greater than or equal to 1.'
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
481
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
482
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.delete_assets, must conform to the pattern #{pattern}."
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# resource path
|
|
486
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
487
|
+
|
|
488
|
+
# query parameters
|
|
489
|
+
query_params = opts[:query_params] || {}
|
|
490
|
+
|
|
491
|
+
# header parameters
|
|
492
|
+
header_params = opts[:header_params] || {}
|
|
493
|
+
# HTTP header 'Accept' (if needed)
|
|
494
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
495
|
+
|
|
496
|
+
# form parameters
|
|
497
|
+
form_params = opts[:form_params] || {}
|
|
498
|
+
|
|
499
|
+
# http body (model)
|
|
500
|
+
post_body = opts[:debug_body]
|
|
501
|
+
|
|
502
|
+
# return_type
|
|
503
|
+
return_type = opts[:debug_return_type] || 'DeleteAssets200Response'
|
|
504
|
+
|
|
505
|
+
# auth_names
|
|
506
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
507
|
+
|
|
508
|
+
new_options = opts.merge(
|
|
509
|
+
:operation => :"AssetsApi.delete_assets",
|
|
510
|
+
:header_params => header_params,
|
|
511
|
+
:query_params => query_params,
|
|
512
|
+
:form_params => form_params,
|
|
513
|
+
:body => post_body,
|
|
514
|
+
:auth_names => auth_names,
|
|
515
|
+
:return_type => return_type
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
519
|
+
if @api_client.config.debugging
|
|
520
|
+
@api_client.config.logger.debug "API called: AssetsApi#delete_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
521
|
+
end
|
|
522
|
+
return data, status_code, headers
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
# Get single asset by ID
|
|
526
|
+
# @param company_id [String] Unique identifier for the Company
|
|
527
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
528
|
+
# @param [Hash] opts the optional parameters
|
|
529
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
530
|
+
def get_assets_by_id(company_id, asset_id, opts = {})
|
|
531
|
+
data, _status_code, _headers = get_assets_by_id_with_http_info(company_id, asset_id, opts)
|
|
532
|
+
data
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
# Get single asset by ID
|
|
536
|
+
# @param company_id [String] Unique identifier for the Company
|
|
537
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
538
|
+
# @param [Hash] opts the optional parameters
|
|
539
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
540
|
+
def get_assets_by_id_with_http_info(company_id, asset_id, opts = {})
|
|
541
|
+
if @api_client.config.debugging
|
|
542
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id ...'
|
|
543
|
+
end
|
|
544
|
+
# verify the required parameter 'company_id' is set
|
|
545
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
546
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id"
|
|
547
|
+
end
|
|
548
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
549
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id, the character length must be smaller than or equal to 255.'
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
553
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id, the character length must be greater than or equal to 1.'
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
557
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
558
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id, must conform to the pattern #{pattern}."
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# verify the required parameter 'asset_id' is set
|
|
562
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
563
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_assets_by_id"
|
|
564
|
+
end
|
|
565
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
566
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id, the character length must be smaller than or equal to 255.'
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
570
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id, the character length must be greater than or equal to 1.'
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
574
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
575
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.get_assets_by_id, must conform to the pattern #{pattern}."
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
# resource path
|
|
579
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
580
|
+
|
|
581
|
+
# query parameters
|
|
582
|
+
query_params = opts[:query_params] || {}
|
|
583
|
+
|
|
584
|
+
# header parameters
|
|
585
|
+
header_params = opts[:header_params] || {}
|
|
586
|
+
# HTTP header 'Accept' (if needed)
|
|
587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
588
|
+
|
|
589
|
+
# form parameters
|
|
590
|
+
form_params = opts[:form_params] || {}
|
|
591
|
+
|
|
592
|
+
# http body (model)
|
|
593
|
+
post_body = opts[:debug_body]
|
|
594
|
+
|
|
595
|
+
# return_type
|
|
596
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
597
|
+
|
|
598
|
+
# auth_names
|
|
599
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
600
|
+
|
|
601
|
+
new_options = opts.merge(
|
|
602
|
+
:operation => :"AssetsApi.get_assets_by_id",
|
|
603
|
+
:header_params => header_params,
|
|
604
|
+
:query_params => query_params,
|
|
605
|
+
:form_params => form_params,
|
|
606
|
+
:body => post_body,
|
|
607
|
+
:auth_names => auth_names,
|
|
608
|
+
:return_type => return_type
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
612
|
+
if @api_client.config.debugging
|
|
613
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
614
|
+
end
|
|
615
|
+
return data, status_code, headers
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# Get statistics for a specific asset (public endpoint)
|
|
619
|
+
# @param company_id [String] Unique identifier for the Company
|
|
620
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
621
|
+
# @param [Hash] opts the optional parameters
|
|
622
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
623
|
+
def get_assets_by_id2(company_id, asset_id, opts = {})
|
|
624
|
+
data, _status_code, _headers = get_assets_by_id2_with_http_info(company_id, asset_id, opts)
|
|
625
|
+
data
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
# Get statistics for a specific asset (public endpoint)
|
|
629
|
+
# @param company_id [String] Unique identifier for the Company
|
|
630
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
631
|
+
# @param [Hash] opts the optional parameters
|
|
632
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
633
|
+
def get_assets_by_id2_with_http_info(company_id, asset_id, opts = {})
|
|
634
|
+
if @api_client.config.debugging
|
|
635
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id2 ...'
|
|
636
|
+
end
|
|
637
|
+
# verify the required parameter 'company_id' is set
|
|
638
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
639
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id2"
|
|
640
|
+
end
|
|
641
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
642
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id2, the character length must be smaller than or equal to 255.'
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
646
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id2, the character length must be greater than or equal to 1.'
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
650
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
651
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id2, must conform to the pattern #{pattern}."
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
# verify the required parameter 'asset_id' is set
|
|
655
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
656
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_assets_by_id2"
|
|
657
|
+
end
|
|
658
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
659
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id2, the character length must be smaller than or equal to 255.'
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
663
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id2, the character length must be greater than or equal to 1.'
|
|
664
|
+
end
|
|
665
|
+
|
|
666
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
667
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
668
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.get_assets_by_id2, must conform to the pattern #{pattern}."
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# resource path
|
|
672
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/statistics'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
673
|
+
|
|
674
|
+
# query parameters
|
|
675
|
+
query_params = opts[:query_params] || {}
|
|
676
|
+
|
|
677
|
+
# header parameters
|
|
678
|
+
header_params = opts[:header_params] || {}
|
|
679
|
+
# HTTP header 'Accept' (if needed)
|
|
680
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
681
|
+
|
|
682
|
+
# form parameters
|
|
683
|
+
form_params = opts[:form_params] || {}
|
|
684
|
+
|
|
685
|
+
# http body (model)
|
|
686
|
+
post_body = opts[:debug_body]
|
|
687
|
+
|
|
688
|
+
# return_type
|
|
689
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
690
|
+
|
|
691
|
+
# auth_names
|
|
692
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
693
|
+
|
|
694
|
+
new_options = opts.merge(
|
|
695
|
+
:operation => :"AssetsApi.get_assets_by_id2",
|
|
696
|
+
:header_params => header_params,
|
|
697
|
+
:query_params => query_params,
|
|
698
|
+
:form_params => form_params,
|
|
699
|
+
:body => post_body,
|
|
700
|
+
:auth_names => auth_names,
|
|
701
|
+
:return_type => return_type
|
|
702
|
+
)
|
|
703
|
+
|
|
704
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
705
|
+
if @api_client.config.debugging
|
|
706
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
707
|
+
end
|
|
708
|
+
return data, status_code, headers
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
# Process (analyze) an asset with dynamic rate limiting applied via decorator.
|
|
712
|
+
# @param company_handle [String] Human-readable handle for the Company
|
|
713
|
+
# @param asset_slug [String] URL-friendly slug for the Asset
|
|
714
|
+
# @param [Hash] opts the optional parameters
|
|
715
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
716
|
+
def get_assets_by_id_analyze(company_handle, asset_slug, opts = {})
|
|
717
|
+
data, _status_code, _headers = get_assets_by_id_analyze_with_http_info(company_handle, asset_slug, opts)
|
|
718
|
+
data
|
|
719
|
+
end
|
|
720
|
+
|
|
721
|
+
# Process (analyze) an asset with dynamic rate limiting applied via decorator.
|
|
722
|
+
# @param company_handle [String] Human-readable handle for the Company
|
|
723
|
+
# @param asset_slug [String] URL-friendly slug for the Asset
|
|
724
|
+
# @param [Hash] opts the optional parameters
|
|
725
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
726
|
+
def get_assets_by_id_analyze_with_http_info(company_handle, asset_slug, opts = {})
|
|
727
|
+
if @api_client.config.debugging
|
|
728
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_analyze ...'
|
|
729
|
+
end
|
|
730
|
+
# verify the required parameter 'company_handle' is set
|
|
731
|
+
if @api_client.config.client_side_validation && company_handle.nil?
|
|
732
|
+
fail ArgumentError, "Missing the required parameter 'company_handle' when calling AssetsApi.get_assets_by_id_analyze"
|
|
733
|
+
end
|
|
734
|
+
# verify the required parameter 'asset_slug' is set
|
|
735
|
+
if @api_client.config.client_side_validation && asset_slug.nil?
|
|
736
|
+
fail ArgumentError, "Missing the required parameter 'asset_slug' when calling AssetsApi.get_assets_by_id_analyze"
|
|
737
|
+
end
|
|
738
|
+
# resource path
|
|
739
|
+
local_var_path = '/analyze/{company_handle}/assets/{asset_slug}'.sub('{' + 'company_handle' + '}', CGI.escape(company_handle.to_s)).sub('{' + 'asset_slug' + '}', CGI.escape(asset_slug.to_s))
|
|
740
|
+
|
|
741
|
+
# query parameters
|
|
742
|
+
query_params = opts[:query_params] || {}
|
|
743
|
+
|
|
744
|
+
# header parameters
|
|
745
|
+
header_params = opts[:header_params] || {}
|
|
746
|
+
# HTTP header 'Accept' (if needed)
|
|
747
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
748
|
+
|
|
749
|
+
# form parameters
|
|
750
|
+
form_params = opts[:form_params] || {}
|
|
751
|
+
|
|
752
|
+
# http body (model)
|
|
753
|
+
post_body = opts[:debug_body]
|
|
754
|
+
|
|
755
|
+
# return_type
|
|
756
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
757
|
+
|
|
758
|
+
# auth_names
|
|
759
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
760
|
+
|
|
761
|
+
new_options = opts.merge(
|
|
762
|
+
:operation => :"AssetsApi.get_assets_by_id_analyze",
|
|
763
|
+
:header_params => header_params,
|
|
764
|
+
:query_params => query_params,
|
|
765
|
+
:form_params => form_params,
|
|
766
|
+
:body => post_body,
|
|
767
|
+
:auth_names => auth_names,
|
|
768
|
+
:return_type => return_type
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
772
|
+
if @api_client.config.debugging
|
|
773
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id_analyze\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
774
|
+
end
|
|
775
|
+
return data, status_code, headers
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
# Get the information schema for a specific asset's table
|
|
779
|
+
# @param company_id [String] Unique identifier for the Company
|
|
780
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
781
|
+
# @param [Hash] opts the optional parameters
|
|
782
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
783
|
+
def get_assets_by_id_infoschema(company_id, asset_id, opts = {})
|
|
784
|
+
data, _status_code, _headers = get_assets_by_id_infoschema_with_http_info(company_id, asset_id, opts)
|
|
785
|
+
data
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
# Get the information schema for a specific asset's table
|
|
789
|
+
# @param company_id [String] Unique identifier for the Company
|
|
790
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
791
|
+
# @param [Hash] opts the optional parameters
|
|
792
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
793
|
+
def get_assets_by_id_infoschema_with_http_info(company_id, asset_id, opts = {})
|
|
794
|
+
if @api_client.config.debugging
|
|
795
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_infoschema ...'
|
|
796
|
+
end
|
|
797
|
+
# verify the required parameter 'company_id' is set
|
|
798
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
799
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id_infoschema"
|
|
800
|
+
end
|
|
801
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
802
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_infoschema, the character length must be smaller than or equal to 255.'
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
806
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_infoschema, the character length must be greater than or equal to 1.'
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
810
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
811
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id_infoschema, must conform to the pattern #{pattern}."
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
# verify the required parameter 'asset_id' is set
|
|
815
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
816
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_assets_by_id_infoschema"
|
|
817
|
+
end
|
|
818
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
819
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_infoschema, the character length must be smaller than or equal to 255.'
|
|
820
|
+
end
|
|
821
|
+
|
|
822
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
823
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_infoschema, the character length must be greater than or equal to 1.'
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
827
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
828
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.get_assets_by_id_infoschema, must conform to the pattern #{pattern}."
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
# resource path
|
|
832
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/infoschema'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
833
|
+
|
|
834
|
+
# query parameters
|
|
835
|
+
query_params = opts[:query_params] || {}
|
|
836
|
+
|
|
837
|
+
# header parameters
|
|
838
|
+
header_params = opts[:header_params] || {}
|
|
839
|
+
# HTTP header 'Accept' (if needed)
|
|
840
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
841
|
+
|
|
842
|
+
# form parameters
|
|
843
|
+
form_params = opts[:form_params] || {}
|
|
844
|
+
|
|
845
|
+
# http body (model)
|
|
846
|
+
post_body = opts[:debug_body]
|
|
847
|
+
|
|
848
|
+
# return_type
|
|
849
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
850
|
+
|
|
851
|
+
# auth_names
|
|
852
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
853
|
+
|
|
854
|
+
new_options = opts.merge(
|
|
855
|
+
:operation => :"AssetsApi.get_assets_by_id_infoschema",
|
|
856
|
+
:header_params => header_params,
|
|
857
|
+
:query_params => query_params,
|
|
858
|
+
:form_params => form_params,
|
|
859
|
+
:body => post_body,
|
|
860
|
+
:auth_names => auth_names,
|
|
861
|
+
:return_type => return_type
|
|
862
|
+
)
|
|
863
|
+
|
|
864
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
865
|
+
if @api_client.config.debugging
|
|
866
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id_infoschema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
867
|
+
end
|
|
868
|
+
return data, status_code, headers
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
# Retrieve and save an asset's information schema
|
|
872
|
+
# @param company_id [String] Unique identifier for the Company
|
|
873
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
874
|
+
# @param [Hash] opts the optional parameters
|
|
875
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
876
|
+
def get_assets_by_id_infoschema_save(company_id, asset_id, opts = {})
|
|
877
|
+
data, _status_code, _headers = get_assets_by_id_infoschema_save_with_http_info(company_id, asset_id, opts)
|
|
878
|
+
data
|
|
879
|
+
end
|
|
880
|
+
|
|
881
|
+
# Retrieve and save an asset's information schema
|
|
882
|
+
# @param company_id [String] Unique identifier for the Company
|
|
883
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
884
|
+
# @param [Hash] opts the optional parameters
|
|
885
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
886
|
+
def get_assets_by_id_infoschema_save_with_http_info(company_id, asset_id, opts = {})
|
|
887
|
+
if @api_client.config.debugging
|
|
888
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_infoschema_save ...'
|
|
889
|
+
end
|
|
890
|
+
# verify the required parameter 'company_id' is set
|
|
891
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
892
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id_infoschema_save"
|
|
893
|
+
end
|
|
894
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
895
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_infoschema_save, the character length must be smaller than or equal to 255.'
|
|
896
|
+
end
|
|
897
|
+
|
|
898
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
899
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_infoschema_save, the character length must be greater than or equal to 1.'
|
|
900
|
+
end
|
|
901
|
+
|
|
902
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
903
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
904
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id_infoschema_save, must conform to the pattern #{pattern}."
|
|
905
|
+
end
|
|
906
|
+
|
|
907
|
+
# verify the required parameter 'asset_id' is set
|
|
908
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
909
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_assets_by_id_infoschema_save"
|
|
910
|
+
end
|
|
911
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
912
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_infoschema_save, the character length must be smaller than or equal to 255.'
|
|
913
|
+
end
|
|
914
|
+
|
|
915
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
916
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_infoschema_save, the character length must be greater than or equal to 1.'
|
|
917
|
+
end
|
|
918
|
+
|
|
919
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
920
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
921
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.get_assets_by_id_infoschema_save, must conform to the pattern #{pattern}."
|
|
922
|
+
end
|
|
923
|
+
|
|
924
|
+
# resource path
|
|
925
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/infoschema/save'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
926
|
+
|
|
927
|
+
# query parameters
|
|
928
|
+
query_params = opts[:query_params] || {}
|
|
929
|
+
|
|
930
|
+
# header parameters
|
|
931
|
+
header_params = opts[:header_params] || {}
|
|
932
|
+
# HTTP header 'Accept' (if needed)
|
|
933
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
934
|
+
|
|
935
|
+
# form parameters
|
|
936
|
+
form_params = opts[:form_params] || {}
|
|
937
|
+
|
|
938
|
+
# http body (model)
|
|
939
|
+
post_body = opts[:debug_body]
|
|
940
|
+
|
|
941
|
+
# return_type
|
|
942
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
943
|
+
|
|
944
|
+
# auth_names
|
|
945
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
946
|
+
|
|
947
|
+
new_options = opts.merge(
|
|
948
|
+
:operation => :"AssetsApi.get_assets_by_id_infoschema_save",
|
|
949
|
+
:header_params => header_params,
|
|
950
|
+
:query_params => query_params,
|
|
951
|
+
:form_params => form_params,
|
|
952
|
+
:body => post_body,
|
|
953
|
+
:auth_names => auth_names,
|
|
954
|
+
:return_type => return_type
|
|
955
|
+
)
|
|
956
|
+
|
|
957
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
958
|
+
if @api_client.config.debugging
|
|
959
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id_infoschema_save\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
960
|
+
end
|
|
961
|
+
return data, status_code, headers
|
|
962
|
+
end
|
|
963
|
+
|
|
964
|
+
# Get AI-predicted pricing for a specific asset
|
|
965
|
+
# @param company_id [String] Unique identifier for the Company
|
|
966
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
967
|
+
# @param [Hash] opts the optional parameters
|
|
968
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
969
|
+
def get_assets_by_id_predicted_price(company_id, asset_id, opts = {})
|
|
970
|
+
data, _status_code, _headers = get_assets_by_id_predicted_price_with_http_info(company_id, asset_id, opts)
|
|
971
|
+
data
|
|
972
|
+
end
|
|
973
|
+
|
|
974
|
+
# Get AI-predicted pricing for a specific asset
|
|
975
|
+
# @param company_id [String] Unique identifier for the Company
|
|
976
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
977
|
+
# @param [Hash] opts the optional parameters
|
|
978
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
979
|
+
def get_assets_by_id_predicted_price_with_http_info(company_id, asset_id, opts = {})
|
|
980
|
+
if @api_client.config.debugging
|
|
981
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_predicted_price ...'
|
|
982
|
+
end
|
|
983
|
+
# verify the required parameter 'company_id' is set
|
|
984
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
985
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id_predicted_price"
|
|
986
|
+
end
|
|
987
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
988
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_predicted_price, the character length must be smaller than or equal to 255.'
|
|
989
|
+
end
|
|
990
|
+
|
|
991
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
992
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_predicted_price, the character length must be greater than or equal to 1.'
|
|
993
|
+
end
|
|
994
|
+
|
|
995
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
996
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
997
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id_predicted_price, must conform to the pattern #{pattern}."
|
|
998
|
+
end
|
|
999
|
+
|
|
1000
|
+
# verify the required parameter 'asset_id' is set
|
|
1001
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
1002
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_assets_by_id_predicted_price"
|
|
1003
|
+
end
|
|
1004
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
1005
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_predicted_price, the character length must be smaller than or equal to 255.'
|
|
1006
|
+
end
|
|
1007
|
+
|
|
1008
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
1009
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_predicted_price, the character length must be greater than or equal to 1.'
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1013
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
1014
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.get_assets_by_id_predicted_price, must conform to the pattern #{pattern}."
|
|
1015
|
+
end
|
|
1016
|
+
|
|
1017
|
+
# resource path
|
|
1018
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/predicted_price'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
1019
|
+
|
|
1020
|
+
# query parameters
|
|
1021
|
+
query_params = opts[:query_params] || {}
|
|
1022
|
+
|
|
1023
|
+
# header parameters
|
|
1024
|
+
header_params = opts[:header_params] || {}
|
|
1025
|
+
# HTTP header 'Accept' (if needed)
|
|
1026
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1027
|
+
|
|
1028
|
+
# form parameters
|
|
1029
|
+
form_params = opts[:form_params] || {}
|
|
1030
|
+
|
|
1031
|
+
# http body (model)
|
|
1032
|
+
post_body = opts[:debug_body]
|
|
1033
|
+
|
|
1034
|
+
# return_type
|
|
1035
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
1036
|
+
|
|
1037
|
+
# auth_names
|
|
1038
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1039
|
+
|
|
1040
|
+
new_options = opts.merge(
|
|
1041
|
+
:operation => :"AssetsApi.get_assets_by_id_predicted_price",
|
|
1042
|
+
:header_params => header_params,
|
|
1043
|
+
:query_params => query_params,
|
|
1044
|
+
:form_params => form_params,
|
|
1045
|
+
:body => post_body,
|
|
1046
|
+
:auth_names => auth_names,
|
|
1047
|
+
:return_type => return_type
|
|
1048
|
+
)
|
|
1049
|
+
|
|
1050
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1051
|
+
if @api_client.config.debugging
|
|
1052
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id_predicted_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1053
|
+
end
|
|
1054
|
+
return data, status_code, headers
|
|
1055
|
+
end
|
|
1056
|
+
|
|
1057
|
+
# Get statistics for all assets the user has access to
|
|
1058
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1059
|
+
# @param [Hash] opts the optional parameters
|
|
1060
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
1061
|
+
def get_assets_by_id_statistics(company_id, opts = {})
|
|
1062
|
+
data, _status_code, _headers = get_assets_by_id_statistics_with_http_info(company_id, opts)
|
|
1063
|
+
data
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
# Get statistics for all assets the user has access to
|
|
1067
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1068
|
+
# @param [Hash] opts the optional parameters
|
|
1069
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
1070
|
+
def get_assets_by_id_statistics_with_http_info(company_id, opts = {})
|
|
1071
|
+
if @api_client.config.debugging
|
|
1072
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_statistics ...'
|
|
1073
|
+
end
|
|
1074
|
+
# verify the required parameter 'company_id' is set
|
|
1075
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1076
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id_statistics"
|
|
1077
|
+
end
|
|
1078
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1079
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_statistics, the character length must be smaller than or equal to 255.'
|
|
1080
|
+
end
|
|
1081
|
+
|
|
1082
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1083
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_statistics, the character length must be greater than or equal to 1.'
|
|
1084
|
+
end
|
|
1085
|
+
|
|
1086
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1087
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1088
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id_statistics, must conform to the pattern #{pattern}."
|
|
1089
|
+
end
|
|
1090
|
+
|
|
1091
|
+
# resource path
|
|
1092
|
+
local_var_path = '/companies/{company_id}/assets/statistics'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
1093
|
+
|
|
1094
|
+
# query parameters
|
|
1095
|
+
query_params = opts[:query_params] || {}
|
|
1096
|
+
|
|
1097
|
+
# header parameters
|
|
1098
|
+
header_params = opts[:header_params] || {}
|
|
1099
|
+
# HTTP header 'Accept' (if needed)
|
|
1100
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1101
|
+
|
|
1102
|
+
# form parameters
|
|
1103
|
+
form_params = opts[:form_params] || {}
|
|
1104
|
+
|
|
1105
|
+
# http body (model)
|
|
1106
|
+
post_body = opts[:debug_body]
|
|
1107
|
+
|
|
1108
|
+
# return_type
|
|
1109
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
1110
|
+
|
|
1111
|
+
# auth_names
|
|
1112
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1113
|
+
|
|
1114
|
+
new_options = opts.merge(
|
|
1115
|
+
:operation => :"AssetsApi.get_assets_by_id_statistics",
|
|
1116
|
+
:header_params => header_params,
|
|
1117
|
+
:query_params => query_params,
|
|
1118
|
+
:form_params => form_params,
|
|
1119
|
+
:body => post_body,
|
|
1120
|
+
:auth_names => auth_names,
|
|
1121
|
+
:return_type => return_type
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1125
|
+
if @api_client.config.debugging
|
|
1126
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id_statistics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1127
|
+
end
|
|
1128
|
+
return data, status_code, headers
|
|
1129
|
+
end
|
|
1130
|
+
|
|
1131
|
+
# GET /companies/{company_id}/assets/{asset_id}/test
|
|
1132
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1133
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
1134
|
+
# @param [Hash] opts the optional parameters
|
|
1135
|
+
# @return [GetAssetsByIdAnalyze200Response]
|
|
1136
|
+
def get_assets_by_id_test(company_id, asset_id, opts = {})
|
|
1137
|
+
data, _status_code, _headers = get_assets_by_id_test_with_http_info(company_id, asset_id, opts)
|
|
1138
|
+
data
|
|
1139
|
+
end
|
|
1140
|
+
|
|
1141
|
+
# GET /companies/{company_id}/assets/{asset_id}/test
|
|
1142
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1143
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
1144
|
+
# @param [Hash] opts the optional parameters
|
|
1145
|
+
# @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
|
|
1146
|
+
def get_assets_by_id_test_with_http_info(company_id, asset_id, opts = {})
|
|
1147
|
+
if @api_client.config.debugging
|
|
1148
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_test ...'
|
|
1149
|
+
end
|
|
1150
|
+
# verify the required parameter 'company_id' is set
|
|
1151
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1152
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.get_assets_by_id_test"
|
|
1153
|
+
end
|
|
1154
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1155
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_test, the character length must be smaller than or equal to 255.'
|
|
1156
|
+
end
|
|
1157
|
+
|
|
1158
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1159
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.get_assets_by_id_test, the character length must be greater than or equal to 1.'
|
|
1160
|
+
end
|
|
1161
|
+
|
|
1162
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1163
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1164
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.get_assets_by_id_test, must conform to the pattern #{pattern}."
|
|
1165
|
+
end
|
|
1166
|
+
|
|
1167
|
+
# verify the required parameter 'asset_id' is set
|
|
1168
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
1169
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_assets_by_id_test"
|
|
1170
|
+
end
|
|
1171
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
1172
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_test, the character length must be smaller than or equal to 255.'
|
|
1173
|
+
end
|
|
1174
|
+
|
|
1175
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
1176
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.get_assets_by_id_test, the character length must be greater than or equal to 1.'
|
|
1177
|
+
end
|
|
1178
|
+
|
|
1179
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1180
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
1181
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.get_assets_by_id_test, must conform to the pattern #{pattern}."
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1184
|
+
# resource path
|
|
1185
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}/test'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
1186
|
+
|
|
1187
|
+
# query parameters
|
|
1188
|
+
query_params = opts[:query_params] || {}
|
|
1189
|
+
|
|
1190
|
+
# header parameters
|
|
1191
|
+
header_params = opts[:header_params] || {}
|
|
1192
|
+
# HTTP header 'Accept' (if needed)
|
|
1193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1194
|
+
|
|
1195
|
+
# form parameters
|
|
1196
|
+
form_params = opts[:form_params] || {}
|
|
1197
|
+
|
|
1198
|
+
# http body (model)
|
|
1199
|
+
post_body = opts[:debug_body]
|
|
1200
|
+
|
|
1201
|
+
# return_type
|
|
1202
|
+
return_type = opts[:debug_return_type] || 'GetAssetsByIdAnalyze200Response'
|
|
1203
|
+
|
|
1204
|
+
# auth_names
|
|
1205
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1206
|
+
|
|
1207
|
+
new_options = opts.merge(
|
|
1208
|
+
:operation => :"AssetsApi.get_assets_by_id_test",
|
|
1209
|
+
:header_params => header_params,
|
|
1210
|
+
:query_params => query_params,
|
|
1211
|
+
:form_params => form_params,
|
|
1212
|
+
:body => post_body,
|
|
1213
|
+
:auth_names => auth_names,
|
|
1214
|
+
:return_type => return_type
|
|
1215
|
+
)
|
|
1216
|
+
|
|
1217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1218
|
+
if @api_client.config.debugging
|
|
1219
|
+
@api_client.config.logger.debug "API called: AssetsApi#get_assets_by_id_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1220
|
+
end
|
|
1221
|
+
return data, status_code, headers
|
|
1222
|
+
end
|
|
1223
|
+
|
|
1224
|
+
# Get all assets for a specific company
|
|
1225
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1226
|
+
# @param [Hash] opts the optional parameters
|
|
1227
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
1228
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
1229
|
+
# @option opts [String] :sort_by Field to sort by
|
|
1230
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
1231
|
+
# @option opts [String] :search Search term to filter results
|
|
1232
|
+
# @return [ListAssets200Response]
|
|
1233
|
+
def list_assets(company_id, opts = {})
|
|
1234
|
+
data, _status_code, _headers = list_assets_with_http_info(company_id, opts)
|
|
1235
|
+
data
|
|
1236
|
+
end
|
|
1237
|
+
|
|
1238
|
+
# Get all assets for a specific company
|
|
1239
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1240
|
+
# @param [Hash] opts the optional parameters
|
|
1241
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
1242
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
1243
|
+
# @option opts [String] :sort_by Field to sort by
|
|
1244
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
1245
|
+
# @option opts [String] :search Search term to filter results
|
|
1246
|
+
# @return [Array<(ListAssets200Response, Integer, Hash)>] ListAssets200Response data, response status code and response headers
|
|
1247
|
+
def list_assets_with_http_info(company_id, opts = {})
|
|
1248
|
+
if @api_client.config.debugging
|
|
1249
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.list_assets ...'
|
|
1250
|
+
end
|
|
1251
|
+
# verify the required parameter 'company_id' is set
|
|
1252
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1253
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.list_assets"
|
|
1254
|
+
end
|
|
1255
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1256
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.list_assets, the character length must be smaller than or equal to 255.'
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1260
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.list_assets, the character length must be greater than or equal to 1.'
|
|
1261
|
+
end
|
|
1262
|
+
|
|
1263
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1264
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1265
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.list_assets, must conform to the pattern #{pattern}."
|
|
1266
|
+
end
|
|
1267
|
+
|
|
1268
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1269
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AssetsApi.list_assets, must be greater than or equal to 1.'
|
|
1270
|
+
end
|
|
1271
|
+
|
|
1272
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1273
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AssetsApi.list_assets, must be smaller than or equal to 100.'
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1277
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AssetsApi.list_assets, must be greater than or equal to 1.'
|
|
1278
|
+
end
|
|
1279
|
+
|
|
1280
|
+
allowable_values = ["asc", "desc"]
|
|
1281
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
1282
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
1283
|
+
end
|
|
1284
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
1285
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AssetsApi.list_assets, the character length must be smaller than or equal to 255.'
|
|
1286
|
+
end
|
|
1287
|
+
|
|
1288
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
1289
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AssetsApi.list_assets, the character length must be greater than or equal to 1.'
|
|
1290
|
+
end
|
|
1291
|
+
|
|
1292
|
+
# resource path
|
|
1293
|
+
local_var_path = '/companies/{company_id}/assets'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
1294
|
+
|
|
1295
|
+
# query parameters
|
|
1296
|
+
query_params = opts[:query_params] || {}
|
|
1297
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1298
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1299
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
1300
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
1301
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1302
|
+
|
|
1303
|
+
# header parameters
|
|
1304
|
+
header_params = opts[:header_params] || {}
|
|
1305
|
+
# HTTP header 'Accept' (if needed)
|
|
1306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1307
|
+
|
|
1308
|
+
# form parameters
|
|
1309
|
+
form_params = opts[:form_params] || {}
|
|
1310
|
+
|
|
1311
|
+
# http body (model)
|
|
1312
|
+
post_body = opts[:debug_body]
|
|
1313
|
+
|
|
1314
|
+
# return_type
|
|
1315
|
+
return_type = opts[:debug_return_type] || 'ListAssets200Response'
|
|
1316
|
+
|
|
1317
|
+
# auth_names
|
|
1318
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1319
|
+
|
|
1320
|
+
new_options = opts.merge(
|
|
1321
|
+
:operation => :"AssetsApi.list_assets",
|
|
1322
|
+
:header_params => header_params,
|
|
1323
|
+
:query_params => query_params,
|
|
1324
|
+
:form_params => form_params,
|
|
1325
|
+
:body => post_body,
|
|
1326
|
+
:auth_names => auth_names,
|
|
1327
|
+
:return_type => return_type
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1331
|
+
if @api_client.config.debugging
|
|
1332
|
+
@api_client.config.logger.debug "API called: AssetsApi#list_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1333
|
+
end
|
|
1334
|
+
return data, status_code, headers
|
|
1335
|
+
end
|
|
1336
|
+
|
|
1337
|
+
# Search and filter assets with advanced options Query Parameters: q: Search query string category: Filter by category sport: Filter by sport tag sort_by: Sort field (name|recent|popular|trending) limit: Number of results (default 20, max 100) offset: Offset for pagination include_recommended: Include recommendations (true/false) include_schema: Include asset_schema in response (true/false, default false)
|
|
1338
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1339
|
+
# @param [Hash] opts the optional parameters
|
|
1340
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
1341
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
1342
|
+
# @option opts [String] :sort_by Field to sort by
|
|
1343
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
1344
|
+
# @option opts [String] :search Search term to filter results
|
|
1345
|
+
# @return [ListAssets200Response]
|
|
1346
|
+
def list_assets_search(company_id, opts = {})
|
|
1347
|
+
data, _status_code, _headers = list_assets_search_with_http_info(company_id, opts)
|
|
1348
|
+
data
|
|
1349
|
+
end
|
|
1350
|
+
|
|
1351
|
+
# Search and filter assets with advanced options Query Parameters: q: Search query string category: Filter by category sport: Filter by sport tag sort_by: Sort field (name|recent|popular|trending) limit: Number of results (default 20, max 100) offset: Offset for pagination include_recommended: Include recommendations (true/false) include_schema: Include asset_schema in response (true/false, default false)
|
|
1352
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1353
|
+
# @param [Hash] opts the optional parameters
|
|
1354
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
1355
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
1356
|
+
# @option opts [String] :sort_by Field to sort by
|
|
1357
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
1358
|
+
# @option opts [String] :search Search term to filter results
|
|
1359
|
+
# @return [Array<(ListAssets200Response, Integer, Hash)>] ListAssets200Response data, response status code and response headers
|
|
1360
|
+
def list_assets_search_with_http_info(company_id, opts = {})
|
|
1361
|
+
if @api_client.config.debugging
|
|
1362
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.list_assets_search ...'
|
|
1363
|
+
end
|
|
1364
|
+
# verify the required parameter 'company_id' is set
|
|
1365
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1366
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.list_assets_search"
|
|
1367
|
+
end
|
|
1368
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1369
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.list_assets_search, the character length must be smaller than or equal to 255.'
|
|
1370
|
+
end
|
|
1371
|
+
|
|
1372
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1373
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.list_assets_search, the character length must be greater than or equal to 1.'
|
|
1374
|
+
end
|
|
1375
|
+
|
|
1376
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1377
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1378
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.list_assets_search, must conform to the pattern #{pattern}."
|
|
1379
|
+
end
|
|
1380
|
+
|
|
1381
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1382
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AssetsApi.list_assets_search, must be greater than or equal to 1.'
|
|
1383
|
+
end
|
|
1384
|
+
|
|
1385
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1386
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AssetsApi.list_assets_search, must be smaller than or equal to 100.'
|
|
1387
|
+
end
|
|
1388
|
+
|
|
1389
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1390
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AssetsApi.list_assets_search, must be greater than or equal to 1.'
|
|
1391
|
+
end
|
|
1392
|
+
|
|
1393
|
+
allowable_values = ["asc", "desc"]
|
|
1394
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
1395
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
1396
|
+
end
|
|
1397
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
1398
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AssetsApi.list_assets_search, the character length must be smaller than or equal to 255.'
|
|
1399
|
+
end
|
|
1400
|
+
|
|
1401
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
1402
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AssetsApi.list_assets_search, the character length must be greater than or equal to 1.'
|
|
1403
|
+
end
|
|
1404
|
+
|
|
1405
|
+
# resource path
|
|
1406
|
+
local_var_path = '/companies/{company_id}/assets/search'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
1407
|
+
|
|
1408
|
+
# query parameters
|
|
1409
|
+
query_params = opts[:query_params] || {}
|
|
1410
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1411
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1412
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
1413
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
1414
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1415
|
+
|
|
1416
|
+
# header parameters
|
|
1417
|
+
header_params = opts[:header_params] || {}
|
|
1418
|
+
# HTTP header 'Accept' (if needed)
|
|
1419
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1420
|
+
|
|
1421
|
+
# form parameters
|
|
1422
|
+
form_params = opts[:form_params] || {}
|
|
1423
|
+
|
|
1424
|
+
# http body (model)
|
|
1425
|
+
post_body = opts[:debug_body]
|
|
1426
|
+
|
|
1427
|
+
# return_type
|
|
1428
|
+
return_type = opts[:debug_return_type] || 'ListAssets200Response'
|
|
1429
|
+
|
|
1430
|
+
# auth_names
|
|
1431
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1432
|
+
|
|
1433
|
+
new_options = opts.merge(
|
|
1434
|
+
:operation => :"AssetsApi.list_assets_search",
|
|
1435
|
+
:header_params => header_params,
|
|
1436
|
+
:query_params => query_params,
|
|
1437
|
+
:form_params => form_params,
|
|
1438
|
+
:body => post_body,
|
|
1439
|
+
:auth_names => auth_names,
|
|
1440
|
+
:return_type => return_type
|
|
1441
|
+
)
|
|
1442
|
+
|
|
1443
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1444
|
+
if @api_client.config.debugging
|
|
1445
|
+
@api_client.config.logger.debug "API called: AssetsApi#list_assets_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1446
|
+
end
|
|
1447
|
+
return data, status_code, headers
|
|
1448
|
+
end
|
|
1449
|
+
|
|
1450
|
+
# Update an existing asset by ID
|
|
1451
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1452
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
1453
|
+
# @param assets_update [AssetsUpdate]
|
|
1454
|
+
# @param [Hash] opts the optional parameters
|
|
1455
|
+
# @return [UpdateAssets200Response]
|
|
1456
|
+
def update_assets(company_id, asset_id, assets_update, opts = {})
|
|
1457
|
+
data, _status_code, _headers = update_assets_with_http_info(company_id, asset_id, assets_update, opts)
|
|
1458
|
+
data
|
|
1459
|
+
end
|
|
1460
|
+
|
|
1461
|
+
# Update an existing asset by ID
|
|
1462
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1463
|
+
# @param asset_id [String] Unique identifier for the Asset
|
|
1464
|
+
# @param assets_update [AssetsUpdate]
|
|
1465
|
+
# @param [Hash] opts the optional parameters
|
|
1466
|
+
# @return [Array<(UpdateAssets200Response, Integer, Hash)>] UpdateAssets200Response data, response status code and response headers
|
|
1467
|
+
def update_assets_with_http_info(company_id, asset_id, assets_update, opts = {})
|
|
1468
|
+
if @api_client.config.debugging
|
|
1469
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.update_assets ...'
|
|
1470
|
+
end
|
|
1471
|
+
# verify the required parameter 'company_id' is set
|
|
1472
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1473
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetsApi.update_assets"
|
|
1474
|
+
end
|
|
1475
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1476
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.update_assets, the character length must be smaller than or equal to 255.'
|
|
1477
|
+
end
|
|
1478
|
+
|
|
1479
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1480
|
+
fail ArgumentError, 'invalid value for "company_id" when calling AssetsApi.update_assets, the character length must be greater than or equal to 1.'
|
|
1481
|
+
end
|
|
1482
|
+
|
|
1483
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1484
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1485
|
+
fail ArgumentError, "invalid value for 'company_id' when calling AssetsApi.update_assets, must conform to the pattern #{pattern}."
|
|
1486
|
+
end
|
|
1487
|
+
|
|
1488
|
+
# verify the required parameter 'asset_id' is set
|
|
1489
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
|
1490
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.update_assets"
|
|
1491
|
+
end
|
|
1492
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length > 255
|
|
1493
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.update_assets, the character length must be smaller than or equal to 255.'
|
|
1494
|
+
end
|
|
1495
|
+
|
|
1496
|
+
if @api_client.config.client_side_validation && asset_id.to_s.length < 1
|
|
1497
|
+
fail ArgumentError, 'invalid value for "asset_id" when calling AssetsApi.update_assets, the character length must be greater than or equal to 1.'
|
|
1498
|
+
end
|
|
1499
|
+
|
|
1500
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1501
|
+
if @api_client.config.client_side_validation && asset_id !~ pattern
|
|
1502
|
+
fail ArgumentError, "invalid value for 'asset_id' when calling AssetsApi.update_assets, must conform to the pattern #{pattern}."
|
|
1503
|
+
end
|
|
1504
|
+
|
|
1505
|
+
# verify the required parameter 'assets_update' is set
|
|
1506
|
+
if @api_client.config.client_side_validation && assets_update.nil?
|
|
1507
|
+
fail ArgumentError, "Missing the required parameter 'assets_update' when calling AssetsApi.update_assets"
|
|
1508
|
+
end
|
|
1509
|
+
# resource path
|
|
1510
|
+
local_var_path = '/companies/{company_id}/assets/{asset_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
|
|
1511
|
+
|
|
1512
|
+
# query parameters
|
|
1513
|
+
query_params = opts[:query_params] || {}
|
|
1514
|
+
|
|
1515
|
+
# header parameters
|
|
1516
|
+
header_params = opts[:header_params] || {}
|
|
1517
|
+
# HTTP header 'Accept' (if needed)
|
|
1518
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1519
|
+
# HTTP header 'Content-Type'
|
|
1520
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1521
|
+
if !content_type.nil?
|
|
1522
|
+
header_params['Content-Type'] = content_type
|
|
1523
|
+
end
|
|
1524
|
+
|
|
1525
|
+
# form parameters
|
|
1526
|
+
form_params = opts[:form_params] || {}
|
|
1527
|
+
|
|
1528
|
+
# http body (model)
|
|
1529
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assets_update)
|
|
1530
|
+
|
|
1531
|
+
# return_type
|
|
1532
|
+
return_type = opts[:debug_return_type] || 'UpdateAssets200Response'
|
|
1533
|
+
|
|
1534
|
+
# auth_names
|
|
1535
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1536
|
+
|
|
1537
|
+
new_options = opts.merge(
|
|
1538
|
+
:operation => :"AssetsApi.update_assets",
|
|
1539
|
+
:header_params => header_params,
|
|
1540
|
+
:query_params => query_params,
|
|
1541
|
+
:form_params => form_params,
|
|
1542
|
+
:body => post_body,
|
|
1543
|
+
:auth_names => auth_names,
|
|
1544
|
+
:return_type => return_type
|
|
1545
|
+
)
|
|
1546
|
+
|
|
1547
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1548
|
+
if @api_client.config.debugging
|
|
1549
|
+
@api_client.config.logger.debug "API called: AssetsApi#update_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1550
|
+
end
|
|
1551
|
+
return data, status_code, headers
|
|
1552
|
+
end
|
|
1553
|
+
end
|
|
1554
|
+
end
|