diff --git a/.circleci/config.yml b/.circleci/config.yml index 8fb5c1b2..cc11263e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -107,6 +107,20 @@ workflows: name: "Deploy Ruby" language: ruby docker_image: cimg/ruby:2.6 + - test: + name: "Test Rust" + language: rust + docker_image: cimg/rust:1.85.0 + - deploy_bindings: + requires: + - "Test Rust" + filters: + branches: + only: + - master + name: "Deploy Rust" + language: rust + docker_image: cimg/rust:1.85.0 - test: name: "Test Python 2.7" language: python diff --git a/bindings/rust/build.sh b/bindings/rust/build.sh new file mode 100755 index 00000000..8c6c286c --- /dev/null +++ b/bindings/rust/build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -e + +self=$(readlink -f $BASH_SOURCE) +self_dir=$(dirname $self) +root_dir=$(readlink -f "$self_dir/../..") +. $root_dir/scripts/common.sh $1 + +src_dir="$self_dir/src" +build_json="$src_dir/build.json" +template_dir="$self_dir/templates" + +rm -rf $src_dir +mkdir -p $src_dir + +cat > $build_json <"] +license = "Apache-2.0" +homepage = "https://cloudsmith.com/" +repository = "https://github.com/cloudsmith-io/cloudsmith-api" + +[dependencies] +serde = "1.0" +serde_derive = "1.0" +serde_yaml = "0.7" +serde_json = "1.0" +base64 = "~0.7.0" +futures = "0.1.16" +hyper = "0.11.6" +url = "1.5" + +[dev-dependencies] +tokio-core = "*" diff --git a/bindings/rust/src/README.md b/bindings/rust/src/README.md new file mode 100644 index 00000000..e6126f34 --- /dev/null +++ b/bindings/rust/src/README.md @@ -0,0 +1,606 @@ +# Rust API client for cloudsmith_api + +The API to the Cloudsmith Service + +## Overview +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. + +- API version: v1 +- Package version: 2.0.16 +- Build package: io.swagger.codegen.languages.RustClientCodegen +For more information, please visit [https://help.cloudsmith.io](https://help.cloudsmith.io) + +## Installation +Put the package under your project folder and add the following in import: +``` + "./cloudsmith_api" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuditLogApi* | [**audit_log_namespace_list**](docs/AuditLogApi.md#audit_log_namespace_list) | **Get** /audit-log/{owner}/ | Lists audit log entries for a specific namespace. +*AuditLogApi* | [**audit_log_repo_list**](docs/AuditLogApi.md#audit_log_repo_list) | **Get** /audit-log/{owner}/{repo}/ | Lists audit log entries for a specific repository. +*BadgesApi* | [**badges_version_list**](docs/BadgesApi.md#badges_version_list) | **Get** /badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/ | Get latest package version for a package or package group. +*DistrosApi* | [**distros_list**](docs/DistrosApi.md#distros_list) | **Get** /distros/ | Get a list of all supported distributions. +*DistrosApi* | [**distros_read**](docs/DistrosApi.md#distros_read) | **Get** /distros/{slug}/ | View for viewing/listing distributions. +*EntitlementsApi* | [**entitlements_create**](docs/EntitlementsApi.md#entitlements_create) | **Post** /entitlements/{owner}/{repo}/ | Create a specific entitlement in a repository. +*EntitlementsApi* | [**entitlements_delete**](docs/EntitlementsApi.md#entitlements_delete) | **Delete** /entitlements/{owner}/{repo}/{identifier}/ | Delete a specific entitlement in a repository. +*EntitlementsApi* | [**entitlements_disable**](docs/EntitlementsApi.md#entitlements_disable) | **Post** /entitlements/{owner}/{repo}/{identifier}/disable/ | Disable an entitlement token in a repository. +*EntitlementsApi* | [**entitlements_enable**](docs/EntitlementsApi.md#entitlements_enable) | **Post** /entitlements/{owner}/{repo}/{identifier}/enable/ | Enable an entitlement token in a repository. +*EntitlementsApi* | [**entitlements_list**](docs/EntitlementsApi.md#entitlements_list) | **Get** /entitlements/{owner}/{repo}/ | Get a list of all entitlements in a repository. +*EntitlementsApi* | [**entitlements_partial_update**](docs/EntitlementsApi.md#entitlements_partial_update) | **Patch** /entitlements/{owner}/{repo}/{identifier}/ | Update a specific entitlement in a repository. +*EntitlementsApi* | [**entitlements_read**](docs/EntitlementsApi.md#entitlements_read) | **Get** /entitlements/{owner}/{repo}/{identifier}/ | Get a specific entitlement in a repository. +*EntitlementsApi* | [**entitlements_refresh**](docs/EntitlementsApi.md#entitlements_refresh) | **Post** /entitlements/{owner}/{repo}/{identifier}/refresh/ | Refresh an entitlement token in a repository. +*EntitlementsApi* | [**entitlements_reset**](docs/EntitlementsApi.md#entitlements_reset) | **Post** /entitlements/{owner}/{repo}/{identifier}/reset/ | Reset the statistics for an entitlement token in a repository. +*EntitlementsApi* | [**entitlements_sync**](docs/EntitlementsApi.md#entitlements_sync) | **Post** /entitlements/{owner}/{repo}/sync/ | Synchronise tokens from a source repository. +*FilesApi* | [**files_abort**](docs/FilesApi.md#files_abort) | **Post** /files/{owner}/{repo}/{identifier}/abort/ | Abort a multipart file upload. +*FilesApi* | [**files_complete**](docs/FilesApi.md#files_complete) | **Post** /files/{owner}/{repo}/{identifier}/complete/ | Complete a multipart file upload. +*FilesApi* | [**files_create**](docs/FilesApi.md#files_create) | **Post** /files/{owner}/{repo}/ | Request URL(s) to upload new package file upload(s) to. +*FilesApi* | [**files_info**](docs/FilesApi.md#files_info) | **Get** /files/{owner}/{repo}/{identifier}/info/ | Get upload information to perform a multipart file upload. +*FilesApi* | [**files_validate**](docs/FilesApi.md#files_validate) | **Post** /files/{owner}/{repo}/validate/ | Validate parameters used for create. +*FormatsApi* | [**formats_list**](docs/FormatsApi.md#formats_list) | **Get** /formats/ | Get a list of all supported package formats. +*FormatsApi* | [**formats_read**](docs/FormatsApi.md#formats_read) | **Get** /formats/{slug}/ | Get a specific supported package format. +*MetricsApi* | [**metrics_entitlements_account_list**](docs/MetricsApi.md#metrics_entitlements_account_list) | **Get** /metrics/entitlements/{owner}/ | View for listing entitlement token metrics, across an account. +*MetricsApi* | [**metrics_entitlements_repo_list**](docs/MetricsApi.md#metrics_entitlements_repo_list) | **Get** /metrics/entitlements/{owner}/{repo}/ | View for listing entitlement token metrics, for a repository. +*MetricsApi* | [**metrics_packages_list**](docs/MetricsApi.md#metrics_packages_list) | **Get** /metrics/packages/{owner}/{repo}/ | View for listing package usage metrics, for a repository. +*NamespacesApi* | [**namespaces_list**](docs/NamespacesApi.md#namespaces_list) | **Get** /namespaces/ | Get a list of all namespaces the user belongs to. +*NamespacesApi* | [**namespaces_read**](docs/NamespacesApi.md#namespaces_read) | **Get** /namespaces/{slug}/ | Get a specific namespace that the user belongs to. +*OrgsApi* | [**orgs_delete**](docs/OrgsApi.md#orgs_delete) | **Delete** /orgs/{org}/ | Delete the specified organization. +*OrgsApi* | [**orgs_deny_policy_create**](docs/OrgsApi.md#orgs_deny_policy_create) | **Post** /orgs/{org}/deny-policy/ | Create a package deny policy. +*OrgsApi* | [**orgs_deny_policy_delete**](docs/OrgsApi.md#orgs_deny_policy_delete) | **Delete** /orgs/{org}/deny-policy/{slug_perm}/ | Delete a package deny policy. +*OrgsApi* | [**orgs_deny_policy_list**](docs/OrgsApi.md#orgs_deny_policy_list) | **Get** /orgs/{org}/deny-policy/ | Get a list of all package deny policies. +*OrgsApi* | [**orgs_deny_policy_partial_update**](docs/OrgsApi.md#orgs_deny_policy_partial_update) | **Patch** /orgs/{org}/deny-policy/{slug_perm}/ | Partially update a package deny policy. +*OrgsApi* | [**orgs_deny_policy_read**](docs/OrgsApi.md#orgs_deny_policy_read) | **Get** /orgs/{org}/deny-policy/{slug_perm}/ | Get a package deny policy. +*OrgsApi* | [**orgs_deny_policy_update**](docs/OrgsApi.md#orgs_deny_policy_update) | **Put** /orgs/{org}/deny-policy/{slug_perm}/ | Update a package deny policy. +*OrgsApi* | [**orgs_invites_create**](docs/OrgsApi.md#orgs_invites_create) | **Post** /orgs/{org}/invites/ | Create an organization invite for a specific user +*OrgsApi* | [**orgs_invites_delete**](docs/OrgsApi.md#orgs_invites_delete) | **Delete** /orgs/{org}/invites/{slug_perm}/ | Delete a specific organization invite +*OrgsApi* | [**orgs_invites_extend**](docs/OrgsApi.md#orgs_invites_extend) | **Post** /orgs/{org}/invites/{slug_perm}/extend/ | Extend an organization invite. +*OrgsApi* | [**orgs_invites_list**](docs/OrgsApi.md#orgs_invites_list) | **Get** /orgs/{org}/invites/ | Get a list of all invites for an organization. +*OrgsApi* | [**orgs_invites_partial_update**](docs/OrgsApi.md#orgs_invites_partial_update) | **Patch** /orgs/{org}/invites/{slug_perm}/ | Update a specific organization invite. +*OrgsApi* | [**orgs_invites_resend**](docs/OrgsApi.md#orgs_invites_resend) | **Post** /orgs/{org}/invites/{slug_perm}/resend/ | Resend an organization invite. +*OrgsApi* | [**orgs_license_policy_create**](docs/OrgsApi.md#orgs_license_policy_create) | **Post** /orgs/{org}/license-policy/ | Create a package license policy. +*OrgsApi* | [**orgs_license_policy_delete**](docs/OrgsApi.md#orgs_license_policy_delete) | **Delete** /orgs/{org}/license-policy/{slug_perm}/ | Delete a package license policy. +*OrgsApi* | [**orgs_license_policy_evaluation_create**](docs/OrgsApi.md#orgs_license_policy_evaluation_create) | **Post** /orgs/{org}/license-policy/{policy_slug_perm}/evaluation/ | Create an evaluation request for this policy. +*OrgsApi* | [**orgs_license_policy_evaluation_list**](docs/OrgsApi.md#orgs_license_policy_evaluation_list) | **Get** /orgs/{org}/license-policy/{policy_slug_perm}/evaluation/ | List evaluation requests for this policy. +*OrgsApi* | [**orgs_license_policy_evaluation_read**](docs/OrgsApi.md#orgs_license_policy_evaluation_read) | **Get** /orgs/{org}/license-policy/{policy_slug_perm}/evaluation/{slug_perm}/ | Retrieve an evaluation request for this policy. +*OrgsApi* | [**orgs_license_policy_list**](docs/OrgsApi.md#orgs_license_policy_list) | **Get** /orgs/{org}/license-policy/ | Get a list of all package license policies. +*OrgsApi* | [**orgs_license_policy_partial_update**](docs/OrgsApi.md#orgs_license_policy_partial_update) | **Patch** /orgs/{org}/license-policy/{slug_perm}/ | Partially update a package license policy. +*OrgsApi* | [**orgs_license_policy_read**](docs/OrgsApi.md#orgs_license_policy_read) | **Get** /orgs/{org}/license-policy/{slug_perm}/ | Get a package license policy. +*OrgsApi* | [**orgs_license_policy_update**](docs/OrgsApi.md#orgs_license_policy_update) | **Put** /orgs/{org}/license-policy/{slug_perm}/ | Update a package license policy. +*OrgsApi* | [**orgs_license_policy_violation_list**](docs/OrgsApi.md#orgs_license_policy_violation_list) | **Get** /orgs/{org}/license-policy-violation/ | List all current license policy violations for this Organization. +*OrgsApi* | [**orgs_list**](docs/OrgsApi.md#orgs_list) | **Get** /orgs/ | Get a list of all the organizations you are associated with. +*OrgsApi* | [**orgs_members_delete**](docs/OrgsApi.md#orgs_members_delete) | **Delete** /orgs/{org}/members/{member}/ | Removes a member from the organization. +*OrgsApi* | [**orgs_members_list**](docs/OrgsApi.md#orgs_members_list) | **Get** /orgs/{org}/members/ | Get the details for all organization members. +*OrgsApi* | [**orgs_members_partial_update**](docs/OrgsApi.md#orgs_members_partial_update) | **Patch** /orgs/{org}/members/{member}/ | Views for working with organization members. +*OrgsApi* | [**orgs_members_read**](docs/OrgsApi.md#orgs_members_read) | **Get** /orgs/{org}/members/{member}/ | Get the details for a specific organization member. +*OrgsApi* | [**orgs_members_refresh**](docs/OrgsApi.md#orgs_members_refresh) | **Post** /orgs/{org}/members/{member}/refresh/ | Refresh a member of the organization's API key. +*OrgsApi* | [**orgs_members_remove**](docs/OrgsApi.md#orgs_members_remove) | **Get** /orgs/{org}/members/{member}/remove/ | Removes a member from the organization (deprecated, use DELETE instead). +*OrgsApi* | [**orgs_members_update_role**](docs/OrgsApi.md#orgs_members_update_role) | **Patch** /orgs/{org}/members/{member}/update-role/ | Update a member's role in the organization. +*OrgsApi* | [**orgs_members_update_visibility**](docs/OrgsApi.md#orgs_members_update_visibility) | **Patch** /orgs/{org}/members/{member}/update-visibility/ | Update a member's visibility in the organization. +*OrgsApi* | [**orgs_openid_connect_create**](docs/OrgsApi.md#orgs_openid_connect_create) | **Post** /orgs/{org}/openid-connect/ | Create the OpenID Connect provider settings for the org. +*OrgsApi* | [**orgs_openid_connect_delete**](docs/OrgsApi.md#orgs_openid_connect_delete) | **Delete** /orgs/{org}/openid-connect/{slug_perm}/ | Delete a specific OpenID Connect provider setting for the org. +*OrgsApi* | [**orgs_openid_connect_list**](docs/OrgsApi.md#orgs_openid_connect_list) | **Get** /orgs/{org}/openid-connect/ | Retrieve the list of OpenID Connect provider settings for the org. +*OrgsApi* | [**orgs_openid_connect_partial_update**](docs/OrgsApi.md#orgs_openid_connect_partial_update) | **Patch** /orgs/{org}/openid-connect/{slug_perm}/ | Update a specific OpenID Connect provider setting for the org. +*OrgsApi* | [**orgs_openid_connect_read**](docs/OrgsApi.md#orgs_openid_connect_read) | **Get** /orgs/{org}/openid-connect/{slug_perm}/ | Retrieve a specific OpenID Connect provider setting for the org. +*OrgsApi* | [**orgs_openid_connect_update**](docs/OrgsApi.md#orgs_openid_connect_update) | **Put** /orgs/{org}/openid-connect/{slug_perm}/ | Update a specific OpenID Connect provider setting for the org. +*OrgsApi* | [**orgs_read**](docs/OrgsApi.md#orgs_read) | **Get** /orgs/{org}/ | Get the details for the specific organization. +*OrgsApi* | [**orgs_saml_authentication_partial_update**](docs/OrgsApi.md#orgs_saml_authentication_partial_update) | **Patch** /orgs/{org}/saml-authentication | Update the SAML Authentication settings for this Organization. +*OrgsApi* | [**orgs_saml_authentication_read**](docs/OrgsApi.md#orgs_saml_authentication_read) | **Get** /orgs/{org}/saml-authentication | Retrieve the SAML Authentication settings for this Organization. +*OrgsApi* | [**orgs_saml_group_sync_create**](docs/OrgsApi.md#orgs_saml_group_sync_create) | **Post** /orgs/{org}/saml-group-sync/ | Create a new SAML Group Sync mapping within an organization. +*OrgsApi* | [**orgs_saml_group_sync_delete**](docs/OrgsApi.md#orgs_saml_group_sync_delete) | **Delete** /orgs/{org}/saml-group-sync/{slug_perm}/ | Delete a SAML Group Sync mapping from an organization. +*OrgsApi* | [**orgs_saml_group_sync_disable**](docs/OrgsApi.md#orgs_saml_group_sync_disable) | **Post** /orgs/{org}/saml-group-sync/disable/ | Disable SAML Group Sync for this organization. +*OrgsApi* | [**orgs_saml_group_sync_enable**](docs/OrgsApi.md#orgs_saml_group_sync_enable) | **Post** /orgs/{org}/saml-group-sync/enable/ | Enable SAML Group Sync for this organization. +*OrgsApi* | [**orgs_saml_group_sync_list**](docs/OrgsApi.md#orgs_saml_group_sync_list) | **Get** /orgs/{org}/saml-group-sync/ | Get the details of all SAML Group Sync mapping within an organization. +*OrgsApi* | [**orgs_saml_group_sync_status**](docs/OrgsApi.md#orgs_saml_group_sync_status) | **Get** /orgs/{org}/saml-group-sync/status/ | Retrieve the SAML Group Sync status for this organization. +*OrgsApi* | [**orgs_services_create**](docs/OrgsApi.md#orgs_services_create) | **Post** /orgs/{org}/services/ | Create a service within an organization. +*OrgsApi* | [**orgs_services_delete**](docs/OrgsApi.md#orgs_services_delete) | **Delete** /orgs/{org}/services/{service}/ | Delete a specific service +*OrgsApi* | [**orgs_services_list**](docs/OrgsApi.md#orgs_services_list) | **Get** /orgs/{org}/services/ | Get a list of all services within an organization. +*OrgsApi* | [**orgs_services_partial_update**](docs/OrgsApi.md#orgs_services_partial_update) | **Patch** /orgs/{org}/services/{service}/ | Update a service within an organization. +*OrgsApi* | [**orgs_services_read**](docs/OrgsApi.md#orgs_services_read) | **Get** /orgs/{org}/services/{service}/ | Retrieve details of a single service within an organization. +*OrgsApi* | [**orgs_services_refresh**](docs/OrgsApi.md#orgs_services_refresh) | **Post** /orgs/{org}/services/{service}/refresh/ | Refresh service API token. +*OrgsApi* | [**orgs_teams_create**](docs/OrgsApi.md#orgs_teams_create) | **Post** /orgs/{org}/teams/ | Create a team for this organization. +*OrgsApi* | [**orgs_teams_delete**](docs/OrgsApi.md#orgs_teams_delete) | **Delete** /orgs/{org}/teams/{team}/ | Delete a specific team in a organization. +*OrgsApi* | [**orgs_teams_list**](docs/OrgsApi.md#orgs_teams_list) | **Get** /orgs/{org}/teams/ | Get the details of all teams within an organization. +*OrgsApi* | [**orgs_teams_members_create**](docs/OrgsApi.md#orgs_teams_members_create) | **Post** /orgs/{org}/teams/{team}/members | Add users to a team. +*OrgsApi* | [**orgs_teams_members_list**](docs/OrgsApi.md#orgs_teams_members_list) | **Get** /orgs/{org}/teams/{team}/members | List all members for the team. +*OrgsApi* | [**orgs_teams_members_update**](docs/OrgsApi.md#orgs_teams_members_update) | **Put** /orgs/{org}/teams/{team}/members | Replace all team members. +*OrgsApi* | [**orgs_teams_partial_update**](docs/OrgsApi.md#orgs_teams_partial_update) | **Patch** /orgs/{org}/teams/{team}/ | Update a specific team in a organization. +*OrgsApi* | [**orgs_teams_read**](docs/OrgsApi.md#orgs_teams_read) | **Get** /orgs/{org}/teams/{team}/ | Get the details of a specific team within an organization. +*OrgsApi* | [**orgs_vulnerability_policy_create**](docs/OrgsApi.md#orgs_vulnerability_policy_create) | **Post** /orgs/{org}/vulnerability-policy/ | Create a package vulnerability policy. +*OrgsApi* | [**orgs_vulnerability_policy_delete**](docs/OrgsApi.md#orgs_vulnerability_policy_delete) | **Delete** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Delete a package vulnerability policy. +*OrgsApi* | [**orgs_vulnerability_policy_evaluation_create**](docs/OrgsApi.md#orgs_vulnerability_policy_evaluation_create) | **Post** /orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/ | Create an evaluation request for this policy. +*OrgsApi* | [**orgs_vulnerability_policy_evaluation_list**](docs/OrgsApi.md#orgs_vulnerability_policy_evaluation_list) | **Get** /orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/ | List evaluation requests for this policy. +*OrgsApi* | [**orgs_vulnerability_policy_evaluation_read**](docs/OrgsApi.md#orgs_vulnerability_policy_evaluation_read) | **Get** /orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/{slug_perm}/ | Retrieve an evaluation request for this policy. +*OrgsApi* | [**orgs_vulnerability_policy_list**](docs/OrgsApi.md#orgs_vulnerability_policy_list) | **Get** /orgs/{org}/vulnerability-policy/ | Get a list of all package vulnerability policies. +*OrgsApi* | [**orgs_vulnerability_policy_partial_update**](docs/OrgsApi.md#orgs_vulnerability_policy_partial_update) | **Patch** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Partially update a package vulnerability policy. +*OrgsApi* | [**orgs_vulnerability_policy_read**](docs/OrgsApi.md#orgs_vulnerability_policy_read) | **Get** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Get a package vulnerability policy. +*OrgsApi* | [**orgs_vulnerability_policy_update**](docs/OrgsApi.md#orgs_vulnerability_policy_update) | **Put** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Update a package vulnerability policy. +*OrgsApi* | [**orgs_vulnerability_policy_violation_list**](docs/OrgsApi.md#orgs_vulnerability_policy_violation_list) | **Get** /orgs/{org}/vulnerability-policy-violation/ | List all current vulnerability policy violations for this Organization. +*PackagesApi* | [**packages_copy**](docs/PackagesApi.md#packages_copy) | **Post** /packages/{owner}/{repo}/{identifier}/copy/ | Copy a package to another repository. +*PackagesApi* | [**packages_delete**](docs/PackagesApi.md#packages_delete) | **Delete** /packages/{owner}/{repo}/{identifier}/ | Delete a specific package in a repository. +*PackagesApi* | [**packages_dependencies**](docs/PackagesApi.md#packages_dependencies) | **Get** /packages/{owner}/{repo}/{identifier}/dependencies/ | Get the list of dependencies for a package. Transitive dependencies are included where supported. +*PackagesApi* | [**packages_list**](docs/PackagesApi.md#packages_list) | **Get** /packages/{owner}/{repo}/ | Get a list of all packages associated with repository. +*PackagesApi* | [**packages_move**](docs/PackagesApi.md#packages_move) | **Post** /packages/{owner}/{repo}/{identifier}/move/ | Move a package to another repository. +*PackagesApi* | [**packages_quarantine**](docs/PackagesApi.md#packages_quarantine) | **Post** /packages/{owner}/{repo}/{identifier}/quarantine/ | Quarantine or release a package. +*PackagesApi* | [**packages_read**](docs/PackagesApi.md#packages_read) | **Get** /packages/{owner}/{repo}/{identifier}/ | Get a specific package in a repository. +*PackagesApi* | [**packages_resync**](docs/PackagesApi.md#packages_resync) | **Post** /packages/{owner}/{repo}/{identifier}/resync/ | Schedule a package for resynchronisation. +*PackagesApi* | [**packages_scan**](docs/PackagesApi.md#packages_scan) | **Post** /packages/{owner}/{repo}/{identifier}/scan/ | Schedule a package for scanning. +*PackagesApi* | [**packages_status**](docs/PackagesApi.md#packages_status) | **Get** /packages/{owner}/{repo}/{identifier}/status/ | Get the synchronization status for a package. +*PackagesApi* | [**packages_tag**](docs/PackagesApi.md#packages_tag) | **Post** /packages/{owner}/{repo}/{identifier}/tag/ | Add/Replace/Remove tags for a package. +*PackagesApi* | [**packages_upload_alpine**](docs/PackagesApi.md#packages_upload_alpine) | **Post** /packages/{owner}/{repo}/upload/alpine/ | Create a new Alpine package +*PackagesApi* | [**packages_upload_cargo**](docs/PackagesApi.md#packages_upload_cargo) | **Post** /packages/{owner}/{repo}/upload/cargo/ | Create a new Cargo package +*PackagesApi* | [**packages_upload_cocoapods**](docs/PackagesApi.md#packages_upload_cocoapods) | **Post** /packages/{owner}/{repo}/upload/cocoapods/ | Create a new CocoaPods package +*PackagesApi* | [**packages_upload_composer**](docs/PackagesApi.md#packages_upload_composer) | **Post** /packages/{owner}/{repo}/upload/composer/ | Create a new Composer package +*PackagesApi* | [**packages_upload_conan**](docs/PackagesApi.md#packages_upload_conan) | **Post** /packages/{owner}/{repo}/upload/conan/ | Create a new Conan package +*PackagesApi* | [**packages_upload_conda**](docs/PackagesApi.md#packages_upload_conda) | **Post** /packages/{owner}/{repo}/upload/conda/ | Create a new Conda package +*PackagesApi* | [**packages_upload_cran**](docs/PackagesApi.md#packages_upload_cran) | **Post** /packages/{owner}/{repo}/upload/cran/ | Create a new CRAN package +*PackagesApi* | [**packages_upload_dart**](docs/PackagesApi.md#packages_upload_dart) | **Post** /packages/{owner}/{repo}/upload/dart/ | Create a new Dart package +*PackagesApi* | [**packages_upload_deb**](docs/PackagesApi.md#packages_upload_deb) | **Post** /packages/{owner}/{repo}/upload/deb/ | Create a new Debian package +*PackagesApi* | [**packages_upload_docker**](docs/PackagesApi.md#packages_upload_docker) | **Post** /packages/{owner}/{repo}/upload/docker/ | Create a new Docker package +*PackagesApi* | [**packages_upload_go**](docs/PackagesApi.md#packages_upload_go) | **Post** /packages/{owner}/{repo}/upload/go/ | Create a new Go package +*PackagesApi* | [**packages_upload_helm**](docs/PackagesApi.md#packages_upload_helm) | **Post** /packages/{owner}/{repo}/upload/helm/ | Create a new Helm package +*PackagesApi* | [**packages_upload_hex**](docs/PackagesApi.md#packages_upload_hex) | **Post** /packages/{owner}/{repo}/upload/hex/ | Create a new Hex package +*PackagesApi* | [**packages_upload_luarocks**](docs/PackagesApi.md#packages_upload_luarocks) | **Post** /packages/{owner}/{repo}/upload/luarocks/ | Create a new LuaRocks package +*PackagesApi* | [**packages_upload_maven**](docs/PackagesApi.md#packages_upload_maven) | **Post** /packages/{owner}/{repo}/upload/maven/ | Create a new Maven package +*PackagesApi* | [**packages_upload_npm**](docs/PackagesApi.md#packages_upload_npm) | **Post** /packages/{owner}/{repo}/upload/npm/ | Create a new npm package +*PackagesApi* | [**packages_upload_nuget**](docs/PackagesApi.md#packages_upload_nuget) | **Post** /packages/{owner}/{repo}/upload/nuget/ | Create a new NuGet package +*PackagesApi* | [**packages_upload_p2**](docs/PackagesApi.md#packages_upload_p2) | **Post** /packages/{owner}/{repo}/upload/p2/ | Create a new P2 package +*PackagesApi* | [**packages_upload_python**](docs/PackagesApi.md#packages_upload_python) | **Post** /packages/{owner}/{repo}/upload/python/ | Create a new Python package +*PackagesApi* | [**packages_upload_raw**](docs/PackagesApi.md#packages_upload_raw) | **Post** /packages/{owner}/{repo}/upload/raw/ | Create a new Raw package +*PackagesApi* | [**packages_upload_rpm**](docs/PackagesApi.md#packages_upload_rpm) | **Post** /packages/{owner}/{repo}/upload/rpm/ | Create a new RedHat package +*PackagesApi* | [**packages_upload_ruby**](docs/PackagesApi.md#packages_upload_ruby) | **Post** /packages/{owner}/{repo}/upload/ruby/ | Create a new Ruby package +*PackagesApi* | [**packages_upload_swift**](docs/PackagesApi.md#packages_upload_swift) | **Post** /packages/{owner}/{repo}/upload/swift/ | Create a new Swift package +*PackagesApi* | [**packages_upload_terraform**](docs/PackagesApi.md#packages_upload_terraform) | **Post** /packages/{owner}/{repo}/upload/terraform/ | Create a new Terraform package +*PackagesApi* | [**packages_upload_vagrant**](docs/PackagesApi.md#packages_upload_vagrant) | **Post** /packages/{owner}/{repo}/upload/vagrant/ | Create a new Vagrant package +*PackagesApi* | [**packages_validate_upload_alpine**](docs/PackagesApi.md#packages_validate_upload_alpine) | **Post** /packages/{owner}/{repo}/validate-upload/alpine/ | Validate parameters for create Alpine package +*PackagesApi* | [**packages_validate_upload_cargo**](docs/PackagesApi.md#packages_validate_upload_cargo) | **Post** /packages/{owner}/{repo}/validate-upload/cargo/ | Validate parameters for create Cargo package +*PackagesApi* | [**packages_validate_upload_cocoapods**](docs/PackagesApi.md#packages_validate_upload_cocoapods) | **Post** /packages/{owner}/{repo}/validate-upload/cocoapods/ | Validate parameters for create CocoaPods package +*PackagesApi* | [**packages_validate_upload_composer**](docs/PackagesApi.md#packages_validate_upload_composer) | **Post** /packages/{owner}/{repo}/validate-upload/composer/ | Validate parameters for create Composer package +*PackagesApi* | [**packages_validate_upload_conan**](docs/PackagesApi.md#packages_validate_upload_conan) | **Post** /packages/{owner}/{repo}/validate-upload/conan/ | Validate parameters for create Conan package +*PackagesApi* | [**packages_validate_upload_conda**](docs/PackagesApi.md#packages_validate_upload_conda) | **Post** /packages/{owner}/{repo}/validate-upload/conda/ | Validate parameters for create Conda package +*PackagesApi* | [**packages_validate_upload_cran**](docs/PackagesApi.md#packages_validate_upload_cran) | **Post** /packages/{owner}/{repo}/validate-upload/cran/ | Validate parameters for create CRAN package +*PackagesApi* | [**packages_validate_upload_dart**](docs/PackagesApi.md#packages_validate_upload_dart) | **Post** /packages/{owner}/{repo}/validate-upload/dart/ | Validate parameters for create Dart package +*PackagesApi* | [**packages_validate_upload_deb**](docs/PackagesApi.md#packages_validate_upload_deb) | **Post** /packages/{owner}/{repo}/validate-upload/deb/ | Validate parameters for create Debian package +*PackagesApi* | [**packages_validate_upload_docker**](docs/PackagesApi.md#packages_validate_upload_docker) | **Post** /packages/{owner}/{repo}/validate-upload/docker/ | Validate parameters for create Docker package +*PackagesApi* | [**packages_validate_upload_go**](docs/PackagesApi.md#packages_validate_upload_go) | **Post** /packages/{owner}/{repo}/validate-upload/go/ | Validate parameters for create Go package +*PackagesApi* | [**packages_validate_upload_helm**](docs/PackagesApi.md#packages_validate_upload_helm) | **Post** /packages/{owner}/{repo}/validate-upload/helm/ | Validate parameters for create Helm package +*PackagesApi* | [**packages_validate_upload_hex**](docs/PackagesApi.md#packages_validate_upload_hex) | **Post** /packages/{owner}/{repo}/validate-upload/hex/ | Validate parameters for create Hex package +*PackagesApi* | [**packages_validate_upload_luarocks**](docs/PackagesApi.md#packages_validate_upload_luarocks) | **Post** /packages/{owner}/{repo}/validate-upload/luarocks/ | Validate parameters for create LuaRocks package +*PackagesApi* | [**packages_validate_upload_maven**](docs/PackagesApi.md#packages_validate_upload_maven) | **Post** /packages/{owner}/{repo}/validate-upload/maven/ | Validate parameters for create Maven package +*PackagesApi* | [**packages_validate_upload_npm**](docs/PackagesApi.md#packages_validate_upload_npm) | **Post** /packages/{owner}/{repo}/validate-upload/npm/ | Validate parameters for create npm package +*PackagesApi* | [**packages_validate_upload_nuget**](docs/PackagesApi.md#packages_validate_upload_nuget) | **Post** /packages/{owner}/{repo}/validate-upload/nuget/ | Validate parameters for create NuGet package +*PackagesApi* | [**packages_validate_upload_p2**](docs/PackagesApi.md#packages_validate_upload_p2) | **Post** /packages/{owner}/{repo}/validate-upload/p2/ | Validate parameters for create P2 package +*PackagesApi* | [**packages_validate_upload_python**](docs/PackagesApi.md#packages_validate_upload_python) | **Post** /packages/{owner}/{repo}/validate-upload/python/ | Validate parameters for create Python package +*PackagesApi* | [**packages_validate_upload_raw**](docs/PackagesApi.md#packages_validate_upload_raw) | **Post** /packages/{owner}/{repo}/validate-upload/raw/ | Validate parameters for create Raw package +*PackagesApi* | [**packages_validate_upload_rpm**](docs/PackagesApi.md#packages_validate_upload_rpm) | **Post** /packages/{owner}/{repo}/validate-upload/rpm/ | Validate parameters for create RedHat package +*PackagesApi* | [**packages_validate_upload_ruby**](docs/PackagesApi.md#packages_validate_upload_ruby) | **Post** /packages/{owner}/{repo}/validate-upload/ruby/ | Validate parameters for create Ruby package +*PackagesApi* | [**packages_validate_upload_swift**](docs/PackagesApi.md#packages_validate_upload_swift) | **Post** /packages/{owner}/{repo}/validate-upload/swift/ | Validate parameters for create Swift package +*PackagesApi* | [**packages_validate_upload_terraform**](docs/PackagesApi.md#packages_validate_upload_terraform) | **Post** /packages/{owner}/{repo}/validate-upload/terraform/ | Validate parameters for create Terraform package +*PackagesApi* | [**packages_validate_upload_vagrant**](docs/PackagesApi.md#packages_validate_upload_vagrant) | **Post** /packages/{owner}/{repo}/validate-upload/vagrant/ | Validate parameters for create Vagrant package +*QuotaApi* | [**quota_history_read**](docs/QuotaApi.md#quota_history_read) | **Get** /quota/history/{owner}/ | Quota history for a given namespace. +*QuotaApi* | [**quota_oss_history_read**](docs/QuotaApi.md#quota_oss_history_read) | **Get** /quota/oss/history/{owner}/ | Open-source Quota history for a given namespace. +*QuotaApi* | [**quota_oss_read**](docs/QuotaApi.md#quota_oss_read) | **Get** /quota/oss/{owner}/ | Open-source Quota usage for a given namespace. +*QuotaApi* | [**quota_read**](docs/QuotaApi.md#quota_read) | **Get** /quota/{owner}/ | Quota usage for a given namespace. +*RatesApi* | [**rates_limits_list**](docs/RatesApi.md#rates_limits_list) | **Get** /rates/limits/ | Endpoint to check rate limits for current user. +*ReposApi* | [**api_repos_geoip_status**](docs/ReposApi.md#api_repos_geoip_status) | **Get** /repos/{owner}/{identifier}/geoip/status/ | Retrieve the GeoIP status for this repository. +*ReposApi* | [**repo_retention_partial_update**](docs/ReposApi.md#repo_retention_partial_update) | **Patch** /repos/{owner}/{repo}/retention/ | Update the retention rules for the repository. +*ReposApi* | [**repo_retention_read**](docs/ReposApi.md#repo_retention_read) | **Get** /repos/{owner}/{repo}/retention/ | Retrieve the retention rules for the repository. +*ReposApi* | [**repos_create**](docs/ReposApi.md#repos_create) | **Post** /repos/{owner}/ | Create a new repository in a given namespace. +*ReposApi* | [**repos_delete**](docs/ReposApi.md#repos_delete) | **Delete** /repos/{owner}/{identifier}/ | Delete a repository in a given namespace. +*ReposApi* | [**repos_ecdsa_create**](docs/ReposApi.md#repos_ecdsa_create) | **Post** /repos/{owner}/{identifier}/ecdsa/ | Set the active ECDSA key for the Repository. +*ReposApi* | [**repos_ecdsa_list**](docs/ReposApi.md#repos_ecdsa_list) | **Get** /repos/{owner}/{identifier}/ecdsa/ | Retrieve the active ECDSA key for the Repository. +*ReposApi* | [**repos_ecdsa_regenerate**](docs/ReposApi.md#repos_ecdsa_regenerate) | **Post** /repos/{owner}/{identifier}/ecdsa/regenerate/ | Regenerate ECDSA Key for the Repository. +*ReposApi* | [**repos_geoip_disable**](docs/ReposApi.md#repos_geoip_disable) | **Post** /repos/{owner}/{identifier}/geoip/disable/ | Disable GeoIP for this repository. +*ReposApi* | [**repos_geoip_enable**](docs/ReposApi.md#repos_geoip_enable) | **Post** /repos/{owner}/{identifier}/geoip/enable/ | Enable GeoIP for this repository. +*ReposApi* | [**repos_geoip_partial_update**](docs/ReposApi.md#repos_geoip_partial_update) | **Patch** /repos/{owner}/{identifier}/geoip | Partially update repository geoip rules. +*ReposApi* | [**repos_geoip_read**](docs/ReposApi.md#repos_geoip_read) | **Get** /repos/{owner}/{identifier}/geoip | List all repository geoip rules. +*ReposApi* | [**repos_geoip_test**](docs/ReposApi.md#repos_geoip_test) | **Post** /repos/{owner}/{identifier}/geoip/test/ | Test a list of IP addresses against the repository's current GeoIP rules. +*ReposApi* | [**repos_geoip_update**](docs/ReposApi.md#repos_geoip_update) | **Put** /repos/{owner}/{identifier}/geoip | Replace repository geoip rules. +*ReposApi* | [**repos_gpg_create**](docs/ReposApi.md#repos_gpg_create) | **Post** /repos/{owner}/{identifier}/gpg/ | Set the active GPG key for the Repository. +*ReposApi* | [**repos_gpg_list**](docs/ReposApi.md#repos_gpg_list) | **Get** /repos/{owner}/{identifier}/gpg/ | Retrieve the active GPG key for the Repository. +*ReposApi* | [**repos_gpg_regenerate**](docs/ReposApi.md#repos_gpg_regenerate) | **Post** /repos/{owner}/{identifier}/gpg/regenerate/ | Regenerate GPG Key for the Repository. +*ReposApi* | [**repos_namespace_list**](docs/ReposApi.md#repos_namespace_list) | **Get** /repos/{owner}/ | Get a list of all repositories within a namespace. +*ReposApi* | [**repos_partial_update**](docs/ReposApi.md#repos_partial_update) | **Patch** /repos/{owner}/{identifier}/ | Update details about a repository in a given namespace. +*ReposApi* | [**repos_privileges_list**](docs/ReposApi.md#repos_privileges_list) | **Get** /repos/{owner}/{identifier}/privileges | List all explicity created privileges for the repository. +*ReposApi* | [**repos_privileges_partial_update**](docs/ReposApi.md#repos_privileges_partial_update) | **Patch** /repos/{owner}/{identifier}/privileges | Modify privileges for the repository. +*ReposApi* | [**repos_privileges_update**](docs/ReposApi.md#repos_privileges_update) | **Put** /repos/{owner}/{identifier}/privileges | Replace all existing repository privileges with those specified. +*ReposApi* | [**repos_read**](docs/ReposApi.md#repos_read) | **Get** /repos/{owner}/{identifier}/ | Get a specific repository. +*ReposApi* | [**repos_rsa_create**](docs/ReposApi.md#repos_rsa_create) | **Post** /repos/{owner}/{identifier}/rsa/ | Set the active RSA key for the Repository. +*ReposApi* | [**repos_rsa_list**](docs/ReposApi.md#repos_rsa_list) | **Get** /repos/{owner}/{identifier}/rsa/ | Retrieve the active RSA key for the Repository. +*ReposApi* | [**repos_rsa_regenerate**](docs/ReposApi.md#repos_rsa_regenerate) | **Post** /repos/{owner}/{identifier}/rsa/regenerate/ | Regenerate RSA Key for the Repository. +*ReposApi* | [**repos_transfer_region**](docs/ReposApi.md#repos_transfer_region) | **Post** /repos/{owner}/{repo}/transfer-region/ | Transfer a repository to a different region. +*ReposApi* | [**repos_upstream_composer_create**](docs/ReposApi.md#repos_upstream_composer_create) | **Post** /repos/{owner}/{identifier}/upstream/composer/ | Create a Composer upstream config for this repository. +*ReposApi* | [**repos_upstream_composer_delete**](docs/ReposApi.md#repos_upstream_composer_delete) | **Delete** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Delete a Composer upstream config for this repository. +*ReposApi* | [**repos_upstream_composer_list**](docs/ReposApi.md#repos_upstream_composer_list) | **Get** /repos/{owner}/{identifier}/upstream/composer/ | List Composer upstream configs for this repository. +*ReposApi* | [**repos_upstream_composer_partial_update**](docs/ReposApi.md#repos_upstream_composer_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Partially update a Composer upstream config for this repository. +*ReposApi* | [**repos_upstream_composer_read**](docs/ReposApi.md#repos_upstream_composer_read) | **Get** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Retrieve a Composer upstream config for this repository. +*ReposApi* | [**repos_upstream_composer_update**](docs/ReposApi.md#repos_upstream_composer_update) | **Put** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Update a Composer upstream config for this repository. +*ReposApi* | [**repos_upstream_cran_create**](docs/ReposApi.md#repos_upstream_cran_create) | **Post** /repos/{owner}/{identifier}/upstream/cran/ | Create a CRAN upstream config for this repository. +*ReposApi* | [**repos_upstream_cran_delete**](docs/ReposApi.md#repos_upstream_cran_delete) | **Delete** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Delete a CRAN upstream config for this repository. +*ReposApi* | [**repos_upstream_cran_list**](docs/ReposApi.md#repos_upstream_cran_list) | **Get** /repos/{owner}/{identifier}/upstream/cran/ | List CRAN upstream configs for this repository. +*ReposApi* | [**repos_upstream_cran_partial_update**](docs/ReposApi.md#repos_upstream_cran_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Partially update a CRAN upstream config for this repository. +*ReposApi* | [**repos_upstream_cran_read**](docs/ReposApi.md#repos_upstream_cran_read) | **Get** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Retrieve a CRAN upstream config for this repository. +*ReposApi* | [**repos_upstream_cran_update**](docs/ReposApi.md#repos_upstream_cran_update) | **Put** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Update a CRAN upstream config for this repository. +*ReposApi* | [**repos_upstream_dart_create**](docs/ReposApi.md#repos_upstream_dart_create) | **Post** /repos/{owner}/{identifier}/upstream/dart/ | Create a Dart upstream config for this repository. +*ReposApi* | [**repos_upstream_dart_delete**](docs/ReposApi.md#repos_upstream_dart_delete) | **Delete** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Delete a Dart upstream config for this repository. +*ReposApi* | [**repos_upstream_dart_list**](docs/ReposApi.md#repos_upstream_dart_list) | **Get** /repos/{owner}/{identifier}/upstream/dart/ | List Dart upstream configs for this repository. +*ReposApi* | [**repos_upstream_dart_partial_update**](docs/ReposApi.md#repos_upstream_dart_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Partially update a Dart upstream config for this repository. +*ReposApi* | [**repos_upstream_dart_read**](docs/ReposApi.md#repos_upstream_dart_read) | **Get** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Retrieve a Dart upstream config for this repository. +*ReposApi* | [**repos_upstream_dart_update**](docs/ReposApi.md#repos_upstream_dart_update) | **Put** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Update a Dart upstream config for this repository. +*ReposApi* | [**repos_upstream_deb_create**](docs/ReposApi.md#repos_upstream_deb_create) | **Post** /repos/{owner}/{identifier}/upstream/deb/ | Create a Debian upstream config for this repository. +*ReposApi* | [**repos_upstream_deb_delete**](docs/ReposApi.md#repos_upstream_deb_delete) | **Delete** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Delete a Debian upstream config for this repository. +*ReposApi* | [**repos_upstream_deb_list**](docs/ReposApi.md#repos_upstream_deb_list) | **Get** /repos/{owner}/{identifier}/upstream/deb/ | List Debian upstream configs for this repository. +*ReposApi* | [**repos_upstream_deb_partial_update**](docs/ReposApi.md#repos_upstream_deb_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Partially update a Debian upstream config for this repository. +*ReposApi* | [**repos_upstream_deb_read**](docs/ReposApi.md#repos_upstream_deb_read) | **Get** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Retrieve a Debian upstream config for this repository. +*ReposApi* | [**repos_upstream_deb_update**](docs/ReposApi.md#repos_upstream_deb_update) | **Put** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Update a Debian upstream config for this repository. +*ReposApi* | [**repos_upstream_docker_create**](docs/ReposApi.md#repos_upstream_docker_create) | **Post** /repos/{owner}/{identifier}/upstream/docker/ | Create a Docker upstream config for this repository. +*ReposApi* | [**repos_upstream_docker_delete**](docs/ReposApi.md#repos_upstream_docker_delete) | **Delete** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Delete a Docker upstream config for this repository. +*ReposApi* | [**repos_upstream_docker_list**](docs/ReposApi.md#repos_upstream_docker_list) | **Get** /repos/{owner}/{identifier}/upstream/docker/ | List Docker upstream configs for this repository. +*ReposApi* | [**repos_upstream_docker_partial_update**](docs/ReposApi.md#repos_upstream_docker_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Partially update a Docker upstream config for this repository. +*ReposApi* | [**repos_upstream_docker_read**](docs/ReposApi.md#repos_upstream_docker_read) | **Get** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Retrieve a Docker upstream config for this repository. +*ReposApi* | [**repos_upstream_docker_update**](docs/ReposApi.md#repos_upstream_docker_update) | **Put** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Update a Docker upstream config for this repository. +*ReposApi* | [**repos_upstream_helm_create**](docs/ReposApi.md#repos_upstream_helm_create) | **Post** /repos/{owner}/{identifier}/upstream/helm/ | Create a Helm upstream config for this repository. +*ReposApi* | [**repos_upstream_helm_delete**](docs/ReposApi.md#repos_upstream_helm_delete) | **Delete** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Delete a Helm upstream config for this repository. +*ReposApi* | [**repos_upstream_helm_list**](docs/ReposApi.md#repos_upstream_helm_list) | **Get** /repos/{owner}/{identifier}/upstream/helm/ | List Helm upstream configs for this repository. +*ReposApi* | [**repos_upstream_helm_partial_update**](docs/ReposApi.md#repos_upstream_helm_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Partially update a Helm upstream config for this repository. +*ReposApi* | [**repos_upstream_helm_read**](docs/ReposApi.md#repos_upstream_helm_read) | **Get** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Retrieve a Helm upstream config for this repository. +*ReposApi* | [**repos_upstream_helm_update**](docs/ReposApi.md#repos_upstream_helm_update) | **Put** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Update a Helm upstream config for this repository. +*ReposApi* | [**repos_upstream_hex_create**](docs/ReposApi.md#repos_upstream_hex_create) | **Post** /repos/{owner}/{identifier}/upstream/hex/ | Create a Hex upstream config for this repository. +*ReposApi* | [**repos_upstream_hex_delete**](docs/ReposApi.md#repos_upstream_hex_delete) | **Delete** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Delete a Hex upstream config for this repository. +*ReposApi* | [**repos_upstream_hex_list**](docs/ReposApi.md#repos_upstream_hex_list) | **Get** /repos/{owner}/{identifier}/upstream/hex/ | List Hex upstream configs for this repository. +*ReposApi* | [**repos_upstream_hex_partial_update**](docs/ReposApi.md#repos_upstream_hex_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Partially update a Hex upstream config for this repository. +*ReposApi* | [**repos_upstream_hex_read**](docs/ReposApi.md#repos_upstream_hex_read) | **Get** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Retrieve a Hex upstream config for this repository. +*ReposApi* | [**repos_upstream_hex_update**](docs/ReposApi.md#repos_upstream_hex_update) | **Put** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Update a Hex upstream config for this repository. +*ReposApi* | [**repos_upstream_maven_create**](docs/ReposApi.md#repos_upstream_maven_create) | **Post** /repos/{owner}/{identifier}/upstream/maven/ | Create a Maven upstream config for this repository. +*ReposApi* | [**repos_upstream_maven_delete**](docs/ReposApi.md#repos_upstream_maven_delete) | **Delete** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Delete a Maven upstream config for this repository. +*ReposApi* | [**repos_upstream_maven_list**](docs/ReposApi.md#repos_upstream_maven_list) | **Get** /repos/{owner}/{identifier}/upstream/maven/ | List Maven upstream configs for this repository. +*ReposApi* | [**repos_upstream_maven_partial_update**](docs/ReposApi.md#repos_upstream_maven_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Partially update a Maven upstream config for this repository. +*ReposApi* | [**repos_upstream_maven_read**](docs/ReposApi.md#repos_upstream_maven_read) | **Get** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Retrieve a Maven upstream config for this repository. +*ReposApi* | [**repos_upstream_maven_update**](docs/ReposApi.md#repos_upstream_maven_update) | **Put** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Update a Maven upstream config for this repository. +*ReposApi* | [**repos_upstream_npm_create**](docs/ReposApi.md#repos_upstream_npm_create) | **Post** /repos/{owner}/{identifier}/upstream/npm/ | Create a npm upstream config for this repository. +*ReposApi* | [**repos_upstream_npm_delete**](docs/ReposApi.md#repos_upstream_npm_delete) | **Delete** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Delete a npm upstream config for this repository. +*ReposApi* | [**repos_upstream_npm_list**](docs/ReposApi.md#repos_upstream_npm_list) | **Get** /repos/{owner}/{identifier}/upstream/npm/ | List npm upstream configs for this repository. +*ReposApi* | [**repos_upstream_npm_partial_update**](docs/ReposApi.md#repos_upstream_npm_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Partially update a npm upstream config for this repository. +*ReposApi* | [**repos_upstream_npm_read**](docs/ReposApi.md#repos_upstream_npm_read) | **Get** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Retrieve a npm upstream config for this repository. +*ReposApi* | [**repos_upstream_npm_update**](docs/ReposApi.md#repos_upstream_npm_update) | **Put** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Update a npm upstream config for this repository. +*ReposApi* | [**repos_upstream_nuget_create**](docs/ReposApi.md#repos_upstream_nuget_create) | **Post** /repos/{owner}/{identifier}/upstream/nuget/ | Create a NuGet upstream config for this repository. +*ReposApi* | [**repos_upstream_nuget_delete**](docs/ReposApi.md#repos_upstream_nuget_delete) | **Delete** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Delete a NuGet upstream config for this repository. +*ReposApi* | [**repos_upstream_nuget_list**](docs/ReposApi.md#repos_upstream_nuget_list) | **Get** /repos/{owner}/{identifier}/upstream/nuget/ | List NuGet upstream configs for this repository. +*ReposApi* | [**repos_upstream_nuget_partial_update**](docs/ReposApi.md#repos_upstream_nuget_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Partially update a NuGet upstream config for this repository. +*ReposApi* | [**repos_upstream_nuget_read**](docs/ReposApi.md#repos_upstream_nuget_read) | **Get** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Retrieve a NuGet upstream config for this repository. +*ReposApi* | [**repos_upstream_nuget_update**](docs/ReposApi.md#repos_upstream_nuget_update) | **Put** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Update a NuGet upstream config for this repository. +*ReposApi* | [**repos_upstream_python_create**](docs/ReposApi.md#repos_upstream_python_create) | **Post** /repos/{owner}/{identifier}/upstream/python/ | Create a Python upstream config for this repository. +*ReposApi* | [**repos_upstream_python_delete**](docs/ReposApi.md#repos_upstream_python_delete) | **Delete** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Delete a Python upstream config for this repository. +*ReposApi* | [**repos_upstream_python_list**](docs/ReposApi.md#repos_upstream_python_list) | **Get** /repos/{owner}/{identifier}/upstream/python/ | List Python upstream configs for this repository. +*ReposApi* | [**repos_upstream_python_partial_update**](docs/ReposApi.md#repos_upstream_python_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Partially update a Python upstream config for this repository. +*ReposApi* | [**repos_upstream_python_read**](docs/ReposApi.md#repos_upstream_python_read) | **Get** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Retrieve a Python upstream config for this repository. +*ReposApi* | [**repos_upstream_python_update**](docs/ReposApi.md#repos_upstream_python_update) | **Put** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Update a Python upstream config for this repository. +*ReposApi* | [**repos_upstream_rpm_create**](docs/ReposApi.md#repos_upstream_rpm_create) | **Post** /repos/{owner}/{identifier}/upstream/rpm/ | Create a RedHat upstream config for this repository. +*ReposApi* | [**repos_upstream_rpm_delete**](docs/ReposApi.md#repos_upstream_rpm_delete) | **Delete** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Delete a RedHat upstream config for this repository. +*ReposApi* | [**repos_upstream_rpm_list**](docs/ReposApi.md#repos_upstream_rpm_list) | **Get** /repos/{owner}/{identifier}/upstream/rpm/ | List RedHat upstream configs for this repository. +*ReposApi* | [**repos_upstream_rpm_partial_update**](docs/ReposApi.md#repos_upstream_rpm_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Partially update a RedHat upstream config for this repository. +*ReposApi* | [**repos_upstream_rpm_read**](docs/ReposApi.md#repos_upstream_rpm_read) | **Get** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Retrieve a RedHat upstream config for this repository. +*ReposApi* | [**repos_upstream_rpm_update**](docs/ReposApi.md#repos_upstream_rpm_update) | **Put** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Update a RedHat upstream config for this repository. +*ReposApi* | [**repos_upstream_ruby_create**](docs/ReposApi.md#repos_upstream_ruby_create) | **Post** /repos/{owner}/{identifier}/upstream/ruby/ | Create a Ruby upstream config for this repository. +*ReposApi* | [**repos_upstream_ruby_delete**](docs/ReposApi.md#repos_upstream_ruby_delete) | **Delete** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Delete a Ruby upstream config for this repository. +*ReposApi* | [**repos_upstream_ruby_list**](docs/ReposApi.md#repos_upstream_ruby_list) | **Get** /repos/{owner}/{identifier}/upstream/ruby/ | List Ruby upstream configs for this repository. +*ReposApi* | [**repos_upstream_ruby_partial_update**](docs/ReposApi.md#repos_upstream_ruby_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Partially update a Ruby upstream config for this repository. +*ReposApi* | [**repos_upstream_ruby_read**](docs/ReposApi.md#repos_upstream_ruby_read) | **Get** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Retrieve a Ruby upstream config for this repository. +*ReposApi* | [**repos_upstream_ruby_update**](docs/ReposApi.md#repos_upstream_ruby_update) | **Put** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Update a Ruby upstream config for this repository. +*ReposApi* | [**repos_upstream_swift_create**](docs/ReposApi.md#repos_upstream_swift_create) | **Post** /repos/{owner}/{identifier}/upstream/swift/ | Create a Swift upstream config for this repository. +*ReposApi* | [**repos_upstream_swift_delete**](docs/ReposApi.md#repos_upstream_swift_delete) | **Delete** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Delete a Swift upstream config for this repository. +*ReposApi* | [**repos_upstream_swift_list**](docs/ReposApi.md#repos_upstream_swift_list) | **Get** /repos/{owner}/{identifier}/upstream/swift/ | List Swift upstream configs for this repository. +*ReposApi* | [**repos_upstream_swift_partial_update**](docs/ReposApi.md#repos_upstream_swift_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Partially update a Swift upstream config for this repository. +*ReposApi* | [**repos_upstream_swift_read**](docs/ReposApi.md#repos_upstream_swift_read) | **Get** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Retrieve a Swift upstream config for this repository. +*ReposApi* | [**repos_upstream_swift_update**](docs/ReposApi.md#repos_upstream_swift_update) | **Put** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Update a Swift upstream config for this repository. +*ReposApi* | [**repos_user_list**](docs/ReposApi.md#repos_user_list) | **Get** /repos/ | Get a list of all repositories associated with current user. +*ReposApi* | [**repos_x509_ecdsa_list**](docs/ReposApi.md#repos_x509_ecdsa_list) | **Get** /repos/{owner}/{identifier}/x509-ecdsa/ | Retrieve the active X.509 ECDSA certificate for the Repository. +*ReposApi* | [**repos_x509_rsa_list**](docs/ReposApi.md#repos_x509_rsa_list) | **Get** /repos/{owner}/{identifier}/x509-rsa/ | Retrieve the active X.509 RSA certificate for the Repository. +*StatusApi* | [**status_check_basic**](docs/StatusApi.md#status_check_basic) | **Get** /status/check/basic/ | Endpoint to check basic API connectivity. +*StorageRegionsApi* | [**storage_regions_list**](docs/StorageRegionsApi.md#storage_regions_list) | **Get** /storage-regions/ | Get a list of all available storage regions. +*StorageRegionsApi* | [**storage_regions_read**](docs/StorageRegionsApi.md#storage_regions_read) | **Get** /storage-regions/{slug}/ | Get a specific storage region. +*UserApi* | [**user_self**](docs/UserApi.md#user_self) | **Get** /user/self/ | Provide a brief for the current user (if any). +*UserApi* | [**user_token_create**](docs/UserApi.md#user_token_create) | **Post** /user/token/ | Retrieve/Create API key/token for the authenticated user. +*UsersApi* | [**users_profile_read**](docs/UsersApi.md#users_profile_read) | **Get** /users/profile/{slug}/ | Provide a brief for the specified user (if any). +*VulnerabilitiesApi* | [**vulnerabilities_namespace_list**](docs/VulnerabilitiesApi.md#vulnerabilities_namespace_list) | **Get** /vulnerabilities/{owner}/ | Lists scan results for a specific namespace. +*VulnerabilitiesApi* | [**vulnerabilities_package_list**](docs/VulnerabilitiesApi.md#vulnerabilities_package_list) | **Get** /vulnerabilities/{owner}/{repo}/{package}/ | Lists scan results for a specific package. +*VulnerabilitiesApi* | [**vulnerabilities_read**](docs/VulnerabilitiesApi.md#vulnerabilities_read) | **Get** /vulnerabilities/{owner}/{repo}/{package}/{identifier}/ | Get a scan result. +*VulnerabilitiesApi* | [**vulnerabilities_repo_list**](docs/VulnerabilitiesApi.md#vulnerabilities_repo_list) | **Get** /vulnerabilities/{owner}/{repo}/ | Lists scan results for a specific repository. +*WebhooksApi* | [**webhooks_create**](docs/WebhooksApi.md#webhooks_create) | **Post** /webhooks/{owner}/{repo}/ | Create a specific webhook in a repository. +*WebhooksApi* | [**webhooks_delete**](docs/WebhooksApi.md#webhooks_delete) | **Delete** /webhooks/{owner}/{repo}/{identifier}/ | Delete a specific webhook in a repository. +*WebhooksApi* | [**webhooks_list**](docs/WebhooksApi.md#webhooks_list) | **Get** /webhooks/{owner}/{repo}/ | Get a list of all webhooks in a repository. +*WebhooksApi* | [**webhooks_partial_update**](docs/WebhooksApi.md#webhooks_partial_update) | **Patch** /webhooks/{owner}/{repo}/{identifier}/ | Update a specific webhook in a repository. +*WebhooksApi* | [**webhooks_read**](docs/WebhooksApi.md#webhooks_read) | **Get** /webhooks/{owner}/{repo}/{identifier}/ | Views for working with repository webhooks. + + +## Documentation For Models + + - [AllocatedLimit](docs/AllocatedLimit.md) + - [AllocatedLimitRaw](docs/AllocatedLimitRaw.md) + - [AlpinePackageUpload](docs/AlpinePackageUpload.md) + - [AlpinePackageUploadRequest](docs/AlpinePackageUploadRequest.md) + - [Architecture](docs/Architecture.md) + - [CargoPackageUpload](docs/CargoPackageUpload.md) + - [CargoPackageUploadRequest](docs/CargoPackageUploadRequest.md) + - [CocoapodsPackageUpload](docs/CocoapodsPackageUpload.md) + - [CocoapodsPackageUploadRequest](docs/CocoapodsPackageUploadRequest.md) + - [CommonBandwidthMetrics](docs/CommonBandwidthMetrics.md) + - [CommonBandwidthMetricsValue](docs/CommonBandwidthMetricsValue.md) + - [CommonDownloadsMetrics](docs/CommonDownloadsMetrics.md) + - [CommonDownloadsMetricsValue](docs/CommonDownloadsMetricsValue.md) + - [CommonMetrics](docs/CommonMetrics.md) + - [ComposerPackageUpload](docs/ComposerPackageUpload.md) + - [ComposerPackageUploadRequest](docs/ComposerPackageUploadRequest.md) + - [ComposerUpstream](docs/ComposerUpstream.md) + - [ComposerUpstreamRequest](docs/ComposerUpstreamRequest.md) + - [ComposerUpstreamRequestPatch](docs/ComposerUpstreamRequestPatch.md) + - [ConanPackageUpload](docs/ConanPackageUpload.md) + - [ConanPackageUploadRequest](docs/ConanPackageUploadRequest.md) + - [CondaPackageUpload](docs/CondaPackageUpload.md) + - [CondaPackageUploadRequest](docs/CondaPackageUploadRequest.md) + - [CranPackageUpload](docs/CranPackageUpload.md) + - [CranPackageUploadRequest](docs/CranPackageUploadRequest.md) + - [CranUpstream](docs/CranUpstream.md) + - [CranUpstreamRequest](docs/CranUpstreamRequest.md) + - [CranUpstreamRequestPatch](docs/CranUpstreamRequestPatch.md) + - [DartPackageUpload](docs/DartPackageUpload.md) + - [DartPackageUploadRequest](docs/DartPackageUploadRequest.md) + - [DartUpstream](docs/DartUpstream.md) + - [DartUpstreamRequest](docs/DartUpstreamRequest.md) + - [DartUpstreamRequestPatch](docs/DartUpstreamRequestPatch.md) + - [DebPackageUpload](docs/DebPackageUpload.md) + - [DebPackageUploadRequest](docs/DebPackageUploadRequest.md) + - [DebUpstream](docs/DebUpstream.md) + - [DebUpstreamRequest](docs/DebUpstreamRequest.md) + - [DebUpstreamRequestPatch](docs/DebUpstreamRequestPatch.md) + - [Distribution](docs/Distribution.md) + - [DistributionFull](docs/DistributionFull.md) + - [DistributionVersion](docs/DistributionVersion.md) + - [DockerPackageUpload](docs/DockerPackageUpload.md) + - [DockerPackageUploadRequest](docs/DockerPackageUploadRequest.md) + - [DockerUpstream](docs/DockerUpstream.md) + - [DockerUpstreamRequest](docs/DockerUpstreamRequest.md) + - [DockerUpstreamRequestPatch](docs/DockerUpstreamRequestPatch.md) + - [EntitlementUsageMetrics](docs/EntitlementUsageMetrics.md) + - [ErrorDetail](docs/ErrorDetail.md) + - [Eula](docs/Eula.md) + - [Format](docs/Format.md) + - [FormatSupport](docs/FormatSupport.md) + - [FormatSupportUpstream](docs/FormatSupportUpstream.md) + - [GeoIpLocation](docs/GeoIpLocation.md) + - [GoPackageUpload](docs/GoPackageUpload.md) + - [GoPackageUploadRequest](docs/GoPackageUploadRequest.md) + - [HelmPackageUpload](docs/HelmPackageUpload.md) + - [HelmPackageUploadRequest](docs/HelmPackageUploadRequest.md) + - [HelmUpstream](docs/HelmUpstream.md) + - [HelmUpstreamRequest](docs/HelmUpstreamRequest.md) + - [HelmUpstreamRequestPatch](docs/HelmUpstreamRequestPatch.md) + - [HexPackageUpload](docs/HexPackageUpload.md) + - [HexPackageUploadRequest](docs/HexPackageUploadRequest.md) + - [HexUpstream](docs/HexUpstream.md) + - [HexUpstreamRequest](docs/HexUpstreamRequest.md) + - [HexUpstreamRequestPatch](docs/HexUpstreamRequestPatch.md) + - [History](docs/History.md) + - [HistoryFieldset](docs/HistoryFieldset.md) + - [HistoryFieldsetRaw](docs/HistoryFieldsetRaw.md) + - [LuarocksPackageUpload](docs/LuarocksPackageUpload.md) + - [LuarocksPackageUploadRequest](docs/LuarocksPackageUploadRequest.md) + - [MavenPackageUpload](docs/MavenPackageUpload.md) + - [MavenPackageUploadRequest](docs/MavenPackageUploadRequest.md) + - [MavenUpstream](docs/MavenUpstream.md) + - [MavenUpstreamRequest](docs/MavenUpstreamRequest.md) + - [MavenUpstreamRequestPatch](docs/MavenUpstreamRequestPatch.md) + - [Namespace](docs/Namespace.md) + - [NamespaceAuditLog](docs/NamespaceAuditLog.md) + - [NestedLicensePolicy](docs/NestedLicensePolicy.md) + - [NestedVulnerabilityPolicy](docs/NestedVulnerabilityPolicy.md) + - [NestedVulnerabilityScanResults](docs/NestedVulnerabilityScanResults.md) + - [NpmPackageUpload](docs/NpmPackageUpload.md) + - [NpmPackageUploadRequest](docs/NpmPackageUploadRequest.md) + - [NpmUpstream](docs/NpmUpstream.md) + - [NpmUpstreamRequest](docs/NpmUpstreamRequest.md) + - [NpmUpstreamRequestPatch](docs/NpmUpstreamRequestPatch.md) + - [NugetPackageUpload](docs/NugetPackageUpload.md) + - [NugetPackageUploadRequest](docs/NugetPackageUploadRequest.md) + - [NugetUpstream](docs/NugetUpstream.md) + - [NugetUpstreamRequest](docs/NugetUpstreamRequest.md) + - [NugetUpstreamRequestPatch](docs/NugetUpstreamRequestPatch.md) + - [Organization](docs/Organization.md) + - [OrganizationGroupSync](docs/OrganizationGroupSync.md) + - [OrganizationGroupSyncRequest](docs/OrganizationGroupSyncRequest.md) + - [OrganizationGroupSyncStatus](docs/OrganizationGroupSyncStatus.md) + - [OrganizationInvite](docs/OrganizationInvite.md) + - [OrganizationInviteExtend](docs/OrganizationInviteExtend.md) + - [OrganizationInviteRequest](docs/OrganizationInviteRequest.md) + - [OrganizationInviteUpdate](docs/OrganizationInviteUpdate.md) + - [OrganizationInviteUpdateRequestPatch](docs/OrganizationInviteUpdateRequestPatch.md) + - [OrganizationMembership](docs/OrganizationMembership.md) + - [OrganizationMembershipRequestPatch](docs/OrganizationMembershipRequestPatch.md) + - [OrganizationMembershipRoleUpdate](docs/OrganizationMembershipRoleUpdate.md) + - [OrganizationMembershipRoleUpdateRequestPatch](docs/OrganizationMembershipRoleUpdateRequestPatch.md) + - [OrganizationMembershipVisibilityUpdate](docs/OrganizationMembershipVisibilityUpdate.md) + - [OrganizationMembershipVisibilityUpdateRequestPatch](docs/OrganizationMembershipVisibilityUpdateRequestPatch.md) + - [OrganizationPackageLicensePolicy](docs/OrganizationPackageLicensePolicy.md) + - [OrganizationPackageLicensePolicyRequest](docs/OrganizationPackageLicensePolicyRequest.md) + - [OrganizationPackageLicensePolicyRequestPatch](docs/OrganizationPackageLicensePolicyRequestPatch.md) + - [OrganizationPackageVulnerabilityPolicy](docs/OrganizationPackageVulnerabilityPolicy.md) + - [OrganizationPackageVulnerabilityPolicyRequest](docs/OrganizationPackageVulnerabilityPolicyRequest.md) + - [OrganizationPackageVulnerabilityPolicyRequestPatch](docs/OrganizationPackageVulnerabilityPolicyRequestPatch.md) + - [OrganizationSamlAuth](docs/OrganizationSamlAuth.md) + - [OrganizationSamlAuthRequestPatch](docs/OrganizationSamlAuthRequestPatch.md) + - [OrganizationTeam](docs/OrganizationTeam.md) + - [OrganizationTeamInvite](docs/OrganizationTeamInvite.md) + - [OrganizationTeamMembers](docs/OrganizationTeamMembers.md) + - [OrganizationTeamMembership](docs/OrganizationTeamMembership.md) + - [OrganizationTeamRequest](docs/OrganizationTeamRequest.md) + - [OrganizationTeamRequestPatch](docs/OrganizationTeamRequestPatch.md) + - [P2PackageUpload](docs/P2PackageUpload.md) + - [P2PackageUploadRequest](docs/P2PackageUploadRequest.md) + - [Package](docs/Package.md) + - [PackageCopy](docs/PackageCopy.md) + - [PackageCopyRequest](docs/PackageCopyRequest.md) + - [PackageDenyPolicy](docs/PackageDenyPolicy.md) + - [PackageDenyPolicyRequest](docs/PackageDenyPolicyRequest.md) + - [PackageDenyPolicyRequestPatch](docs/PackageDenyPolicyRequestPatch.md) + - [PackageDependencies](docs/PackageDependencies.md) + - [PackageDependency](docs/PackageDependency.md) + - [PackageFile](docs/PackageFile.md) + - [PackageFilePartsUpload](docs/PackageFilePartsUpload.md) + - [PackageFileUpload](docs/PackageFileUpload.md) + - [PackageFileUploadRequest](docs/PackageFileUploadRequest.md) + - [PackageLicensePolicyEvaluationRequest](docs/PackageLicensePolicyEvaluationRequest.md) + - [PackageLicensePolicyEvaluationRequestRequest](docs/PackageLicensePolicyEvaluationRequestRequest.md) + - [PackageLicensePolicyViolationLog](docs/PackageLicensePolicyViolationLog.md) + - [PackageLicensePolicyViolationLogCursorPage](docs/PackageLicensePolicyViolationLogCursorPage.md) + - [PackageMove](docs/PackageMove.md) + - [PackageMoveRequest](docs/PackageMoveRequest.md) + - [PackageQuarantine](docs/PackageQuarantine.md) + - [PackageQuarantineRequest](docs/PackageQuarantineRequest.md) + - [PackageResync](docs/PackageResync.md) + - [PackageStatus](docs/PackageStatus.md) + - [PackageTag](docs/PackageTag.md) + - [PackageTagRequest](docs/PackageTagRequest.md) + - [PackageUsageMetrics](docs/PackageUsageMetrics.md) + - [PackageVersionBadge](docs/PackageVersionBadge.md) + - [PackageVulnerability](docs/PackageVulnerability.md) + - [PackageVulnerabilityPolicyEvaluationRequest](docs/PackageVulnerabilityPolicyEvaluationRequest.md) + - [PackageVulnerabilityPolicyEvaluationRequestRequest](docs/PackageVulnerabilityPolicyEvaluationRequestRequest.md) + - [PackageVulnerabilityPolicyViolationLog](docs/PackageVulnerabilityPolicyViolationLog.md) + - [PackageVulnerabilityPolicyViolationLogCursorPage](docs/PackageVulnerabilityPolicyViolationLogCursorPage.md) + - [ProviderSettings](docs/ProviderSettings.md) + - [ProviderSettingsRequest](docs/ProviderSettingsRequest.md) + - [ProviderSettingsRequestPatch](docs/ProviderSettingsRequestPatch.md) + - [PythonPackageUpload](docs/PythonPackageUpload.md) + - [PythonPackageUploadRequest](docs/PythonPackageUploadRequest.md) + - [PythonUpstream](docs/PythonUpstream.md) + - [PythonUpstreamRequest](docs/PythonUpstreamRequest.md) + - [PythonUpstreamRequestPatch](docs/PythonUpstreamRequestPatch.md) + - [Quota](docs/Quota.md) + - [QuotaHistory](docs/QuotaHistory.md) + - [RateCheck](docs/RateCheck.md) + - [RawPackageUpload](docs/RawPackageUpload.md) + - [RawPackageUploadRequest](docs/RawPackageUploadRequest.md) + - [Repository](docs/Repository.md) + - [RepositoryAuditLog](docs/RepositoryAuditLog.md) + - [RepositoryCreate](docs/RepositoryCreate.md) + - [RepositoryCreateRequest](docs/RepositoryCreateRequest.md) + - [RepositoryEcdsaKey](docs/RepositoryEcdsaKey.md) + - [RepositoryEcdsaKeyCreate](docs/RepositoryEcdsaKeyCreate.md) + - [RepositoryGeoIpCidr](docs/RepositoryGeoIpCidr.md) + - [RepositoryGeoIpCountryCode](docs/RepositoryGeoIpCountryCode.md) + - [RepositoryGeoIpRules](docs/RepositoryGeoIpRules.md) + - [RepositoryGeoIpRulesRequest](docs/RepositoryGeoIpRulesRequest.md) + - [RepositoryGeoIpRulesRequestPatch](docs/RepositoryGeoIpRulesRequestPatch.md) + - [RepositoryGeoIpStatus](docs/RepositoryGeoIpStatus.md) + - [RepositoryGeoIpTestAddress](docs/RepositoryGeoIpTestAddress.md) + - [RepositoryGeoIpTestAddressResponse](docs/RepositoryGeoIpTestAddressResponse.md) + - [RepositoryGeoIpTestAddressResponseDict](docs/RepositoryGeoIpTestAddressResponseDict.md) + - [RepositoryGpgKey](docs/RepositoryGpgKey.md) + - [RepositoryGpgKeyCreate](docs/RepositoryGpgKeyCreate.md) + - [RepositoryPrivilegeDict](docs/RepositoryPrivilegeDict.md) + - [RepositoryPrivilegeInput](docs/RepositoryPrivilegeInput.md) + - [RepositoryPrivilegeInputRequest](docs/RepositoryPrivilegeInputRequest.md) + - [RepositoryPrivilegeInputRequestPatch](docs/RepositoryPrivilegeInputRequestPatch.md) + - [RepositoryRequestPatch](docs/RepositoryRequestPatch.md) + - [RepositoryRetentionRules](docs/RepositoryRetentionRules.md) + - [RepositoryRetentionRulesRequestPatch](docs/RepositoryRetentionRulesRequestPatch.md) + - [RepositoryRsaKey](docs/RepositoryRsaKey.md) + - [RepositoryRsaKeyCreate](docs/RepositoryRsaKeyCreate.md) + - [RepositoryToken](docs/RepositoryToken.md) + - [RepositoryTokenAction](docs/RepositoryTokenAction.md) + - [RepositoryTokenRefresh](docs/RepositoryTokenRefresh.md) + - [RepositoryTokenRefreshRequest](docs/RepositoryTokenRefreshRequest.md) + - [RepositoryTokenRequest](docs/RepositoryTokenRequest.md) + - [RepositoryTokenRequestPatch](docs/RepositoryTokenRequestPatch.md) + - [RepositoryTokenSync](docs/RepositoryTokenSync.md) + - [RepositoryTokenSyncRequest](docs/RepositoryTokenSyncRequest.md) + - [RepositoryTransferRegion](docs/RepositoryTransferRegion.md) + - [RepositoryTransferRegionRequest](docs/RepositoryTransferRegionRequest.md) + - [RepositoryWebhook](docs/RepositoryWebhook.md) + - [RepositoryWebhookRequest](docs/RepositoryWebhookRequest.md) + - [RepositoryWebhookRequestPatch](docs/RepositoryWebhookRequestPatch.md) + - [RepositoryX509EcdsaCertificate](docs/RepositoryX509EcdsaCertificate.md) + - [RepositoryX509RsaCertificate](docs/RepositoryX509RsaCertificate.md) + - [ResourcesRateCheck](docs/ResourcesRateCheck.md) + - [RespositoryGeoIpEnableDisable](docs/RespositoryGeoIpEnableDisable.md) + - [RespositoryGeoIpEnableDisableRequest](docs/RespositoryGeoIpEnableDisableRequest.md) + - [RpmPackageUpload](docs/RpmPackageUpload.md) + - [RpmPackageUploadRequest](docs/RpmPackageUploadRequest.md) + - [RpmUpstream](docs/RpmUpstream.md) + - [RpmUpstreamRequest](docs/RpmUpstreamRequest.md) + - [RpmUpstreamRequestPatch](docs/RpmUpstreamRequestPatch.md) + - [RubyPackageUpload](docs/RubyPackageUpload.md) + - [RubyPackageUploadRequest](docs/RubyPackageUploadRequest.md) + - [RubyUpstream](docs/RubyUpstream.md) + - [RubyUpstreamRequest](docs/RubyUpstreamRequest.md) + - [RubyUpstreamRequestPatch](docs/RubyUpstreamRequestPatch.md) + - [Service](docs/Service.md) + - [ServiceRequest](docs/ServiceRequest.md) + - [ServiceRequestPatch](docs/ServiceRequestPatch.md) + - [ServiceTeams](docs/ServiceTeams.md) + - [StatusBasic](docs/StatusBasic.md) + - [StorageAllocatedLimit](docs/StorageAllocatedLimit.md) + - [StorageAllocatedLimitRaw](docs/StorageAllocatedLimitRaw.md) + - [StorageRegion](docs/StorageRegion.md) + - [StorageUsage](docs/StorageUsage.md) + - [StorageUsageRaw](docs/StorageUsageRaw.md) + - [SwiftPackageUpload](docs/SwiftPackageUpload.md) + - [SwiftPackageUploadRequest](docs/SwiftPackageUploadRequest.md) + - [SwiftUpstream](docs/SwiftUpstream.md) + - [SwiftUpstreamRequest](docs/SwiftUpstreamRequest.md) + - [SwiftUpstreamRequestPatch](docs/SwiftUpstreamRequestPatch.md) + - [Tags](docs/Tags.md) + - [TerraformPackageUpload](docs/TerraformPackageUpload.md) + - [TerraformPackageUploadRequest](docs/TerraformPackageUploadRequest.md) + - [Usage](docs/Usage.md) + - [UsageFieldset](docs/UsageFieldset.md) + - [UsageLimits](docs/UsageLimits.md) + - [UsageLimitsRaw](docs/UsageLimitsRaw.md) + - [UsageRaw](docs/UsageRaw.md) + - [UserAuthToken](docs/UserAuthToken.md) + - [UserAuthTokenRequest](docs/UserAuthTokenRequest.md) + - [UserBrief](docs/UserBrief.md) + - [UserProfile](docs/UserProfile.md) + - [VagrantPackageUpload](docs/VagrantPackageUpload.md) + - [VagrantPackageUploadRequest](docs/VagrantPackageUploadRequest.md) + - [Vulnerability](docs/Vulnerability.md) + - [VulnerabilityScan](docs/VulnerabilityScan.md) + - [VulnerabilityScanResults](docs/VulnerabilityScanResults.md) + - [VulnerabilityScanResultsList](docs/VulnerabilityScanResultsList.md) + - [VulnerabilityScanVersion](docs/VulnerabilityScanVersion.md) + - [WebhookTemplate](docs/WebhookTemplate.md) + + +## Documentation For Authorization + +## apikey +- **Type**: API key + +Example +``` + auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{ + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. + }) + r, err := client.Service.Operation(auth, args) +``` +## basic +- **Type**: HTTP basic authentication + +Example +``` + auth := context.WithValue(context.TODO(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", + }) + r, err := client.Service.Operation(auth, args) +``` + +## Author + +support@cloudsmith.io + diff --git a/bindings/rust/src/build.json b/bindings/rust/src/build.json new file mode 100644 index 00000000..2093b724 --- /dev/null +++ b/bindings/rust/src/build.json @@ -0,0 +1,4 @@ +{ + "packageName": "cloudsmith_api", + "packageVersion": "2.0.16" +} diff --git a/bindings/rust/src/docs/AllocatedLimit.md b/bindings/rust/src/docs/AllocatedLimit.md new file mode 100644 index 00000000..7ecfd156 --- /dev/null +++ b/bindings/rust/src/docs/AllocatedLimit.md @@ -0,0 +1,13 @@ +# AllocatedLimit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configured** | **String** | | [optional] [default to null] +**percentage_used** | **String** | | [optional] [default to null] +**plan_limit** | **String** | | [optional] [default to null] +**used** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/AllocatedLimitRaw.md b/bindings/rust/src/docs/AllocatedLimitRaw.md new file mode 100644 index 00000000..d52a0741 --- /dev/null +++ b/bindings/rust/src/docs/AllocatedLimitRaw.md @@ -0,0 +1,13 @@ +# AllocatedLimitRaw + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configured** | **i32** | | [optional] [default to null] +**percentage_used** | **String** | | [optional] [default to null] +**plan_limit** | **i32** | | [optional] [default to null] +**used** | **i32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/AlpinePackageUpload.md b/bindings/rust/src/docs/AlpinePackageUpload.md new file mode 100644 index 00000000..2b12f0d5 --- /dev/null +++ b/bindings/rust/src/docs/AlpinePackageUpload.md @@ -0,0 +1,89 @@ +# AlpinePackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/AlpinePackageUploadRequest.md b/bindings/rust/src/docs/AlpinePackageUploadRequest.md new file mode 100644 index 00000000..c05f41d3 --- /dev/null +++ b/bindings/rust/src/docs/AlpinePackageUploadRequest.md @@ -0,0 +1,13 @@ +# AlpinePackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**distribution** | **String** | The distribution to store the package for. | [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Architecture.md b/bindings/rust/src/docs/Architecture.md new file mode 100644 index 00000000..c340c537 --- /dev/null +++ b/bindings/rust/src/docs/Architecture.md @@ -0,0 +1,11 @@ +# Architecture + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/AuditLogApi.md b/bindings/rust/src/docs/AuditLogApi.md new file mode 100644 index 00000000..9b05f2d2 --- /dev/null +++ b/bindings/rust/src/docs/AuditLogApi.md @@ -0,0 +1,92 @@ +# \AuditLogApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**audit_log_namespace_list**](AuditLogApi.md#audit_log_namespace_list) | **Get** /audit-log/{owner}/ | Lists audit log entries for a specific namespace. +[**audit_log_repo_list**](AuditLogApi.md#audit_log_repo_list) | **Get** /audit-log/{owner}/{repo}/ | Lists audit log entries for a specific repository. + + +# **audit_log_namespace_list** +> Vec<::models::NamespaceAuditLog> audit_log_namespace_list(ctx, ctx, owner, optional) +Lists audit log entries for a specific namespace. + +Lists audit log entries for a specific namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **query** | **String**| A search term for querying events, actors, or timestamps of log records. | + +### Return type + +[**Vec<::models::NamespaceAuditLog>**](NamespaceAuditLog.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **audit_log_repo_list** +> Vec<::models::RepositoryAuditLog> audit_log_repo_list(ctx, ctx, owner, repo, optional) +Lists audit log entries for a specific repository. + +Lists audit log entries for a specific repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **query** | **String**| A search term for querying events, actors, or timestamps of log records. | + +### Return type + +[**Vec<::models::RepositoryAuditLog>**](RepositoryAuditLog.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/BadgesApi.md b/bindings/rust/src/docs/BadgesApi.md new file mode 100644 index 00000000..ad6f346f --- /dev/null +++ b/bindings/rust/src/docs/BadgesApi.md @@ -0,0 +1,67 @@ +# \BadgesApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**badges_version_list**](BadgesApi.md#badges_version_list) | **Get** /badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/ | Get latest package version for a package or package group. + + +# **badges_version_list** +> ::models::PackageVersionBadge badges_version_list(ctx, ctx, owner, repo, package_format, package_name, package_version, package_identifiers, optional) +Get latest package version for a package or package group. + +Get latest package version for a package or package group. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **package_format** | **String**| | + **package_name** | **String**| | + **package_version** | **String**| | + **package_identifiers** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **package_format** | **String**| | + **package_name** | **String**| | + **package_version** | **String**| | + **package_identifiers** | **String**| | + **badge_token** | **String**| Badge token to authenticate for private packages | [default to ] + **cache_seconds** | **String**| Override the shields.io badge cacheSeconds value. | [default to 300] + **color** | **String**| Override the shields.io badge color value. | [default to 12577E] + **label** | **String**| Override the shields.io badge label value. | [default to cloudsmith] + **label_color** | **String**| Override the shields.io badge labelColor value. | [default to 021F2F] + **logo_color** | **String**| Override the shields.io badge logoColor value. | [default to 45B6EE] + **logo_width** | **String**| Override the shields.io badge logoWidth value. | [default to 10] + **render** | **bool**| If true, badge will be rendered | [default to false] + **shields** | **bool**| If true, a shields response will be generated | [default to false] + **show_latest** | **bool**| If true, for latest version badges a '(latest)' suffix is added | [default to false] + **style** | **String**| Override the shields.io badge style value. | [default to flat-square] + +### Return type + +[**::models::PackageVersionBadge**](PackageVersionBadge.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/CargoPackageUpload.md b/bindings/rust/src/docs/CargoPackageUpload.md new file mode 100644 index 00000000..c2077728 --- /dev/null +++ b/bindings/rust/src/docs/CargoPackageUpload.md @@ -0,0 +1,89 @@ +# CargoPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CargoPackageUploadRequest.md b/bindings/rust/src/docs/CargoPackageUploadRequest.md new file mode 100644 index 00000000..f589f8d6 --- /dev/null +++ b/bindings/rust/src/docs/CargoPackageUploadRequest.md @@ -0,0 +1,12 @@ +# CargoPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CocoapodsPackageUpload.md b/bindings/rust/src/docs/CocoapodsPackageUpload.md new file mode 100644 index 00000000..adfc5993 --- /dev/null +++ b/bindings/rust/src/docs/CocoapodsPackageUpload.md @@ -0,0 +1,89 @@ +# CocoapodsPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CocoapodsPackageUploadRequest.md b/bindings/rust/src/docs/CocoapodsPackageUploadRequest.md new file mode 100644 index 00000000..6f4b3d91 --- /dev/null +++ b/bindings/rust/src/docs/CocoapodsPackageUploadRequest.md @@ -0,0 +1,12 @@ +# CocoapodsPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CommonBandwidthMetrics.md b/bindings/rust/src/docs/CommonBandwidthMetrics.md new file mode 100644 index 00000000..e69387a7 --- /dev/null +++ b/bindings/rust/src/docs/CommonBandwidthMetrics.md @@ -0,0 +1,13 @@ +# CommonBandwidthMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**average** | [***::models::CommonBandwidthMetricsValue**](CommonBandwidthMetricsValue.md) | | [default to null] +**highest** | [***::models::CommonBandwidthMetricsValue**](CommonBandwidthMetricsValue.md) | | [default to null] +**lowest** | [***::models::CommonBandwidthMetricsValue**](CommonBandwidthMetricsValue.md) | | [default to null] +**total** | [***::models::CommonBandwidthMetricsValue**](CommonBandwidthMetricsValue.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CommonBandwidthMetricsValue.md b/bindings/rust/src/docs/CommonBandwidthMetricsValue.md new file mode 100644 index 00000000..10de7f71 --- /dev/null +++ b/bindings/rust/src/docs/CommonBandwidthMetricsValue.md @@ -0,0 +1,12 @@ +# CommonBandwidthMetricsValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display** | **String** | Bandwidth usage value | [default to null] +**units** | **String** | Unit of measurement e.g. bytes | [optional] [default to null] +**value** | **i32** | Human readable version of display value | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CommonDownloadsMetrics.md b/bindings/rust/src/docs/CommonDownloadsMetrics.md new file mode 100644 index 00000000..c7f4dd28 --- /dev/null +++ b/bindings/rust/src/docs/CommonDownloadsMetrics.md @@ -0,0 +1,13 @@ +# CommonDownloadsMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**average** | [***::models::CommonDownloadsMetricsValue**](CommonDownloadsMetricsValue.md) | | [default to null] +**highest** | [***::models::CommonDownloadsMetricsValue**](CommonDownloadsMetricsValue.md) | | [default to null] +**lowest** | [***::models::CommonDownloadsMetricsValue**](CommonDownloadsMetricsValue.md) | | [default to null] +**total** | [***::models::CommonDownloadsMetricsValue**](CommonDownloadsMetricsValue.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CommonDownloadsMetricsValue.md b/bindings/rust/src/docs/CommonDownloadsMetricsValue.md new file mode 100644 index 00000000..dde6af13 --- /dev/null +++ b/bindings/rust/src/docs/CommonDownloadsMetricsValue.md @@ -0,0 +1,10 @@ +# CommonDownloadsMetricsValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **i32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CommonMetrics.md b/bindings/rust/src/docs/CommonMetrics.md new file mode 100644 index 00000000..150aa63b --- /dev/null +++ b/bindings/rust/src/docs/CommonMetrics.md @@ -0,0 +1,14 @@ +# CommonMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **i32** | Number of packages with at least 1 download | [optional] [default to null] +**bandwidth** | [***::models::CommonBandwidthMetrics**](CommonBandwidthMetrics.md) | | [default to null] +**downloads** | [***::models::CommonDownloadsMetrics**](CommonDownloadsMetrics.md) | | [default to null] +**inactive** | **i32** | Packages with zero downloads | [optional] [default to null] +**total** | **i32** | Total number of packages in repo | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ComposerPackageUpload.md b/bindings/rust/src/docs/ComposerPackageUpload.md new file mode 100644 index 00000000..a0a40748 --- /dev/null +++ b/bindings/rust/src/docs/ComposerPackageUpload.md @@ -0,0 +1,89 @@ +# ComposerPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ComposerPackageUploadRequest.md b/bindings/rust/src/docs/ComposerPackageUploadRequest.md new file mode 100644 index 00000000..b8b1f451 --- /dev/null +++ b/bindings/rust/src/docs/ComposerPackageUploadRequest.md @@ -0,0 +1,13 @@ +# ComposerPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ComposerUpstream.md b/bindings/rust/src/docs/ComposerUpstream.md new file mode 100644 index 00000000..ed333953 --- /dev/null +++ b/bindings/rust/src/docs/ComposerUpstream.md @@ -0,0 +1,27 @@ +# ComposerUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ComposerUpstreamRequest.md b/bindings/rust/src/docs/ComposerUpstreamRequest.md new file mode 100644 index 00000000..985f4571 --- /dev/null +++ b/bindings/rust/src/docs/ComposerUpstreamRequest.md @@ -0,0 +1,22 @@ +# ComposerUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ComposerUpstreamRequestPatch.md b/bindings/rust/src/docs/ComposerUpstreamRequestPatch.md new file mode 100644 index 00000000..336bd0a8 --- /dev/null +++ b/bindings/rust/src/docs/ComposerUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# ComposerUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ConanPackageUpload.md b/bindings/rust/src/docs/ConanPackageUpload.md new file mode 100644 index 00000000..a135606f --- /dev/null +++ b/bindings/rust/src/docs/ConanPackageUpload.md @@ -0,0 +1,91 @@ +# ConanPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**conan_channel** | **String** | Conan channel. | [optional] [default to null] +**conan_prefix** | **String** | Conan prefix (User). | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ConanPackageUploadRequest.md b/bindings/rust/src/docs/ConanPackageUploadRequest.md new file mode 100644 index 00000000..0f5a8abe --- /dev/null +++ b/bindings/rust/src/docs/ConanPackageUploadRequest.md @@ -0,0 +1,19 @@ +# ConanPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conan_channel** | **String** | Conan channel. | [optional] [default to null] +**conan_prefix** | **String** | Conan prefix (User). | [optional] [default to null] +**info_file** | **String** | The info file is an python file containing the package metadata. | [default to null] +**manifest_file** | **String** | The info file is an python file containing the package metadata. | [default to null] +**metadata_file** | **String** | The conan file is an python file containing the package metadata. | [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CondaPackageUpload.md b/bindings/rust/src/docs/CondaPackageUpload.md new file mode 100644 index 00000000..f1db30e3 --- /dev/null +++ b/bindings/rust/src/docs/CondaPackageUpload.md @@ -0,0 +1,89 @@ +# CondaPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CondaPackageUploadRequest.md b/bindings/rust/src/docs/CondaPackageUploadRequest.md new file mode 100644 index 00000000..e066afb7 --- /dev/null +++ b/bindings/rust/src/docs/CondaPackageUploadRequest.md @@ -0,0 +1,12 @@ +# CondaPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CranPackageUpload.md b/bindings/rust/src/docs/CranPackageUpload.md new file mode 100644 index 00000000..5259f499 --- /dev/null +++ b/bindings/rust/src/docs/CranPackageUpload.md @@ -0,0 +1,90 @@ +# CranPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**r_version** | **String** | Binary package uploads should specify the version of R they were built for. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CranPackageUploadRequest.md b/bindings/rust/src/docs/CranPackageUploadRequest.md new file mode 100644 index 00000000..7ebe21fc --- /dev/null +++ b/bindings/rust/src/docs/CranPackageUploadRequest.md @@ -0,0 +1,14 @@ +# CranPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architecture** | **String** | Binary package uploads for macOS should specify the architecture they were built for. | [optional] [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**r_version** | **String** | Binary package uploads should specify the version of R they were built for. | [optional] [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CranUpstream.md b/bindings/rust/src/docs/CranUpstream.md new file mode 100644 index 00000000..b123d2e8 --- /dev/null +++ b/bindings/rust/src/docs/CranUpstream.md @@ -0,0 +1,27 @@ +# CranUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CranUpstreamRequest.md b/bindings/rust/src/docs/CranUpstreamRequest.md new file mode 100644 index 00000000..0557f9f8 --- /dev/null +++ b/bindings/rust/src/docs/CranUpstreamRequest.md @@ -0,0 +1,22 @@ +# CranUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/CranUpstreamRequestPatch.md b/bindings/rust/src/docs/CranUpstreamRequestPatch.md new file mode 100644 index 00000000..154fb9b0 --- /dev/null +++ b/bindings/rust/src/docs/CranUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# CranUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DartPackageUpload.md b/bindings/rust/src/docs/DartPackageUpload.md new file mode 100644 index 00000000..191f108d --- /dev/null +++ b/bindings/rust/src/docs/DartPackageUpload.md @@ -0,0 +1,89 @@ +# DartPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DartPackageUploadRequest.md b/bindings/rust/src/docs/DartPackageUploadRequest.md new file mode 100644 index 00000000..6b417e3a --- /dev/null +++ b/bindings/rust/src/docs/DartPackageUploadRequest.md @@ -0,0 +1,12 @@ +# DartPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DartUpstream.md b/bindings/rust/src/docs/DartUpstream.md new file mode 100644 index 00000000..2cf66f04 --- /dev/null +++ b/bindings/rust/src/docs/DartUpstream.md @@ -0,0 +1,27 @@ +# DartUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DartUpstreamRequest.md b/bindings/rust/src/docs/DartUpstreamRequest.md new file mode 100644 index 00000000..58509697 --- /dev/null +++ b/bindings/rust/src/docs/DartUpstreamRequest.md @@ -0,0 +1,22 @@ +# DartUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DartUpstreamRequestPatch.md b/bindings/rust/src/docs/DartUpstreamRequestPatch.md new file mode 100644 index 00000000..791bf48f --- /dev/null +++ b/bindings/rust/src/docs/DartUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# DartUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DebPackageUpload.md b/bindings/rust/src/docs/DebPackageUpload.md new file mode 100644 index 00000000..ed0af58b --- /dev/null +++ b/bindings/rust/src/docs/DebPackageUpload.md @@ -0,0 +1,89 @@ +# DebPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DebPackageUploadRequest.md b/bindings/rust/src/docs/DebPackageUploadRequest.md new file mode 100644 index 00000000..e78acd23 --- /dev/null +++ b/bindings/rust/src/docs/DebPackageUploadRequest.md @@ -0,0 +1,16 @@ +# DebPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**changes_file** | **String** | The changes archive containing the changes made to the source and debian packaging files | [optional] [default to null] +**component** | **String** | The component (channel) for the package (e.g. 'main', 'unstable', etc.) | [optional] [default to null] +**distribution** | **String** | The distribution to store the package for. | [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**sources_file** | **String** | The sources archive containing the source code for the binary | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DebUpstream.md b/bindings/rust/src/docs/DebUpstream.md new file mode 100644 index 00000000..74de5227 --- /dev/null +++ b/bindings/rust/src/docs/DebUpstream.md @@ -0,0 +1,35 @@ +# DebUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**component** | **String** | The component to fetch from the upstream | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**distro_versions** | **Vec** | The distribution version that packages found on this upstream could be associated with. | [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**include_sources** | **bool** | When true, source packages will be available from this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_distribution** | **String** | The distribution to fetch from the upstream | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verification_status** | **String** | The signature verification status for this upstream. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DebUpstreamRequest.md b/bindings/rust/src/docs/DebUpstreamRequest.md new file mode 100644 index 00000000..d6d4b5e4 --- /dev/null +++ b/bindings/rust/src/docs/DebUpstreamRequest.md @@ -0,0 +1,29 @@ +# DebUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**component** | **String** | The component to fetch from the upstream | [optional] [default to null] +**distro_versions** | **Vec** | The distribution version that packages found on this upstream could be associated with. | [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**include_sources** | **bool** | When true, source packages will be available from this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_distribution** | **String** | The distribution to fetch from the upstream | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DebUpstreamRequestPatch.md b/bindings/rust/src/docs/DebUpstreamRequestPatch.md new file mode 100644 index 00000000..fa1e4f2a --- /dev/null +++ b/bindings/rust/src/docs/DebUpstreamRequestPatch.md @@ -0,0 +1,29 @@ +# DebUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**component** | **String** | The component to fetch from the upstream | [optional] [default to null] +**distro_versions** | **Vec** | The distribution version that packages found on this upstream could be associated with. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**include_sources** | **bool** | When true, source packages will be available from this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_distribution** | **String** | The distribution to fetch from the upstream | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Distribution.md b/bindings/rust/src/docs/Distribution.md new file mode 100644 index 00000000..af1631fe --- /dev/null +++ b/bindings/rust/src/docs/Distribution.md @@ -0,0 +1,13 @@ +# Distribution + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [default to null] +**self_url** | **String** | | [optional] [default to null] +**slug** | **String** | The slug identifier for this distribution | [optional] [default to null] +**variants** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DistributionFull.md b/bindings/rust/src/docs/DistributionFull.md new file mode 100644 index 00000000..1e752f59 --- /dev/null +++ b/bindings/rust/src/docs/DistributionFull.md @@ -0,0 +1,16 @@ +# DistributionFull + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**self_url** | **String** | | [optional] [default to null] +**slug** | **String** | The slug identifier for this distribution | [optional] [default to null] +**variants** | **String** | | [optional] [default to null] +**versions** | [**Vec<::models::DistributionVersion>**](DistributionVersion.md) | A list of the versions for this distribution | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DistributionVersion.md b/bindings/rust/src/docs/DistributionVersion.md new file mode 100644 index 00000000..8c8fe61c --- /dev/null +++ b/bindings/rust/src/docs/DistributionVersion.md @@ -0,0 +1,11 @@ +# DistributionVersion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The textual name for this version. | [optional] [default to null] +**slug** | **String** | The slug identifier for this version | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DistrosApi.md b/bindings/rust/src/docs/DistrosApi.md new file mode 100644 index 00000000..82e11ec2 --- /dev/null +++ b/bindings/rust/src/docs/DistrosApi.md @@ -0,0 +1,63 @@ +# \DistrosApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**distros_list**](DistrosApi.md#distros_list) | **Get** /distros/ | Get a list of all supported distributions. +[**distros_read**](DistrosApi.md#distros_read) | **Get** /distros/{slug}/ | View for viewing/listing distributions. + + +# **distros_list** +> Vec<::models::DistributionFull> distros_list(ctx, ctx, ) +Get a list of all supported distributions. + +Get a list of all supported distributions. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**Vec<::models::DistributionFull>**](DistributionFull.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **distros_read** +> ::models::DistributionFull distros_read(ctx, ctx, slug) +View for viewing/listing distributions. + +View for viewing/listing distributions. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **slug** | **String**| | + +### Return type + +[**::models::DistributionFull**](DistributionFull.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/DockerPackageUpload.md b/bindings/rust/src/docs/DockerPackageUpload.md new file mode 100644 index 00000000..fd2d7058 --- /dev/null +++ b/bindings/rust/src/docs/DockerPackageUpload.md @@ -0,0 +1,89 @@ +# DockerPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DockerPackageUploadRequest.md b/bindings/rust/src/docs/DockerPackageUploadRequest.md new file mode 100644 index 00000000..b6d52130 --- /dev/null +++ b/bindings/rust/src/docs/DockerPackageUploadRequest.md @@ -0,0 +1,12 @@ +# DockerPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DockerUpstream.md b/bindings/rust/src/docs/DockerUpstream.md new file mode 100644 index 00000000..d620086f --- /dev/null +++ b/bindings/rust/src/docs/DockerUpstream.md @@ -0,0 +1,27 @@ +# DockerUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DockerUpstreamRequest.md b/bindings/rust/src/docs/DockerUpstreamRequest.md new file mode 100644 index 00000000..4b3723f8 --- /dev/null +++ b/bindings/rust/src/docs/DockerUpstreamRequest.md @@ -0,0 +1,24 @@ +# DockerUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_certificate** | **String** | X.509 Certificate to use for mTLS authentication against the upstream | [optional] [default to null] +**auth_certificate_key** | **String** | Certificate key to use for mTLS authentication against the upstream | [optional] [default to null] +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/DockerUpstreamRequestPatch.md b/bindings/rust/src/docs/DockerUpstreamRequestPatch.md new file mode 100644 index 00000000..18c21af7 --- /dev/null +++ b/bindings/rust/src/docs/DockerUpstreamRequestPatch.md @@ -0,0 +1,24 @@ +# DockerUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_certificate** | **String** | X.509 Certificate to use for mTLS authentication against the upstream | [optional] [default to null] +**auth_certificate_key** | **String** | Certificate key to use for mTLS authentication against the upstream | [optional] [default to null] +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/EntitlementUsageMetrics.md b/bindings/rust/src/docs/EntitlementUsageMetrics.md new file mode 100644 index 00000000..4438ccb7 --- /dev/null +++ b/bindings/rust/src/docs/EntitlementUsageMetrics.md @@ -0,0 +1,10 @@ +# EntitlementUsageMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tokens** | [***::models::CommonMetrics**](CommonMetrics.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/EntitlementsApi.md b/bindings/rust/src/docs/EntitlementsApi.md new file mode 100644 index 00000000..441034b2 --- /dev/null +++ b/bindings/rust/src/docs/EntitlementsApi.md @@ -0,0 +1,408 @@ +# \EntitlementsApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**entitlements_create**](EntitlementsApi.md#entitlements_create) | **Post** /entitlements/{owner}/{repo}/ | Create a specific entitlement in a repository. +[**entitlements_delete**](EntitlementsApi.md#entitlements_delete) | **Delete** /entitlements/{owner}/{repo}/{identifier}/ | Delete a specific entitlement in a repository. +[**entitlements_disable**](EntitlementsApi.md#entitlements_disable) | **Post** /entitlements/{owner}/{repo}/{identifier}/disable/ | Disable an entitlement token in a repository. +[**entitlements_enable**](EntitlementsApi.md#entitlements_enable) | **Post** /entitlements/{owner}/{repo}/{identifier}/enable/ | Enable an entitlement token in a repository. +[**entitlements_list**](EntitlementsApi.md#entitlements_list) | **Get** /entitlements/{owner}/{repo}/ | Get a list of all entitlements in a repository. +[**entitlements_partial_update**](EntitlementsApi.md#entitlements_partial_update) | **Patch** /entitlements/{owner}/{repo}/{identifier}/ | Update a specific entitlement in a repository. +[**entitlements_read**](EntitlementsApi.md#entitlements_read) | **Get** /entitlements/{owner}/{repo}/{identifier}/ | Get a specific entitlement in a repository. +[**entitlements_refresh**](EntitlementsApi.md#entitlements_refresh) | **Post** /entitlements/{owner}/{repo}/{identifier}/refresh/ | Refresh an entitlement token in a repository. +[**entitlements_reset**](EntitlementsApi.md#entitlements_reset) | **Post** /entitlements/{owner}/{repo}/{identifier}/reset/ | Reset the statistics for an entitlement token in a repository. +[**entitlements_sync**](EntitlementsApi.md#entitlements_sync) | **Post** /entitlements/{owner}/{repo}/sync/ | Synchronise tokens from a source repository. + + +# **entitlements_create** +> ::models::RepositoryToken entitlements_create(ctx, ctx, owner, repo, optional) +Create a specific entitlement in a repository. + +Create a specific entitlement in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RepositoryTokenRequest**](RepositoryTokenRequest.md)| | + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + +### Return type + +[**::models::RepositoryToken**](RepositoryToken.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_delete** +> entitlements_delete(ctx, ctx, owner, repo, identifier) +Delete a specific entitlement in a repository. + +Delete a specific entitlement in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_disable** +> entitlements_disable(ctx, ctx, owner, repo, identifier) +Disable an entitlement token in a repository. + +Disable an entitlement token in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_enable** +> entitlements_enable(ctx, ctx, owner, repo, identifier) +Enable an entitlement token in a repository. + +Enable an entitlement token in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_list** +> Vec<::models::RepositoryToken> entitlements_list(ctx, ctx, owner, repo, optional) +Get a list of all entitlements in a repository. + +Get a list of all entitlements in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + **query** | **String**| A search term for querying names of entitlements. | + **active** | **bool**| If true, only include active tokens | [default to false] + +### Return type + +[**Vec<::models::RepositoryToken>**](RepositoryToken.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_partial_update** +> ::models::RepositoryToken entitlements_partial_update(ctx, ctx, owner, repo, identifier, optional) +Update a specific entitlement in a repository. + +Update a specific entitlement in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryTokenRequestPatch**](RepositoryTokenRequestPatch.md)| | + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + +### Return type + +[**::models::RepositoryToken**](RepositoryToken.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_read** +> ::models::RepositoryToken entitlements_read(ctx, ctx, owner, repo, identifier, optional) +Get a specific entitlement in a repository. + +Get a specific entitlement in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **fuzzy** | **bool**| If true, entitlement identifiers including name will be fuzzy matched. | [default to false] + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + +### Return type + +[**::models::RepositoryToken**](RepositoryToken.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_refresh** +> ::models::RepositoryTokenRefresh entitlements_refresh(ctx, ctx, owner, repo, identifier, optional) +Refresh an entitlement token in a repository. + +Refresh an entitlement token in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryTokenRefreshRequest**](RepositoryTokenRefreshRequest.md)| | + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + +### Return type + +[**::models::RepositoryTokenRefresh**](RepositoryTokenRefresh.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_reset** +> entitlements_reset(ctx, ctx, owner, repo, identifier, optional) +Reset the statistics for an entitlement token in a repository. + +Reset the statistics for an entitlement token in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **entitlements_sync** +> ::models::RepositoryTokenSync entitlements_sync(ctx, ctx, owner, repo, optional) +Synchronise tokens from a source repository. + +Synchronise tokens from a source repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RepositoryTokenSyncRequest**](RepositoryTokenSyncRequest.md)| | + **show_tokens** | **bool**| Show entitlement token strings in results | [default to false] + +### Return type + +[**::models::RepositoryTokenSync**](RepositoryTokenSync.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/ErrorDetail.md b/bindings/rust/src/docs/ErrorDetail.md new file mode 100644 index 00000000..6e101ac2 --- /dev/null +++ b/bindings/rust/src/docs/ErrorDetail.md @@ -0,0 +1,11 @@ +# ErrorDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | **String** | An extended message for the response. | [default to null] +**fields** | [**::std::collections::HashMap>**](array.md) | A Dictionary of related errors where key: Field and value: Array of Errors related to that field | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Eula.md b/bindings/rust/src/docs/Eula.md new file mode 100644 index 00000000..ee363542 --- /dev/null +++ b/bindings/rust/src/docs/Eula.md @@ -0,0 +1,11 @@ +# Eula + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **String** | A unique identifier that you can use for your own EULA tracking purposes. This might be a date, or a semantic version, etc. The only requirement is that it is unique across multiple EULAs. | [optional] [default to null] +**number** | **i32** | A sequential identifier that increments by one for each new commit in a repository. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/FilesApi.md b/bindings/rust/src/docs/FilesApi.md new file mode 100644 index 00000000..85290b13 --- /dev/null +++ b/bindings/rust/src/docs/FilesApi.md @@ -0,0 +1,221 @@ +# \FilesApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**files_abort**](FilesApi.md#files_abort) | **Post** /files/{owner}/{repo}/{identifier}/abort/ | Abort a multipart file upload. +[**files_complete**](FilesApi.md#files_complete) | **Post** /files/{owner}/{repo}/{identifier}/complete/ | Complete a multipart file upload. +[**files_create**](FilesApi.md#files_create) | **Post** /files/{owner}/{repo}/ | Request URL(s) to upload new package file upload(s) to. +[**files_info**](FilesApi.md#files_info) | **Get** /files/{owner}/{repo}/{identifier}/info/ | Get upload information to perform a multipart file upload. +[**files_validate**](FilesApi.md#files_validate) | **Post** /files/{owner}/{repo}/validate/ | Validate parameters used for create. + + +# **files_abort** +> files_abort(ctx, ctx, owner, repo, identifier, optional) +Abort a multipart file upload. + +Abort a multipart file upload. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**PackageFileUploadRequest**](PackageFileUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **files_complete** +> ::models::PackageFileUpload files_complete(ctx, ctx, owner, repo, identifier, optional) +Complete a multipart file upload. + +Complete a multipart file upload. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**PackageFileUploadRequest**](PackageFileUploadRequest.md)| | + +### Return type + +[**::models::PackageFileUpload**](PackageFileUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **files_create** +> ::models::PackageFileUpload files_create(ctx, ctx, owner, repo, optional) +Request URL(s) to upload new package file upload(s) to. + +Request URL(s) to upload new package file upload(s) to. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**PackageFileUploadRequest**](PackageFileUploadRequest.md)| | + +### Return type + +[**::models::PackageFileUpload**](PackageFileUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **files_info** +> ::models::PackageFilePartsUpload files_info(ctx, ctx, owner, repo, identifier, filename, optional) +Get upload information to perform a multipart file upload. + +Get upload information to perform a multipart file upload. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **filename** | **String**| The filename of the file being uploaded | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **filename** | **String**| The filename of the file being uploaded | + **part_number** | **i32**| The part number to be uploaded next | + +### Return type + +[**::models::PackageFilePartsUpload**](PackageFilePartsUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **files_validate** +> files_validate(ctx, ctx, owner, repo, optional) +Validate parameters used for create. + +Validate parameters used for create. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**PackageFileUploadRequest**](PackageFileUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/Format.md b/bindings/rust/src/docs/Format.md new file mode 100644 index 00000000..e87df8be --- /dev/null +++ b/bindings/rust/src/docs/Format.md @@ -0,0 +1,18 @@ +# Format + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | Description of the package format | [default to null] +**distributions** | [**Vec<::models::Distribution>**](Distribution.md) | The distributions supported by this package format | [optional] [default to null] +**extensions** | **Vec** | A non-exhaustive list of extensions supported | [default to null] +**name** | **String** | Name for the package format | [default to null] +**premium** | **bool** | If true the package format is a premium-only feature | [default to null] +**premium_plan_id** | **String** | The minimum plan id required for this package format | [optional] [default to null] +**premium_plan_name** | **String** | The minimum plan name required for this package format | [optional] [default to null] +**slug** | **String** | Slug for the package format | [default to null] +**supports** | [***::models::FormatSupport**](FormatSupport.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/FormatSupport.md b/bindings/rust/src/docs/FormatSupport.md new file mode 100644 index 00000000..02d4af53 --- /dev/null +++ b/bindings/rust/src/docs/FormatSupport.md @@ -0,0 +1,15 @@ +# FormatSupport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dependencies** | **bool** | If true the package format supports dependencies | [default to null] +**distributions** | **bool** | If true the package format supports distributions | [default to null] +**file_lists** | **bool** | If true the package format supports file lists | [default to null] +**metadata** | **bool** | If true the package format supports metadata | [default to null] +**upstreams** | [***::models::FormatSupportUpstream**](FormatSupportUpstream.md) | | [default to null] +**versioning** | **bool** | If true the package format supports versioning | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/FormatSupportUpstream.md b/bindings/rust/src/docs/FormatSupportUpstream.md new file mode 100644 index 00000000..9a5988a6 --- /dev/null +++ b/bindings/rust/src/docs/FormatSupportUpstream.md @@ -0,0 +1,15 @@ +# FormatSupportUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_modes** | **Vec** | The authentication modes supported by the upstream format | [default to null] +**caching** | **bool** | If true the upstream format supports caching | [default to null] +**indexing** | **bool** | If true the upstream format supports indexing | [default to null] +**indexing_behavior** | **String** | The behavior of the upstream when indexing | [optional] [default to null] +**proxying** | **bool** | If true the upstream format supports proxying | [default to null] +**signature_verification** | **String** | The signature verification supported by the upstream format | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/FormatsApi.md b/bindings/rust/src/docs/FormatsApi.md new file mode 100644 index 00000000..06674c76 --- /dev/null +++ b/bindings/rust/src/docs/FormatsApi.md @@ -0,0 +1,63 @@ +# \FormatsApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**formats_list**](FormatsApi.md#formats_list) | **Get** /formats/ | Get a list of all supported package formats. +[**formats_read**](FormatsApi.md#formats_read) | **Get** /formats/{slug}/ | Get a specific supported package format. + + +# **formats_list** +> Vec<::models::Format> formats_list(ctx, ctx, ) +Get a list of all supported package formats. + +Get a list of all supported package formats. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**Vec<::models::Format>**](Format.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **formats_read** +> ::models::Format formats_read(ctx, ctx, slug) +Get a specific supported package format. + +Get a specific supported package format. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **slug** | **String**| | + +### Return type + +[**::models::Format**](Format.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/GeoIpLocation.md b/bindings/rust/src/docs/GeoIpLocation.md new file mode 100644 index 00000000..4be672db --- /dev/null +++ b/bindings/rust/src/docs/GeoIpLocation.md @@ -0,0 +1,16 @@ +# GeoIpLocation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**city** | **String** | | [default to null] +**continent** | **String** | | [default to null] +**country** | **String** | | [default to null] +**country_code** | **String** | | [optional] [default to null] +**latitude** | **String** | | [optional] [default to null] +**longitude** | **String** | | [optional] [default to null] +**postal_code** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/GoPackageUpload.md b/bindings/rust/src/docs/GoPackageUpload.md new file mode 100644 index 00000000..dc826edb --- /dev/null +++ b/bindings/rust/src/docs/GoPackageUpload.md @@ -0,0 +1,89 @@ +# GoPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/GoPackageUploadRequest.md b/bindings/rust/src/docs/GoPackageUploadRequest.md new file mode 100644 index 00000000..2d919958 --- /dev/null +++ b/bindings/rust/src/docs/GoPackageUploadRequest.md @@ -0,0 +1,12 @@ +# GoPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HelmPackageUpload.md b/bindings/rust/src/docs/HelmPackageUpload.md new file mode 100644 index 00000000..cf77acaf --- /dev/null +++ b/bindings/rust/src/docs/HelmPackageUpload.md @@ -0,0 +1,89 @@ +# HelmPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HelmPackageUploadRequest.md b/bindings/rust/src/docs/HelmPackageUploadRequest.md new file mode 100644 index 00000000..b5eebe47 --- /dev/null +++ b/bindings/rust/src/docs/HelmPackageUploadRequest.md @@ -0,0 +1,13 @@ +# HelmPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**provenance_file** | **String** | The provenance file containing the signature for the chart. If one is not provided, it will be generated automatically. | [optional] [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HelmUpstream.md b/bindings/rust/src/docs/HelmUpstream.md new file mode 100644 index 00000000..151f6b2a --- /dev/null +++ b/bindings/rust/src/docs/HelmUpstream.md @@ -0,0 +1,27 @@ +# HelmUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HelmUpstreamRequest.md b/bindings/rust/src/docs/HelmUpstreamRequest.md new file mode 100644 index 00000000..9fb3f766 --- /dev/null +++ b/bindings/rust/src/docs/HelmUpstreamRequest.md @@ -0,0 +1,22 @@ +# HelmUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HelmUpstreamRequestPatch.md b/bindings/rust/src/docs/HelmUpstreamRequestPatch.md new file mode 100644 index 00000000..1ba0a897 --- /dev/null +++ b/bindings/rust/src/docs/HelmUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# HelmUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HexPackageUpload.md b/bindings/rust/src/docs/HexPackageUpload.md new file mode 100644 index 00000000..ca0ede61 --- /dev/null +++ b/bindings/rust/src/docs/HexPackageUpload.md @@ -0,0 +1,89 @@ +# HexPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HexPackageUploadRequest.md b/bindings/rust/src/docs/HexPackageUploadRequest.md new file mode 100644 index 00000000..c221f7d3 --- /dev/null +++ b/bindings/rust/src/docs/HexPackageUploadRequest.md @@ -0,0 +1,12 @@ +# HexPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HexUpstream.md b/bindings/rust/src/docs/HexUpstream.md new file mode 100644 index 00000000..21db3608 --- /dev/null +++ b/bindings/rust/src/docs/HexUpstream.md @@ -0,0 +1,27 @@ +# HexUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HexUpstreamRequest.md b/bindings/rust/src/docs/HexUpstreamRequest.md new file mode 100644 index 00000000..780df42f --- /dev/null +++ b/bindings/rust/src/docs/HexUpstreamRequest.md @@ -0,0 +1,22 @@ +# HexUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HexUpstreamRequestPatch.md b/bindings/rust/src/docs/HexUpstreamRequestPatch.md new file mode 100644 index 00000000..69ad63be --- /dev/null +++ b/bindings/rust/src/docs/HexUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# HexUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/History.md b/bindings/rust/src/docs/History.md new file mode 100644 index 00000000..bcaee5cd --- /dev/null +++ b/bindings/rust/src/docs/History.md @@ -0,0 +1,15 @@ +# History + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**days** | **i32** | | [optional] [default to null] +**display** | [***::models::HistoryFieldset**](HistoryFieldset.md) | | [default to null] +**end** | **String** | | [default to null] +**plan** | **String** | | [default to null] +**raw** | [***::models::HistoryFieldsetRaw**](HistoryFieldsetRaw.md) | | [default to null] +**start** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HistoryFieldset.md b/bindings/rust/src/docs/HistoryFieldset.md new file mode 100644 index 00000000..b2ccbd3d --- /dev/null +++ b/bindings/rust/src/docs/HistoryFieldset.md @@ -0,0 +1,12 @@ +# HistoryFieldset + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**downloaded** | [***::models::Usage**](Usage.md) | | [default to null] +**storage_used** | [***::models::StorageUsage**](StorageUsage.md) | | [default to null] +**uploaded** | [***::models::Usage**](Usage.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/HistoryFieldsetRaw.md b/bindings/rust/src/docs/HistoryFieldsetRaw.md new file mode 100644 index 00000000..7872f0e9 --- /dev/null +++ b/bindings/rust/src/docs/HistoryFieldsetRaw.md @@ -0,0 +1,12 @@ +# HistoryFieldsetRaw + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**downloaded** | [***::models::UsageRaw**](UsageRaw.md) | | [default to null] +**storage_used** | [***::models::StorageUsageRaw**](StorageUsageRaw.md) | | [default to null] +**uploaded** | [***::models::UsageRaw**](UsageRaw.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/LuarocksPackageUpload.md b/bindings/rust/src/docs/LuarocksPackageUpload.md new file mode 100644 index 00000000..9ee6728c --- /dev/null +++ b/bindings/rust/src/docs/LuarocksPackageUpload.md @@ -0,0 +1,89 @@ +# LuarocksPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/LuarocksPackageUploadRequest.md b/bindings/rust/src/docs/LuarocksPackageUploadRequest.md new file mode 100644 index 00000000..40d23bd6 --- /dev/null +++ b/bindings/rust/src/docs/LuarocksPackageUploadRequest.md @@ -0,0 +1,12 @@ +# LuarocksPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/MavenPackageUpload.md b/bindings/rust/src/docs/MavenPackageUpload.md new file mode 100644 index 00000000..4b1fbf42 --- /dev/null +++ b/bindings/rust/src/docs/MavenPackageUpload.md @@ -0,0 +1,94 @@ +# MavenPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**artifact_id** | **String** | The ID of the artifact. | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**group_id** | **String** | Artifact's group ID. | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**packaging** | **String** | Artifact's Maven packaging type. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**sbt_version** | **String** | | [optional] [default to null] +**scala_version** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/MavenPackageUploadRequest.md b/bindings/rust/src/docs/MavenPackageUploadRequest.md new file mode 100644 index 00000000..e7c91f29 --- /dev/null +++ b/bindings/rust/src/docs/MavenPackageUploadRequest.md @@ -0,0 +1,23 @@ +# MavenPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**artifact_id** | **String** | The ID of the artifact. | [optional] [default to null] +**group_id** | **String** | Artifact's group ID. | [optional] [default to null] +**ivy_file** | **String** | The ivy file is an XML file describing the dependencies of the project. | [optional] [default to null] +**javadoc_file** | **String** | Adds bundled Java documentation to the Maven package | [optional] [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**packaging** | **String** | Artifact's Maven packaging type. | [optional] [default to null] +**pom_file** | **String** | The POM file is an XML file containing the Maven coordinates. | [optional] [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**sbt_version** | **String** | | [optional] [default to null] +**scala_version** | **String** | | [optional] [default to null] +**sources_file** | **String** | Adds bundled Java source code to the Maven package. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] +**tests_file** | **String** | Adds bundled Java tests to the Maven package. | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/MavenUpstream.md b/bindings/rust/src/docs/MavenUpstream.md new file mode 100644 index 00000000..af463e9e --- /dev/null +++ b/bindings/rust/src/docs/MavenUpstream.md @@ -0,0 +1,31 @@ +# MavenUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verification_status** | **String** | The signature verification status for this upstream. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/MavenUpstreamRequest.md b/bindings/rust/src/docs/MavenUpstreamRequest.md new file mode 100644 index 00000000..7ab9f4a7 --- /dev/null +++ b/bindings/rust/src/docs/MavenUpstreamRequest.md @@ -0,0 +1,25 @@ +# MavenUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/MavenUpstreamRequestPatch.md b/bindings/rust/src/docs/MavenUpstreamRequestPatch.md new file mode 100644 index 00000000..34c1dc7f --- /dev/null +++ b/bindings/rust/src/docs/MavenUpstreamRequestPatch.md @@ -0,0 +1,25 @@ +# MavenUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/MetricsApi.md b/bindings/rust/src/docs/MetricsApi.md new file mode 100644 index 00000000..c2049762 --- /dev/null +++ b/bindings/rust/src/docs/MetricsApi.md @@ -0,0 +1,141 @@ +# \MetricsApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**metrics_entitlements_account_list**](MetricsApi.md#metrics_entitlements_account_list) | **Get** /metrics/entitlements/{owner}/ | View for listing entitlement token metrics, across an account. +[**metrics_entitlements_repo_list**](MetricsApi.md#metrics_entitlements_repo_list) | **Get** /metrics/entitlements/{owner}/{repo}/ | View for listing entitlement token metrics, for a repository. +[**metrics_packages_list**](MetricsApi.md#metrics_packages_list) | **Get** /metrics/packages/{owner}/{repo}/ | View for listing package usage metrics, for a repository. + + +# **metrics_entitlements_account_list** +> ::models::EntitlementUsageMetrics metrics_entitlements_account_list(ctx, ctx, owner, optional) +View for listing entitlement token metrics, across an account. + +View for listing entitlement token metrics, across an account. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **finish** | **String**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | + **start** | **String**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | + **tokens** | **String**| A comma seperated list of tokens (slug perm) to include in the results. | + +### Return type + +[**::models::EntitlementUsageMetrics**](EntitlementUsageMetrics.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **metrics_entitlements_repo_list** +> ::models::EntitlementUsageMetrics metrics_entitlements_repo_list(ctx, ctx, owner, repo, optional) +View for listing entitlement token metrics, for a repository. + +View for listing entitlement token metrics, for a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **finish** | **String**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | + **start** | **String**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | + **tokens** | **String**| A comma seperated list of tokens (slug perm) to include in the results. | + +### Return type + +[**::models::EntitlementUsageMetrics**](EntitlementUsageMetrics.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **metrics_packages_list** +> ::models::PackageUsageMetrics metrics_packages_list(ctx, ctx, owner, repo, optional) +View for listing package usage metrics, for a repository. + +View for listing package usage metrics, for a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **finish** | **String**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | + **packages** | **String**| A comma seperated list of packages (slug perm) to include in the results. | + **start** | **String**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | + +### Return type + +[**::models::PackageUsageMetrics**](PackageUsageMetrics.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/Namespace.md b/bindings/rust/src/docs/Namespace.md new file mode 100644 index 00000000..528efd4e --- /dev/null +++ b/bindings/rust/src/docs/Namespace.md @@ -0,0 +1,13 @@ +# Namespace + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] [default to null] +**slug** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**type_name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NamespaceAuditLog.md b/bindings/rust/src/docs/NamespaceAuditLog.md new file mode 100644 index 00000000..f89a05ba --- /dev/null +++ b/bindings/rust/src/docs/NamespaceAuditLog.md @@ -0,0 +1,25 @@ +# NamespaceAuditLog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actor** | **String** | | [default to null] +**actor_ip_address** | **String** | | [default to null] +**actor_kind** | **String** | | [optional] [default to null] +**actor_location** | [***::models::GeoIpLocation**](GeoIpLocation.md) | | [default to null] +**actor_slug_perm** | **String** | | [default to null] +**actor_url** | **String** | | [optional] [default to null] +**context** | **String** | | [default to null] +**event** | **String** | | [default to null] +**event_at** | **String** | | [default to null] +**object** | **String** | | [default to null] +**object_kind** | **String** | | [default to null] +**object_slug_perm** | **String** | | [default to null] +**target** | **String** | | [default to null] +**target_kind** | **String** | | [default to null] +**target_slug_perm** | **String** | | [optional] [default to null] +**uuid** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NamespacesApi.md b/bindings/rust/src/docs/NamespacesApi.md new file mode 100644 index 00000000..1f9e6e44 --- /dev/null +++ b/bindings/rust/src/docs/NamespacesApi.md @@ -0,0 +1,76 @@ +# \NamespacesApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**namespaces_list**](NamespacesApi.md#namespaces_list) | **Get** /namespaces/ | Get a list of all namespaces the user belongs to. +[**namespaces_read**](NamespacesApi.md#namespaces_read) | **Get** /namespaces/{slug}/ | Get a specific namespace that the user belongs to. + + +# **namespaces_list** +> Vec<::models::Namespace> namespaces_list(ctx, ctx, optional) +Get a list of all namespaces the user belongs to. + +Get a list of all namespaces the user belongs to. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::Namespace>**](Namespace.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **namespaces_read** +> ::models::Namespace namespaces_read(ctx, ctx, slug) +Get a specific namespace that the user belongs to. + +Get a specific namespace that the user belongs to. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **slug** | **String**| | + +### Return type + +[**::models::Namespace**](Namespace.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/NestedLicensePolicy.md b/bindings/rust/src/docs/NestedLicensePolicy.md new file mode 100644 index 00000000..737e0c40 --- /dev/null +++ b/bindings/rust/src/docs/NestedLicensePolicy.md @@ -0,0 +1,19 @@ +# NestedLicensePolicy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_licenses** | **bool** | | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**spdx_identifiers** | **Vec** | | [default to null] +**updated_at** | **String** | | [optional] [default to null] +**url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NestedVulnerabilityPolicy.md b/bindings/rust/src/docs/NestedVulnerabilityPolicy.md new file mode 100644 index 00000000..76979a92 --- /dev/null +++ b/bindings/rust/src/docs/NestedVulnerabilityPolicy.md @@ -0,0 +1,19 @@ +# NestedVulnerabilityPolicy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_severity** | **bool** | Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**min_severity** | **String** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NestedVulnerabilityScanResults.md b/bindings/rust/src/docs/NestedVulnerabilityScanResults.md new file mode 100644 index 00000000..c3cbf24c --- /dev/null +++ b/bindings/rust/src/docs/NestedVulnerabilityScanResults.md @@ -0,0 +1,16 @@ +# NestedVulnerabilityScanResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | The time this scan result was stored. | [optional] [default to null] +**has_vulnerabilities** | **bool** | Do the results contain any known vulnerabilities? | [optional] [default to null] +**identifier** | **String** | | [default to null] +**max_severity** | **String** | | [optional] [default to null] +**num_vulnerabilities** | **i32** | | [optional] [default to null] +**scan_id** | **i32** | Deprecated (23-05-15): Please use 'identifier' instead. Previously: A monotonically increasing number that identified a scan within a repository. | [default to null] +**url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NpmPackageUpload.md b/bindings/rust/src/docs/NpmPackageUpload.md new file mode 100644 index 00000000..8f1a0a4e --- /dev/null +++ b/bindings/rust/src/docs/NpmPackageUpload.md @@ -0,0 +1,89 @@ +# NpmPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NpmPackageUploadRequest.md b/bindings/rust/src/docs/NpmPackageUploadRequest.md new file mode 100644 index 00000000..8156ea9c --- /dev/null +++ b/bindings/rust/src/docs/NpmPackageUploadRequest.md @@ -0,0 +1,13 @@ +# NpmPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**npm_dist_tag** | **String** | The default npm dist-tag for this package/version - This will replace any other package/version if they are using the same tag. | [optional] [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NpmUpstream.md b/bindings/rust/src/docs/NpmUpstream.md new file mode 100644 index 00000000..1ac956a1 --- /dev/null +++ b/bindings/rust/src/docs/NpmUpstream.md @@ -0,0 +1,27 @@ +# NpmUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NpmUpstreamRequest.md b/bindings/rust/src/docs/NpmUpstreamRequest.md new file mode 100644 index 00000000..20a7d5c1 --- /dev/null +++ b/bindings/rust/src/docs/NpmUpstreamRequest.md @@ -0,0 +1,22 @@ +# NpmUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NpmUpstreamRequestPatch.md b/bindings/rust/src/docs/NpmUpstreamRequestPatch.md new file mode 100644 index 00000000..d67deae9 --- /dev/null +++ b/bindings/rust/src/docs/NpmUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# NpmUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NugetPackageUpload.md b/bindings/rust/src/docs/NugetPackageUpload.md new file mode 100644 index 00000000..3d77c47d --- /dev/null +++ b/bindings/rust/src/docs/NugetPackageUpload.md @@ -0,0 +1,89 @@ +# NugetPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NugetPackageUploadRequest.md b/bindings/rust/src/docs/NugetPackageUploadRequest.md new file mode 100644 index 00000000..39eec2ab --- /dev/null +++ b/bindings/rust/src/docs/NugetPackageUploadRequest.md @@ -0,0 +1,13 @@ +# NugetPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**symbols_file** | **String** | Uploads a symbols file as a separate package | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NugetUpstream.md b/bindings/rust/src/docs/NugetUpstream.md new file mode 100644 index 00000000..98f85680 --- /dev/null +++ b/bindings/rust/src/docs/NugetUpstream.md @@ -0,0 +1,27 @@ +# NugetUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NugetUpstreamRequest.md b/bindings/rust/src/docs/NugetUpstreamRequest.md new file mode 100644 index 00000000..35f776f4 --- /dev/null +++ b/bindings/rust/src/docs/NugetUpstreamRequest.md @@ -0,0 +1,22 @@ +# NugetUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/NugetUpstreamRequestPatch.md b/bindings/rust/src/docs/NugetUpstreamRequestPatch.md new file mode 100644 index 00000000..3c7e105e --- /dev/null +++ b/bindings/rust/src/docs/NugetUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# NugetUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Organization.md b/bindings/rust/src/docs/Organization.md new file mode 100644 index 00000000..7d70c38d --- /dev/null +++ b/bindings/rust/src/docs/Organization.md @@ -0,0 +1,16 @@ +# Organization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **String** | | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**location** | **String** | The city/town/area your organization is based in. | [optional] [default to null] +**name** | **String** | | [default to null] +**slug** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**tagline** | **String** | A short public descriptive for your organization. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationGroupSync.md b/bindings/rust/src/docs/OrganizationGroupSync.md new file mode 100644 index 00000000..236e0703 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationGroupSync.md @@ -0,0 +1,14 @@ +# OrganizationGroupSync + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idp_key** | **String** | | [default to null] +**idp_value** | **String** | | [default to null] +**role** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**team** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationGroupSyncRequest.md b/bindings/rust/src/docs/OrganizationGroupSyncRequest.md new file mode 100644 index 00000000..cbc0b476 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationGroupSyncRequest.md @@ -0,0 +1,14 @@ +# OrganizationGroupSyncRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idp_key** | **String** | | [default to null] +**idp_value** | **String** | | [default to null] +**organization** | **String** | | [default to null] +**role** | **String** | | [optional] [default to null] +**team** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationGroupSyncStatus.md b/bindings/rust/src/docs/OrganizationGroupSyncStatus.md new file mode 100644 index 00000000..00595650 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationGroupSyncStatus.md @@ -0,0 +1,10 @@ +# OrganizationGroupSyncStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml_group_sync_status** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationInvite.md b/bindings/rust/src/docs/OrganizationInvite.md new file mode 100644 index 00000000..4f150a68 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationInvite.md @@ -0,0 +1,19 @@ +# OrganizationInvite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | The email of the user to be invited. | [optional] [default to null] +**expires_at** | **String** | | [optional] [default to null] +**inviter** | **String** | | [optional] [default to null] +**inviter_url** | **String** | | [optional] [default to null] +**org** | **String** | | [optional] [default to null] +**role** | **String** | The role to be assigned to the invited user. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**teams** | [**Vec<::models::OrganizationTeamInvite>**](OrganizationTeamInvite.md) | | [optional] [default to null] +**user** | **String** | The slug of the user to be invited. | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationInviteExtend.md b/bindings/rust/src/docs/OrganizationInviteExtend.md new file mode 100644 index 00000000..2cf2772c --- /dev/null +++ b/bindings/rust/src/docs/OrganizationInviteExtend.md @@ -0,0 +1,19 @@ +# OrganizationInviteExtend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | The email of the user to be invited. | [optional] [default to null] +**expires_at** | **String** | | [optional] [default to null] +**inviter** | **String** | | [optional] [default to null] +**inviter_url** | **String** | | [optional] [default to null] +**org** | **String** | | [optional] [default to null] +**role** | **String** | The role to be assigned to the invited user. | [optional] [default to null] +**slug_perm** | **String** | The slug_perm of the invite to be extended. | [optional] [default to null] +**teams** | [**Vec<::models::OrganizationTeamInvite>**](OrganizationTeamInvite.md) | | [optional] [default to null] +**user** | **String** | The slug of the user to be invited. | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationInviteRequest.md b/bindings/rust/src/docs/OrganizationInviteRequest.md new file mode 100644 index 00000000..e3c69ace --- /dev/null +++ b/bindings/rust/src/docs/OrganizationInviteRequest.md @@ -0,0 +1,13 @@ +# OrganizationInviteRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | The email of the user to be invited. | [optional] [default to null] +**role** | **String** | The role to be assigned to the invited user. | [optional] [default to null] +**teams** | [**Vec<::models::OrganizationTeamInvite>**](OrganizationTeamInvite.md) | | [optional] [default to null] +**user** | **String** | The slug of the user to be invited. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationInviteUpdate.md b/bindings/rust/src/docs/OrganizationInviteUpdate.md new file mode 100644 index 00000000..2b5e8bc0 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationInviteUpdate.md @@ -0,0 +1,10 @@ +# OrganizationInviteUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **String** | The role to be assigned to the invited user. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationInviteUpdateRequestPatch.md b/bindings/rust/src/docs/OrganizationInviteUpdateRequestPatch.md new file mode 100644 index 00000000..b7dd4f1f --- /dev/null +++ b/bindings/rust/src/docs/OrganizationInviteUpdateRequestPatch.md @@ -0,0 +1,10 @@ +# OrganizationInviteUpdateRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **String** | The role to be assigned to the invited user. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationMembership.md b/bindings/rust/src/docs/OrganizationMembership.md new file mode 100644 index 00000000..c0992c6b --- /dev/null +++ b/bindings/rust/src/docs/OrganizationMembership.md @@ -0,0 +1,21 @@ +# OrganizationMembership + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] [default to null] +**has_two_factor** | **bool** | | [optional] [default to null] +**is_active** | **bool** | | [optional] [default to null] +**joined_at** | **String** | | [optional] [default to null] +**last_login_at** | **String** | | [optional] [default to null] +**last_login_method** | **String** | | [optional] [default to null] +**role** | **String** | | [optional] [default to null] +**user** | **String** | | [optional] [default to null] +**user_id** | **String** | | [optional] [default to null] +**user_name** | **String** | | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationMembershipRequestPatch.md b/bindings/rust/src/docs/OrganizationMembershipRequestPatch.md new file mode 100644 index 00000000..cad97249 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationMembershipRequestPatch.md @@ -0,0 +1,9 @@ +# OrganizationMembershipRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationMembershipRoleUpdate.md b/bindings/rust/src/docs/OrganizationMembershipRoleUpdate.md new file mode 100644 index 00000000..1b62f7b9 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationMembershipRoleUpdate.md @@ -0,0 +1,20 @@ +# OrganizationMembershipRoleUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] [default to null] +**has_two_factor** | **bool** | | [optional] [default to null] +**joined_at** | **String** | | [optional] [default to null] +**last_login_at** | **String** | | [optional] [default to null] +**last_login_method** | **String** | | [optional] [default to null] +**role** | **String** | | [optional] [default to null] +**user** | **String** | | [optional] [default to null] +**user_id** | **String** | | [optional] [default to null] +**user_name** | **String** | | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationMembershipRoleUpdateRequestPatch.md b/bindings/rust/src/docs/OrganizationMembershipRoleUpdateRequestPatch.md new file mode 100644 index 00000000..db42d390 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationMembershipRoleUpdateRequestPatch.md @@ -0,0 +1,10 @@ +# OrganizationMembershipRoleUpdateRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationMembershipVisibilityUpdate.md b/bindings/rust/src/docs/OrganizationMembershipVisibilityUpdate.md new file mode 100644 index 00000000..6205dc3a --- /dev/null +++ b/bindings/rust/src/docs/OrganizationMembershipVisibilityUpdate.md @@ -0,0 +1,20 @@ +# OrganizationMembershipVisibilityUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] [default to null] +**has_two_factor** | **bool** | | [optional] [default to null] +**joined_at** | **String** | | [optional] [default to null] +**last_login_at** | **String** | | [optional] [default to null] +**last_login_method** | **String** | | [optional] [default to null] +**role** | **String** | | [optional] [default to null] +**user** | **String** | | [optional] [default to null] +**user_id** | **String** | | [optional] [default to null] +**user_name** | **String** | | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationMembershipVisibilityUpdateRequestPatch.md b/bindings/rust/src/docs/OrganizationMembershipVisibilityUpdateRequestPatch.md new file mode 100644 index 00000000..93c04be8 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationMembershipVisibilityUpdateRequestPatch.md @@ -0,0 +1,10 @@ +# OrganizationMembershipVisibilityUpdateRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationPackageLicensePolicy.md b/bindings/rust/src/docs/OrganizationPackageLicensePolicy.md new file mode 100644 index 00000000..a7d77180 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationPackageLicensePolicy.md @@ -0,0 +1,18 @@ +# OrganizationPackageLicensePolicy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_licenses** | **bool** | | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**spdx_identifiers** | **Vec** | | [default to null] +**updated_at** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationPackageLicensePolicyRequest.md b/bindings/rust/src/docs/OrganizationPackageLicensePolicyRequest.md new file mode 100644 index 00000000..b866b982 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationPackageLicensePolicyRequest.md @@ -0,0 +1,15 @@ +# OrganizationPackageLicensePolicyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_licenses** | **bool** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] +**spdx_identifiers** | **Vec** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationPackageLicensePolicyRequestPatch.md b/bindings/rust/src/docs/OrganizationPackageLicensePolicyRequestPatch.md new file mode 100644 index 00000000..8562f76c --- /dev/null +++ b/bindings/rust/src/docs/OrganizationPackageLicensePolicyRequestPatch.md @@ -0,0 +1,15 @@ +# OrganizationPackageLicensePolicyRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_licenses** | **bool** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] +**spdx_identifiers** | **Vec** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicy.md b/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicy.md new file mode 100644 index 00000000..25930196 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicy.md @@ -0,0 +1,18 @@ +# OrganizationPackageVulnerabilityPolicy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_severity** | **bool** | Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**min_severity** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicyRequest.md b/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicyRequest.md new file mode 100644 index 00000000..a4980ed9 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicyRequest.md @@ -0,0 +1,15 @@ +# OrganizationPackageVulnerabilityPolicyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_severity** | **bool** | Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**min_severity** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicyRequestPatch.md b/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicyRequestPatch.md new file mode 100644 index 00000000..3041d8fb --- /dev/null +++ b/bindings/rust/src/docs/OrganizationPackageVulnerabilityPolicyRequestPatch.md @@ -0,0 +1,15 @@ +# OrganizationPackageVulnerabilityPolicyRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_unknown_severity** | **bool** | Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**min_severity** | **String** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**on_violation_quarantine** | **bool** | | [optional] [default to null] +**package_query_string** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationSamlAuth.md b/bindings/rust/src/docs/OrganizationSamlAuth.md new file mode 100644 index 00000000..b83a4cd1 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationSamlAuth.md @@ -0,0 +1,13 @@ +# OrganizationSamlAuth + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml_auth_enabled** | **bool** | | [default to null] +**saml_auth_enforced** | **bool** | | [default to null] +**saml_metadata_inline** | **String** | If configured, SAML metadata will be used as entered instead of retrieved from a remote URL. | [optional] [default to null] +**saml_metadata_url** | **String** | If configured, SAML metadata be retrieved from a remote URL. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationSamlAuthRequestPatch.md b/bindings/rust/src/docs/OrganizationSamlAuthRequestPatch.md new file mode 100644 index 00000000..3363a6cc --- /dev/null +++ b/bindings/rust/src/docs/OrganizationSamlAuthRequestPatch.md @@ -0,0 +1,13 @@ +# OrganizationSamlAuthRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml_auth_enabled** | **bool** | | [optional] [default to null] +**saml_auth_enforced** | **bool** | | [optional] [default to null] +**saml_metadata_inline** | **String** | If configured, SAML metadata will be used as entered instead of retrieved from a remote URL. | [optional] [default to null] +**saml_metadata_url** | **String** | If configured, SAML metadata be retrieved from a remote URL. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationTeam.md b/bindings/rust/src/docs/OrganizationTeam.md new file mode 100644 index 00000000..ca1de8ea --- /dev/null +++ b/bindings/rust/src/docs/OrganizationTeam.md @@ -0,0 +1,14 @@ +# OrganizationTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**slug** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationTeamInvite.md b/bindings/rust/src/docs/OrganizationTeamInvite.md new file mode 100644 index 00000000..e560e1c2 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationTeamInvite.md @@ -0,0 +1,11 @@ +# OrganizationTeamInvite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **String** | The role to be assigned to the invited user in the team. | [optional] [default to null] +**team** | **String** | The team identifier (slug). | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationTeamMembers.md b/bindings/rust/src/docs/OrganizationTeamMembers.md new file mode 100644 index 00000000..a142de79 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationTeamMembers.md @@ -0,0 +1,10 @@ +# OrganizationTeamMembers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**Vec<::models::OrganizationTeamMembership>**](OrganizationTeamMembership.md) | The team members | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationTeamMembership.md b/bindings/rust/src/docs/OrganizationTeamMembership.md new file mode 100644 index 00000000..6508a137 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationTeamMembership.md @@ -0,0 +1,11 @@ +# OrganizationTeamMembership + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **String** | | [default to null] +**user** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationTeamRequest.md b/bindings/rust/src/docs/OrganizationTeamRequest.md new file mode 100644 index 00000000..dbf72dcc --- /dev/null +++ b/bindings/rust/src/docs/OrganizationTeamRequest.md @@ -0,0 +1,13 @@ +# OrganizationTeamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [default to null] +**slug** | **String** | | [optional] [default to null] +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrganizationTeamRequestPatch.md b/bindings/rust/src/docs/OrganizationTeamRequestPatch.md new file mode 100644 index 00000000..6e98e2c2 --- /dev/null +++ b/bindings/rust/src/docs/OrganizationTeamRequestPatch.md @@ -0,0 +1,13 @@ +# OrganizationTeamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**slug** | **String** | | [optional] [default to null] +**visibility** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/OrgsApi.md b/bindings/rust/src/docs/OrgsApi.md new file mode 100644 index 00000000..0a5bb097 --- /dev/null +++ b/bindings/rust/src/docs/OrgsApi.md @@ -0,0 +1,2588 @@ +# \OrgsApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**orgs_delete**](OrgsApi.md#orgs_delete) | **Delete** /orgs/{org}/ | Delete the specified organization. +[**orgs_deny_policy_create**](OrgsApi.md#orgs_deny_policy_create) | **Post** /orgs/{org}/deny-policy/ | Create a package deny policy. +[**orgs_deny_policy_delete**](OrgsApi.md#orgs_deny_policy_delete) | **Delete** /orgs/{org}/deny-policy/{slug_perm}/ | Delete a package deny policy. +[**orgs_deny_policy_list**](OrgsApi.md#orgs_deny_policy_list) | **Get** /orgs/{org}/deny-policy/ | Get a list of all package deny policies. +[**orgs_deny_policy_partial_update**](OrgsApi.md#orgs_deny_policy_partial_update) | **Patch** /orgs/{org}/deny-policy/{slug_perm}/ | Partially update a package deny policy. +[**orgs_deny_policy_read**](OrgsApi.md#orgs_deny_policy_read) | **Get** /orgs/{org}/deny-policy/{slug_perm}/ | Get a package deny policy. +[**orgs_deny_policy_update**](OrgsApi.md#orgs_deny_policy_update) | **Put** /orgs/{org}/deny-policy/{slug_perm}/ | Update a package deny policy. +[**orgs_invites_create**](OrgsApi.md#orgs_invites_create) | **Post** /orgs/{org}/invites/ | Create an organization invite for a specific user +[**orgs_invites_delete**](OrgsApi.md#orgs_invites_delete) | **Delete** /orgs/{org}/invites/{slug_perm}/ | Delete a specific organization invite +[**orgs_invites_extend**](OrgsApi.md#orgs_invites_extend) | **Post** /orgs/{org}/invites/{slug_perm}/extend/ | Extend an organization invite. +[**orgs_invites_list**](OrgsApi.md#orgs_invites_list) | **Get** /orgs/{org}/invites/ | Get a list of all invites for an organization. +[**orgs_invites_partial_update**](OrgsApi.md#orgs_invites_partial_update) | **Patch** /orgs/{org}/invites/{slug_perm}/ | Update a specific organization invite. +[**orgs_invites_resend**](OrgsApi.md#orgs_invites_resend) | **Post** /orgs/{org}/invites/{slug_perm}/resend/ | Resend an organization invite. +[**orgs_license_policy_create**](OrgsApi.md#orgs_license_policy_create) | **Post** /orgs/{org}/license-policy/ | Create a package license policy. +[**orgs_license_policy_delete**](OrgsApi.md#orgs_license_policy_delete) | **Delete** /orgs/{org}/license-policy/{slug_perm}/ | Delete a package license policy. +[**orgs_license_policy_evaluation_create**](OrgsApi.md#orgs_license_policy_evaluation_create) | **Post** /orgs/{org}/license-policy/{policy_slug_perm}/evaluation/ | Create an evaluation request for this policy. +[**orgs_license_policy_evaluation_list**](OrgsApi.md#orgs_license_policy_evaluation_list) | **Get** /orgs/{org}/license-policy/{policy_slug_perm}/evaluation/ | List evaluation requests for this policy. +[**orgs_license_policy_evaluation_read**](OrgsApi.md#orgs_license_policy_evaluation_read) | **Get** /orgs/{org}/license-policy/{policy_slug_perm}/evaluation/{slug_perm}/ | Retrieve an evaluation request for this policy. +[**orgs_license_policy_list**](OrgsApi.md#orgs_license_policy_list) | **Get** /orgs/{org}/license-policy/ | Get a list of all package license policies. +[**orgs_license_policy_partial_update**](OrgsApi.md#orgs_license_policy_partial_update) | **Patch** /orgs/{org}/license-policy/{slug_perm}/ | Partially update a package license policy. +[**orgs_license_policy_read**](OrgsApi.md#orgs_license_policy_read) | **Get** /orgs/{org}/license-policy/{slug_perm}/ | Get a package license policy. +[**orgs_license_policy_update**](OrgsApi.md#orgs_license_policy_update) | **Put** /orgs/{org}/license-policy/{slug_perm}/ | Update a package license policy. +[**orgs_license_policy_violation_list**](OrgsApi.md#orgs_license_policy_violation_list) | **Get** /orgs/{org}/license-policy-violation/ | List all current license policy violations for this Organization. +[**orgs_list**](OrgsApi.md#orgs_list) | **Get** /orgs/ | Get a list of all the organizations you are associated with. +[**orgs_members_delete**](OrgsApi.md#orgs_members_delete) | **Delete** /orgs/{org}/members/{member}/ | Removes a member from the organization. +[**orgs_members_list**](OrgsApi.md#orgs_members_list) | **Get** /orgs/{org}/members/ | Get the details for all organization members. +[**orgs_members_partial_update**](OrgsApi.md#orgs_members_partial_update) | **Patch** /orgs/{org}/members/{member}/ | Views for working with organization members. +[**orgs_members_read**](OrgsApi.md#orgs_members_read) | **Get** /orgs/{org}/members/{member}/ | Get the details for a specific organization member. +[**orgs_members_refresh**](OrgsApi.md#orgs_members_refresh) | **Post** /orgs/{org}/members/{member}/refresh/ | Refresh a member of the organization's API key. +[**orgs_members_remove**](OrgsApi.md#orgs_members_remove) | **Get** /orgs/{org}/members/{member}/remove/ | Removes a member from the organization (deprecated, use DELETE instead). +[**orgs_members_update_role**](OrgsApi.md#orgs_members_update_role) | **Patch** /orgs/{org}/members/{member}/update-role/ | Update a member's role in the organization. +[**orgs_members_update_visibility**](OrgsApi.md#orgs_members_update_visibility) | **Patch** /orgs/{org}/members/{member}/update-visibility/ | Update a member's visibility in the organization. +[**orgs_openid_connect_create**](OrgsApi.md#orgs_openid_connect_create) | **Post** /orgs/{org}/openid-connect/ | Create the OpenID Connect provider settings for the org. +[**orgs_openid_connect_delete**](OrgsApi.md#orgs_openid_connect_delete) | **Delete** /orgs/{org}/openid-connect/{slug_perm}/ | Delete a specific OpenID Connect provider setting for the org. +[**orgs_openid_connect_list**](OrgsApi.md#orgs_openid_connect_list) | **Get** /orgs/{org}/openid-connect/ | Retrieve the list of OpenID Connect provider settings for the org. +[**orgs_openid_connect_partial_update**](OrgsApi.md#orgs_openid_connect_partial_update) | **Patch** /orgs/{org}/openid-connect/{slug_perm}/ | Update a specific OpenID Connect provider setting for the org. +[**orgs_openid_connect_read**](OrgsApi.md#orgs_openid_connect_read) | **Get** /orgs/{org}/openid-connect/{slug_perm}/ | Retrieve a specific OpenID Connect provider setting for the org. +[**orgs_openid_connect_update**](OrgsApi.md#orgs_openid_connect_update) | **Put** /orgs/{org}/openid-connect/{slug_perm}/ | Update a specific OpenID Connect provider setting for the org. +[**orgs_read**](OrgsApi.md#orgs_read) | **Get** /orgs/{org}/ | Get the details for the specific organization. +[**orgs_saml_authentication_partial_update**](OrgsApi.md#orgs_saml_authentication_partial_update) | **Patch** /orgs/{org}/saml-authentication | Update the SAML Authentication settings for this Organization. +[**orgs_saml_authentication_read**](OrgsApi.md#orgs_saml_authentication_read) | **Get** /orgs/{org}/saml-authentication | Retrieve the SAML Authentication settings for this Organization. +[**orgs_saml_group_sync_create**](OrgsApi.md#orgs_saml_group_sync_create) | **Post** /orgs/{org}/saml-group-sync/ | Create a new SAML Group Sync mapping within an organization. +[**orgs_saml_group_sync_delete**](OrgsApi.md#orgs_saml_group_sync_delete) | **Delete** /orgs/{org}/saml-group-sync/{slug_perm}/ | Delete a SAML Group Sync mapping from an organization. +[**orgs_saml_group_sync_disable**](OrgsApi.md#orgs_saml_group_sync_disable) | **Post** /orgs/{org}/saml-group-sync/disable/ | Disable SAML Group Sync for this organization. +[**orgs_saml_group_sync_enable**](OrgsApi.md#orgs_saml_group_sync_enable) | **Post** /orgs/{org}/saml-group-sync/enable/ | Enable SAML Group Sync for this organization. +[**orgs_saml_group_sync_list**](OrgsApi.md#orgs_saml_group_sync_list) | **Get** /orgs/{org}/saml-group-sync/ | Get the details of all SAML Group Sync mapping within an organization. +[**orgs_saml_group_sync_status**](OrgsApi.md#orgs_saml_group_sync_status) | **Get** /orgs/{org}/saml-group-sync/status/ | Retrieve the SAML Group Sync status for this organization. +[**orgs_services_create**](OrgsApi.md#orgs_services_create) | **Post** /orgs/{org}/services/ | Create a service within an organization. +[**orgs_services_delete**](OrgsApi.md#orgs_services_delete) | **Delete** /orgs/{org}/services/{service}/ | Delete a specific service +[**orgs_services_list**](OrgsApi.md#orgs_services_list) | **Get** /orgs/{org}/services/ | Get a list of all services within an organization. +[**orgs_services_partial_update**](OrgsApi.md#orgs_services_partial_update) | **Patch** /orgs/{org}/services/{service}/ | Update a service within an organization. +[**orgs_services_read**](OrgsApi.md#orgs_services_read) | **Get** /orgs/{org}/services/{service}/ | Retrieve details of a single service within an organization. +[**orgs_services_refresh**](OrgsApi.md#orgs_services_refresh) | **Post** /orgs/{org}/services/{service}/refresh/ | Refresh service API token. +[**orgs_teams_create**](OrgsApi.md#orgs_teams_create) | **Post** /orgs/{org}/teams/ | Create a team for this organization. +[**orgs_teams_delete**](OrgsApi.md#orgs_teams_delete) | **Delete** /orgs/{org}/teams/{team}/ | Delete a specific team in a organization. +[**orgs_teams_list**](OrgsApi.md#orgs_teams_list) | **Get** /orgs/{org}/teams/ | Get the details of all teams within an organization. +[**orgs_teams_members_create**](OrgsApi.md#orgs_teams_members_create) | **Post** /orgs/{org}/teams/{team}/members | Add users to a team. +[**orgs_teams_members_list**](OrgsApi.md#orgs_teams_members_list) | **Get** /orgs/{org}/teams/{team}/members | List all members for the team. +[**orgs_teams_members_update**](OrgsApi.md#orgs_teams_members_update) | **Put** /orgs/{org}/teams/{team}/members | Replace all team members. +[**orgs_teams_partial_update**](OrgsApi.md#orgs_teams_partial_update) | **Patch** /orgs/{org}/teams/{team}/ | Update a specific team in a organization. +[**orgs_teams_read**](OrgsApi.md#orgs_teams_read) | **Get** /orgs/{org}/teams/{team}/ | Get the details of a specific team within an organization. +[**orgs_vulnerability_policy_create**](OrgsApi.md#orgs_vulnerability_policy_create) | **Post** /orgs/{org}/vulnerability-policy/ | Create a package vulnerability policy. +[**orgs_vulnerability_policy_delete**](OrgsApi.md#orgs_vulnerability_policy_delete) | **Delete** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Delete a package vulnerability policy. +[**orgs_vulnerability_policy_evaluation_create**](OrgsApi.md#orgs_vulnerability_policy_evaluation_create) | **Post** /orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/ | Create an evaluation request for this policy. +[**orgs_vulnerability_policy_evaluation_list**](OrgsApi.md#orgs_vulnerability_policy_evaluation_list) | **Get** /orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/ | List evaluation requests for this policy. +[**orgs_vulnerability_policy_evaluation_read**](OrgsApi.md#orgs_vulnerability_policy_evaluation_read) | **Get** /orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/{slug_perm}/ | Retrieve an evaluation request for this policy. +[**orgs_vulnerability_policy_list**](OrgsApi.md#orgs_vulnerability_policy_list) | **Get** /orgs/{org}/vulnerability-policy/ | Get a list of all package vulnerability policies. +[**orgs_vulnerability_policy_partial_update**](OrgsApi.md#orgs_vulnerability_policy_partial_update) | **Patch** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Partially update a package vulnerability policy. +[**orgs_vulnerability_policy_read**](OrgsApi.md#orgs_vulnerability_policy_read) | **Get** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Get a package vulnerability policy. +[**orgs_vulnerability_policy_update**](OrgsApi.md#orgs_vulnerability_policy_update) | **Put** /orgs/{org}/vulnerability-policy/{slug_perm}/ | Update a package vulnerability policy. +[**orgs_vulnerability_policy_violation_list**](OrgsApi.md#orgs_vulnerability_policy_violation_list) | **Get** /orgs/{org}/vulnerability-policy-violation/ | List all current vulnerability policy violations for this Organization. + + +# **orgs_delete** +> orgs_delete(ctx, ctx, org) +Delete the specified organization. + +Delete the specified organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_deny_policy_create** +> ::models::PackageDenyPolicy orgs_deny_policy_create(ctx, ctx, org, optional) +Create a package deny policy. + +Create a package deny policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**PackageDenyPolicyRequest**](PackageDenyPolicyRequest.md)| | + +### Return type + +[**::models::PackageDenyPolicy**](PackageDenyPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_deny_policy_delete** +> orgs_deny_policy_delete(ctx, ctx, org, slug_perm) +Delete a package deny policy. + +Delete a package deny policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_deny_policy_list** +> Vec<::models::PackageDenyPolicy> orgs_deny_policy_list(ctx, ctx, org, optional) +Get a list of all package deny policies. + +Get a list of all package deny policies. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::PackageDenyPolicy>**](PackageDenyPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_deny_policy_partial_update** +> ::models::PackageDenyPolicy orgs_deny_policy_partial_update(ctx, ctx, org, slug_perm, optional) +Partially update a package deny policy. + +Partially update a package deny policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**PackageDenyPolicyRequestPatch**](PackageDenyPolicyRequestPatch.md)| | + +### Return type + +[**::models::PackageDenyPolicy**](PackageDenyPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_deny_policy_read** +> ::models::PackageDenyPolicy orgs_deny_policy_read(ctx, ctx, org, slug_perm) +Get a package deny policy. + +Get a package deny policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::PackageDenyPolicy**](PackageDenyPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_deny_policy_update** +> ::models::PackageDenyPolicy orgs_deny_policy_update(ctx, ctx, org, slug_perm, optional) +Update a package deny policy. + +Update a package deny policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**PackageDenyPolicyRequest**](PackageDenyPolicyRequest.md)| | + +### Return type + +[**::models::PackageDenyPolicy**](PackageDenyPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_invites_create** +> ::models::OrganizationInvite orgs_invites_create(ctx, ctx, org, optional) +Create an organization invite for a specific user + +Create an organization invite for a specific user + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**OrganizationInviteRequest**](OrganizationInviteRequest.md)| | + +### Return type + +[**::models::OrganizationInvite**](OrganizationInvite.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_invites_delete** +> orgs_invites_delete(ctx, ctx, org, slug_perm) +Delete a specific organization invite + +Delete a specific organization invite + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_invites_extend** +> ::models::OrganizationInviteExtend orgs_invites_extend(ctx, ctx, org, slug_perm) +Extend an organization invite. + +Extend an organization invite. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::OrganizationInviteExtend**](OrganizationInviteExtend.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_invites_list** +> Vec<::models::OrganizationInvite> orgs_invites_list(ctx, ctx, org, optional) +Get a list of all invites for an organization. + +Get a list of all invites for an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::OrganizationInvite>**](OrganizationInvite.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_invites_partial_update** +> ::models::OrganizationInvite orgs_invites_partial_update(ctx, ctx, org, slug_perm, optional) +Update a specific organization invite. + +Update a specific organization invite. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**OrganizationInviteUpdateRequestPatch**](OrganizationInviteUpdateRequestPatch.md)| | + +### Return type + +[**::models::OrganizationInvite**](OrganizationInvite.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_invites_resend** +> ::models::OrganizationInviteExtend orgs_invites_resend(ctx, ctx, org, slug_perm) +Resend an organization invite. + +Resend an organization invite. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::OrganizationInviteExtend**](OrganizationInviteExtend.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_create** +> ::models::OrganizationPackageLicensePolicy orgs_license_policy_create(ctx, ctx, org, optional) +Create a package license policy. + +Create a package license policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**OrganizationPackageLicensePolicyRequest**](OrganizationPackageLicensePolicyRequest.md)| | + +### Return type + +[**::models::OrganizationPackageLicensePolicy**](OrganizationPackageLicensePolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_delete** +> orgs_license_policy_delete(ctx, ctx, org, slug_perm) +Delete a package license policy. + +Delete a package license policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_evaluation_create** +> ::models::PackageLicensePolicyEvaluationRequest orgs_license_policy_evaluation_create(ctx, ctx, org, policy_slug_perm, optional) +Create an evaluation request for this policy. + +Create an evaluation request for this policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **policy_slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **policy_slug_perm** | **String**| | + **data** | [**PackageLicensePolicyEvaluationRequestRequest**](PackageLicensePolicyEvaluationRequestRequest.md)| | + +### Return type + +[**::models::PackageLicensePolicyEvaluationRequest**](PackageLicensePolicyEvaluationRequest.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_evaluation_list** +> Vec<::models::PackageLicensePolicyEvaluationRequest> orgs_license_policy_evaluation_list(ctx, ctx, org, policy_slug_perm, optional) +List evaluation requests for this policy. + +List evaluation requests for this policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **policy_slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **policy_slug_perm** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::PackageLicensePolicyEvaluationRequest>**](PackageLicensePolicyEvaluationRequest.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_evaluation_read** +> ::models::PackageLicensePolicyEvaluationRequest orgs_license_policy_evaluation_read(ctx, ctx, org, policy_slug_perm, slug_perm) +Retrieve an evaluation request for this policy. + +Retrieve an evaluation request for this policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **policy_slug_perm** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::PackageLicensePolicyEvaluationRequest**](PackageLicensePolicyEvaluationRequest.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_list** +> Vec<::models::OrganizationPackageLicensePolicy> orgs_license_policy_list(ctx, ctx, org, optional) +Get a list of all package license policies. + +Get a list of all package license policies. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::OrganizationPackageLicensePolicy>**](OrganizationPackageLicensePolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_partial_update** +> ::models::OrganizationPackageLicensePolicy orgs_license_policy_partial_update(ctx, ctx, org, slug_perm, optional) +Partially update a package license policy. + +Partially update a package license policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**OrganizationPackageLicensePolicyRequestPatch**](OrganizationPackageLicensePolicyRequestPatch.md)| | + +### Return type + +[**::models::OrganizationPackageLicensePolicy**](OrganizationPackageLicensePolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_read** +> ::models::OrganizationPackageLicensePolicy orgs_license_policy_read(ctx, ctx, org, slug_perm) +Get a package license policy. + +Get a package license policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::OrganizationPackageLicensePolicy**](OrganizationPackageLicensePolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_update** +> ::models::OrganizationPackageLicensePolicy orgs_license_policy_update(ctx, ctx, org, slug_perm, optional) +Update a package license policy. + +Update a package license policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**OrganizationPackageLicensePolicyRequest**](OrganizationPackageLicensePolicyRequest.md)| | + +### Return type + +[**::models::OrganizationPackageLicensePolicy**](OrganizationPackageLicensePolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_license_policy_violation_list** +> ::models::PackageLicensePolicyViolationLogCursorPage orgs_license_policy_violation_list(ctx, ctx, org, optional) +List all current license policy violations for this Organization. + +List all current license policy violations for this Organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **cursor** | **String**| The pagination cursor value. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**::models::PackageLicensePolicyViolationLogCursorPage**](PackageLicensePolicyViolationLogCursorPage.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_list** +> Vec<::models::Organization> orgs_list(ctx, ctx, optional) +Get a list of all the organizations you are associated with. + +Get a list of all the organizations you are associated with. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::Organization>**](Organization.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_delete** +> orgs_members_delete(ctx, ctx, org, member) +Removes a member from the organization. + +Removes a member from the organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_list** +> Vec<::models::OrganizationMembership> orgs_members_list(ctx, ctx, org, optional) +Get the details for all organization members. + +Get the details for all organization members. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **is_active** | **bool**| Filter for active/inactive users. | [default to false] + **query** | **String**| A search term for querying of members within an Organization.Available options are: email, org, user, userslug, inactive, user_name, role | [default to ] + **sort** | **String**| A field for sorting objects in ascending or descending order. Use `-` prefix for descending order (e.g., `-user_name`). Available options: user_name, role. | [default to user_name] + +### Return type + +[**Vec<::models::OrganizationMembership>**](OrganizationMembership.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_partial_update** +> ::models::OrganizationMembership orgs_members_partial_update(ctx, ctx, org, member, optional) +Views for working with organization members. + +Views for working with organization members. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **member** | **String**| | + **data** | [**OrganizationMembershipRequestPatch**](OrganizationMembershipRequestPatch.md)| | + +### Return type + +[**::models::OrganizationMembership**](OrganizationMembership.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_read** +> ::models::OrganizationMembership orgs_members_read(ctx, ctx, org, member) +Get the details for a specific organization member. + +Get the details for a specific organization member. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + +### Return type + +[**::models::OrganizationMembership**](OrganizationMembership.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_refresh** +> orgs_members_refresh(ctx, ctx, org, member) +Refresh a member of the organization's API key. + +Refresh a member of the organization's API key. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_remove** +> orgs_members_remove(ctx, ctx, org, member) +Removes a member from the organization (deprecated, use DELETE instead). + +Removes a member from the organization (deprecated, use DELETE instead). + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_update_role** +> ::models::OrganizationMembershipRoleUpdate orgs_members_update_role(ctx, ctx, org, member, optional) +Update a member's role in the organization. + +Update a member's role in the organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **member** | **String**| | + **data** | [**OrganizationMembershipRoleUpdateRequestPatch**](OrganizationMembershipRoleUpdateRequestPatch.md)| | + +### Return type + +[**::models::OrganizationMembershipRoleUpdate**](OrganizationMembershipRoleUpdate.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_members_update_visibility** +> ::models::OrganizationMembershipVisibilityUpdate orgs_members_update_visibility(ctx, ctx, org, member, optional) +Update a member's visibility in the organization. + +Update a member's visibility in the organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **member** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **member** | **String**| | + **data** | [**OrganizationMembershipVisibilityUpdateRequestPatch**](OrganizationMembershipVisibilityUpdateRequestPatch.md)| | + +### Return type + +[**::models::OrganizationMembershipVisibilityUpdate**](OrganizationMembershipVisibilityUpdate.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_openid_connect_create** +> ::models::ProviderSettings orgs_openid_connect_create(ctx, ctx, org, optional) +Create the OpenID Connect provider settings for the org. + +Create the OpenID Connect provider settings for the org. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**ProviderSettingsRequest**](ProviderSettingsRequest.md)| | + +### Return type + +[**::models::ProviderSettings**](ProviderSettings.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_openid_connect_delete** +> orgs_openid_connect_delete(ctx, ctx, org, slug_perm) +Delete a specific OpenID Connect provider setting for the org. + +Delete a specific OpenID Connect provider setting for the org. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_openid_connect_list** +> Vec<::models::ProviderSettings> orgs_openid_connect_list(ctx, ctx, org, optional) +Retrieve the list of OpenID Connect provider settings for the org. + +Retrieve the list of OpenID Connect provider settings for the org. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::ProviderSettings>**](ProviderSettings.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_openid_connect_partial_update** +> ::models::ProviderSettings orgs_openid_connect_partial_update(ctx, ctx, org, slug_perm, optional) +Update a specific OpenID Connect provider setting for the org. + +Update a specific OpenID Connect provider setting for the org. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**ProviderSettingsRequestPatch**](ProviderSettingsRequestPatch.md)| | + +### Return type + +[**::models::ProviderSettings**](ProviderSettings.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_openid_connect_read** +> ::models::ProviderSettings orgs_openid_connect_read(ctx, ctx, org, slug_perm) +Retrieve a specific OpenID Connect provider setting for the org. + +Retrieve a specific OpenID Connect provider setting for the org. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::ProviderSettings**](ProviderSettings.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_openid_connect_update** +> ::models::ProviderSettings orgs_openid_connect_update(ctx, ctx, org, slug_perm, optional) +Update a specific OpenID Connect provider setting for the org. + +Update a specific OpenID Connect provider setting for the org. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**ProviderSettingsRequest**](ProviderSettingsRequest.md)| | + +### Return type + +[**::models::ProviderSettings**](ProviderSettings.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_read** +> ::models::Organization orgs_read(ctx, ctx, org) +Get the details for the specific organization. + +Get the details for the specific organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + +### Return type + +[**::models::Organization**](Organization.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_authentication_partial_update** +> ::models::OrganizationSamlAuth orgs_saml_authentication_partial_update(ctx, ctx, org, optional) +Update the SAML Authentication settings for this Organization. + +Update the SAML Authentication settings for this Organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**OrganizationSamlAuthRequestPatch**](OrganizationSamlAuthRequestPatch.md)| | + +### Return type + +[**::models::OrganizationSamlAuth**](OrganizationSAMLAuth.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_authentication_read** +> ::models::OrganizationSamlAuth orgs_saml_authentication_read(ctx, ctx, org) +Retrieve the SAML Authentication settings for this Organization. + +Retrieve the SAML Authentication settings for this Organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + +### Return type + +[**::models::OrganizationSamlAuth**](OrganizationSAMLAuth.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_group_sync_create** +> ::models::OrganizationGroupSync orgs_saml_group_sync_create(ctx, ctx, org, optional) +Create a new SAML Group Sync mapping within an organization. + +Create a new SAML Group Sync mapping within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**OrganizationGroupSyncRequest**](OrganizationGroupSyncRequest.md)| | + +### Return type + +[**::models::OrganizationGroupSync**](OrganizationGroupSync.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_group_sync_delete** +> orgs_saml_group_sync_delete(ctx, ctx, org, slug_perm) +Delete a SAML Group Sync mapping from an organization. + +Delete a SAML Group Sync mapping from an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_group_sync_disable** +> orgs_saml_group_sync_disable(ctx, ctx, org) +Disable SAML Group Sync for this organization. + +Disable SAML Group Sync for this organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_group_sync_enable** +> orgs_saml_group_sync_enable(ctx, ctx, org) +Enable SAML Group Sync for this organization. + +Enable SAML Group Sync for this organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_group_sync_list** +> Vec<::models::OrganizationGroupSync> orgs_saml_group_sync_list(ctx, ctx, org, optional) +Get the details of all SAML Group Sync mapping within an organization. + +Get the details of all SAML Group Sync mapping within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::OrganizationGroupSync>**](OrganizationGroupSync.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_saml_group_sync_status** +> ::models::OrganizationGroupSyncStatus orgs_saml_group_sync_status(ctx, ctx, org) +Retrieve the SAML Group Sync status for this organization. + +Retrieve the SAML Group Sync status for this organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + +### Return type + +[**::models::OrganizationGroupSyncStatus**](OrganizationGroupSyncStatus.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_services_create** +> ::models::Service orgs_services_create(ctx, ctx, org, optional) +Create a service within an organization. + +Create a service within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**ServiceRequest**](ServiceRequest.md)| | + +### Return type + +[**::models::Service**](Service.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_services_delete** +> orgs_services_delete(ctx, ctx, org, service) +Delete a specific service + +Delete a specific service + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **service** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_services_list** +> Vec<::models::Service> orgs_services_list(ctx, ctx, org, optional) +Get a list of all services within an organization. + +Get a list of all services within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::Service>**](Service.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_services_partial_update** +> ::models::Service orgs_services_partial_update(ctx, ctx, org, service, optional) +Update a service within an organization. + +Update a service within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **service** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **service** | **String**| | + **data** | [**ServiceRequestPatch**](ServiceRequestPatch.md)| | + +### Return type + +[**::models::Service**](Service.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_services_read** +> ::models::Service orgs_services_read(ctx, ctx, org, service) +Retrieve details of a single service within an organization. + +Retrieve details of a single service within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **service** | **String**| | + +### Return type + +[**::models::Service**](Service.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_services_refresh** +> ::models::Service orgs_services_refresh(ctx, ctx, org, service) +Refresh service API token. + +Refresh service API token. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **service** | **String**| | + +### Return type + +[**::models::Service**](Service.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_create** +> ::models::OrganizationTeam orgs_teams_create(ctx, ctx, org, optional) +Create a team for this organization. + +Create a team for this organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**OrganizationTeamRequest**](OrganizationTeamRequest.md)| | + +### Return type + +[**::models::OrganizationTeam**](OrganizationTeam.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_delete** +> orgs_teams_delete(ctx, ctx, org, team) +Delete a specific team in a organization. + +Delete a specific team in a organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **team** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_list** +> Vec<::models::OrganizationTeam> orgs_teams_list(ctx, ctx, org, optional) +Get the details of all teams within an organization. + +Get the details of all teams within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::OrganizationTeam>**](OrganizationTeam.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_members_create** +> ::models::OrganizationTeamMembers orgs_teams_members_create(ctx, ctx, org, team, optional) +Add users to a team. + +Add users to a team. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **team** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **team** | **String**| | + **data** | [**OrganizationTeamMembers**](OrganizationTeamMembers.md)| | + +### Return type + +[**::models::OrganizationTeamMembers**](OrganizationTeamMembers.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_members_list** +> ::models::OrganizationTeamMembers orgs_teams_members_list(ctx, ctx, org, team) +List all members for the team. + +List all members for the team. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **team** | **String**| | + +### Return type + +[**::models::OrganizationTeamMembers**](OrganizationTeamMembers.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_members_update** +> ::models::OrganizationTeamMembers orgs_teams_members_update(ctx, ctx, org, team, optional) +Replace all team members. + +Replace all team members. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **team** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **team** | **String**| | + **data** | [**OrganizationTeamMembers**](OrganizationTeamMembers.md)| | + +### Return type + +[**::models::OrganizationTeamMembers**](OrganizationTeamMembers.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_partial_update** +> ::models::OrganizationTeam orgs_teams_partial_update(ctx, ctx, org, team, optional) +Update a specific team in a organization. + +Update a specific team in a organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **team** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **team** | **String**| | + **data** | [**OrganizationTeamRequestPatch**](OrganizationTeamRequestPatch.md)| | + +### Return type + +[**::models::OrganizationTeam**](OrganizationTeam.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_teams_read** +> ::models::OrganizationTeam orgs_teams_read(ctx, ctx, org, team) +Get the details of a specific team within an organization. + +Get the details of a specific team within an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **team** | **String**| | + +### Return type + +[**::models::OrganizationTeam**](OrganizationTeam.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_create** +> ::models::OrganizationPackageVulnerabilityPolicy orgs_vulnerability_policy_create(ctx, ctx, org, optional) +Create a package vulnerability policy. + +Create a package vulnerability policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **data** | [**OrganizationPackageVulnerabilityPolicyRequest**](OrganizationPackageVulnerabilityPolicyRequest.md)| | + +### Return type + +[**::models::OrganizationPackageVulnerabilityPolicy**](OrganizationPackageVulnerabilityPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_delete** +> orgs_vulnerability_policy_delete(ctx, ctx, org, slug_perm) +Delete a package vulnerability policy. + +Delete a package vulnerability policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_evaluation_create** +> ::models::PackageVulnerabilityPolicyEvaluationRequest orgs_vulnerability_policy_evaluation_create(ctx, ctx, org, policy_slug_perm, optional) +Create an evaluation request for this policy. + +Create an evaluation request for this policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **policy_slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **policy_slug_perm** | **String**| | + **data** | [**PackageVulnerabilityPolicyEvaluationRequestRequest**](PackageVulnerabilityPolicyEvaluationRequestRequest.md)| | + +### Return type + +[**::models::PackageVulnerabilityPolicyEvaluationRequest**](PackageVulnerabilityPolicyEvaluationRequest.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_evaluation_list** +> Vec<::models::PackageVulnerabilityPolicyEvaluationRequest> orgs_vulnerability_policy_evaluation_list(ctx, ctx, org, policy_slug_perm, optional) +List evaluation requests for this policy. + +List evaluation requests for this policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **policy_slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **policy_slug_perm** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::PackageVulnerabilityPolicyEvaluationRequest>**](PackageVulnerabilityPolicyEvaluationRequest.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_evaluation_read** +> ::models::PackageVulnerabilityPolicyEvaluationRequest orgs_vulnerability_policy_evaluation_read(ctx, ctx, org, policy_slug_perm, slug_perm) +Retrieve an evaluation request for this policy. + +Retrieve an evaluation request for this policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **policy_slug_perm** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::PackageVulnerabilityPolicyEvaluationRequest**](PackageVulnerabilityPolicyEvaluationRequest.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_list** +> Vec<::models::OrganizationPackageVulnerabilityPolicy> orgs_vulnerability_policy_list(ctx, ctx, org, optional) +Get a list of all package vulnerability policies. + +Get a list of all package vulnerability policies. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::OrganizationPackageVulnerabilityPolicy>**](OrganizationPackageVulnerabilityPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_partial_update** +> ::models::OrganizationPackageVulnerabilityPolicy orgs_vulnerability_policy_partial_update(ctx, ctx, org, slug_perm, optional) +Partially update a package vulnerability policy. + +Partially update a package vulnerability policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**OrganizationPackageVulnerabilityPolicyRequestPatch**](OrganizationPackageVulnerabilityPolicyRequestPatch.md)| | + +### Return type + +[**::models::OrganizationPackageVulnerabilityPolicy**](OrganizationPackageVulnerabilityPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_read** +> ::models::OrganizationPackageVulnerabilityPolicy orgs_vulnerability_policy_read(ctx, ctx, org, slug_perm) +Get a package vulnerability policy. + +Get a package vulnerability policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::OrganizationPackageVulnerabilityPolicy**](OrganizationPackageVulnerabilityPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_update** +> ::models::OrganizationPackageVulnerabilityPolicy orgs_vulnerability_policy_update(ctx, ctx, org, slug_perm, optional) +Update a package vulnerability policy. + +Update a package vulnerability policy. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **slug_perm** | **String**| | + **data** | [**OrganizationPackageVulnerabilityPolicyRequest**](OrganizationPackageVulnerabilityPolicyRequest.md)| | + +### Return type + +[**::models::OrganizationPackageVulnerabilityPolicy**](OrganizationPackageVulnerabilityPolicy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **orgs_vulnerability_policy_violation_list** +> ::models::PackageVulnerabilityPolicyViolationLogCursorPage orgs_vulnerability_policy_violation_list(ctx, ctx, org, optional) +List all current vulnerability policy violations for this Organization. + +List all current vulnerability policy violations for this Organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **org** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| | + **cursor** | **String**| The pagination cursor value. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**::models::PackageVulnerabilityPolicyViolationLogCursorPage**](PackageVulnerabilityPolicyViolationLogCursorPage.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/P2PackageUpload.md b/bindings/rust/src/docs/P2PackageUpload.md new file mode 100644 index 00000000..796074a1 --- /dev/null +++ b/bindings/rust/src/docs/P2PackageUpload.md @@ -0,0 +1,89 @@ +# P2PackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/P2PackageUploadRequest.md b/bindings/rust/src/docs/P2PackageUploadRequest.md new file mode 100644 index 00000000..7042b37b --- /dev/null +++ b/bindings/rust/src/docs/P2PackageUploadRequest.md @@ -0,0 +1,12 @@ +# P2PackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Package.md b/bindings/rust/src/docs/Package.md new file mode 100644 index 00000000..be372227 --- /dev/null +++ b/bindings/rust/src/docs/Package.md @@ -0,0 +1,90 @@ +# Package + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageCopy.md b/bindings/rust/src/docs/PackageCopy.md new file mode 100644 index 00000000..57156125 --- /dev/null +++ b/bindings/rust/src/docs/PackageCopy.md @@ -0,0 +1,90 @@ +# PackageCopy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | The repository the package will be copied to. | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageCopyRequest.md b/bindings/rust/src/docs/PackageCopyRequest.md new file mode 100644 index 00000000..12aa1c6c --- /dev/null +++ b/bindings/rust/src/docs/PackageCopyRequest.md @@ -0,0 +1,11 @@ +# PackageCopyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination** | **String** | | [default to null] +**republish** | **bool** | If true, the package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageDenyPolicy.md b/bindings/rust/src/docs/PackageDenyPolicy.md new file mode 100644 index 00000000..87e2cb2c --- /dev/null +++ b/bindings/rust/src/docs/PackageDenyPolicy.md @@ -0,0 +1,18 @@ +# PackageDenyPolicy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **String** | | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**description** | **String** | | [optional] [default to null] +**enabled** | **bool** | Whether this rule is enabled or disabled. | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**package_query_string** | **String** | Packages that match this query will trigger this deny rule. | [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**status** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageDenyPolicyRequest.md b/bindings/rust/src/docs/PackageDenyPolicyRequest.md new file mode 100644 index 00000000..4e2dfac8 --- /dev/null +++ b/bindings/rust/src/docs/PackageDenyPolicyRequest.md @@ -0,0 +1,13 @@ +# PackageDenyPolicyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] [default to null] +**enabled** | **bool** | Whether this rule is enabled or disabled. | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**package_query_string** | **String** | Packages that match this query will trigger this deny rule. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageDenyPolicyRequestPatch.md b/bindings/rust/src/docs/PackageDenyPolicyRequestPatch.md new file mode 100644 index 00000000..fd6e2e61 --- /dev/null +++ b/bindings/rust/src/docs/PackageDenyPolicyRequestPatch.md @@ -0,0 +1,13 @@ +# PackageDenyPolicyRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] [default to null] +**enabled** | **bool** | Whether this rule is enabled or disabled. | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**package_query_string** | **String** | Packages that match this query will trigger this deny rule. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageDependencies.md b/bindings/rust/src/docs/PackageDependencies.md new file mode 100644 index 00000000..dbc806a8 --- /dev/null +++ b/bindings/rust/src/docs/PackageDependencies.md @@ -0,0 +1,10 @@ +# PackageDependencies + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dependencies** | [**Vec<::models::PackageDependency>**](PackageDependency.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageDependency.md b/bindings/rust/src/docs/PackageDependency.md new file mode 100644 index 00000000..771dec32 --- /dev/null +++ b/bindings/rust/src/docs/PackageDependency.md @@ -0,0 +1,13 @@ +# PackageDependency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dep_type** | **String** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**operator** | **String** | | [optional] [default to null] +**version** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageFile.md b/bindings/rust/src/docs/PackageFile.md new file mode 100644 index 00000000..8cb2853b --- /dev/null +++ b/bindings/rust/src/docs/PackageFile.md @@ -0,0 +1,23 @@ +# PackageFile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_primary** | **bool** | | [optional] [default to null] +**is_synchronised** | **bool** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the file. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**tag** | **String** | Freeform descriptor that describes what the file is. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageFilePartsUpload.md b/bindings/rust/src/docs/PackageFilePartsUpload.md new file mode 100644 index 00000000..5a678d9c --- /dev/null +++ b/bindings/rust/src/docs/PackageFilePartsUpload.md @@ -0,0 +1,12 @@ +# PackageFilePartsUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **String** | The identifier for the file to use uploading parts. | [optional] [default to null] +**upload_querystring** | **String** | The querystring to use for the next-step PUT upload. | [optional] [default to null] +**upload_url** | **String** | The URL to use for the next-step PUT upload | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageFileUpload.md b/bindings/rust/src/docs/PackageFileUpload.md new file mode 100644 index 00000000..28533c25 --- /dev/null +++ b/bindings/rust/src/docs/PackageFileUpload.md @@ -0,0 +1,14 @@ +# PackageFileUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **String** | The identifier for the file to use when creating packages | [optional] [default to null] +**upload_fields** | [***Value**](Value.md) | The dictionary of fields that must be sent with POST uploads | [optional] [default to null] +**upload_headers** | [***Value**](Value.md) | The dictionary of headers that must be sent with uploads | [optional] [default to null] +**upload_querystring** | **String** | The querystring to use for the next-step POST or PUT upload | [optional] [default to null] +**upload_url** | **String** | The URL to use for the next-step POST or PUT upload | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageFileUploadRequest.md b/bindings/rust/src/docs/PackageFileUploadRequest.md new file mode 100644 index 00000000..7ea2bb8a --- /dev/null +++ b/bindings/rust/src/docs/PackageFileUploadRequest.md @@ -0,0 +1,13 @@ +# PackageFileUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **String** | Filename for the package file upload. | [default to null] +**md5_checksum** | **String** | MD5 checksum for a POST-based package file upload. | [optional] [default to null] +**method** | **String** | The method to use for package file upload. | [optional] [default to null] +**sha256_checksum** | **String** | SHA256 checksum for a PUT-based package file upload. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageLicensePolicyEvaluationRequest.md b/bindings/rust/src/docs/PackageLicensePolicyEvaluationRequest.md new file mode 100644 index 00000000..4432b8aa --- /dev/null +++ b/bindings/rust/src/docs/PackageLicensePolicyEvaluationRequest.md @@ -0,0 +1,16 @@ +# PackageLicensePolicyEvaluationRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | [optional] [default to null] +**evaluation_count** | **i32** | | [optional] [default to null] +**policy** | [***::models::NestedLicensePolicy**](NestedLicensePolicy.md) | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**status** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**violation_count** | **i32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageLicensePolicyEvaluationRequestRequest.md b/bindings/rust/src/docs/PackageLicensePolicyEvaluationRequestRequest.md new file mode 100644 index 00000000..f9b58c90 --- /dev/null +++ b/bindings/rust/src/docs/PackageLicensePolicyEvaluationRequestRequest.md @@ -0,0 +1,9 @@ +# PackageLicensePolicyEvaluationRequestRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageLicensePolicyViolationLog.md b/bindings/rust/src/docs/PackageLicensePolicyViolationLog.md new file mode 100644 index 00000000..7891174a --- /dev/null +++ b/bindings/rust/src/docs/PackageLicensePolicyViolationLog.md @@ -0,0 +1,13 @@ +# PackageLicensePolicyViolationLog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_at** | **String** | | [optional] [default to null] +**package** | [***::models::PackageVulnerability**](PackageVulnerability.md) | | [default to null] +**policy** | [***::models::NestedLicensePolicy**](NestedLicensePolicy.md) | | [default to null] +**reasons** | **Vec** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageLicensePolicyViolationLogCursorPage.md b/bindings/rust/src/docs/PackageLicensePolicyViolationLogCursorPage.md new file mode 100644 index 00000000..d4aa093f --- /dev/null +++ b/bindings/rust/src/docs/PackageLicensePolicyViolationLogCursorPage.md @@ -0,0 +1,12 @@ +# PackageLicensePolicyViolationLogCursorPage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **String** | | [optional] [default to null] +**previous** | **String** | | [optional] [default to null] +**results** | [**Vec<::models::PackageLicensePolicyViolationLog>**](PackageLicensePolicyViolationLog.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageMove.md b/bindings/rust/src/docs/PackageMove.md new file mode 100644 index 00000000..969a6204 --- /dev/null +++ b/bindings/rust/src/docs/PackageMove.md @@ -0,0 +1,90 @@ +# PackageMove + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | The repository the package will be moved to. | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageMoveRequest.md b/bindings/rust/src/docs/PackageMoveRequest.md new file mode 100644 index 00000000..e61e80d2 --- /dev/null +++ b/bindings/rust/src/docs/PackageMoveRequest.md @@ -0,0 +1,10 @@ +# PackageMoveRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageQuarantine.md b/bindings/rust/src/docs/PackageQuarantine.md new file mode 100644 index 00000000..1270032f --- /dev/null +++ b/bindings/rust/src/docs/PackageQuarantine.md @@ -0,0 +1,89 @@ +# PackageQuarantine + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageQuarantineRequest.md b/bindings/rust/src/docs/PackageQuarantineRequest.md new file mode 100644 index 00000000..c7d4ef9b --- /dev/null +++ b/bindings/rust/src/docs/PackageQuarantineRequest.md @@ -0,0 +1,11 @@ +# PackageQuarantineRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**release** | **bool** | If true, the package is released from quarantine. | [optional] [default to null] +**restore** | **bool** | If true, the package is released from quarantine. Note: This field is deprecated, please use 'release' instead. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageResync.md b/bindings/rust/src/docs/PackageResync.md new file mode 100644 index 00000000..0800a806 --- /dev/null +++ b/bindings/rust/src/docs/PackageResync.md @@ -0,0 +1,90 @@ +# PackageResync + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageStatus.md b/bindings/rust/src/docs/PackageStatus.md new file mode 100644 index 00000000..f83cb570 --- /dev/null +++ b/bindings/rust/src/docs/PackageStatus.md @@ -0,0 +1,33 @@ +# PackageStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageTag.md b/bindings/rust/src/docs/PackageTag.md new file mode 100644 index 00000000..91e64d91 --- /dev/null +++ b/bindings/rust/src/docs/PackageTag.md @@ -0,0 +1,90 @@ +# PackageTag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_immutable** | **bool** | If true, created tags will be immutable. An immutable flag is a tag that cannot be removed from a package. | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageTagRequest.md b/bindings/rust/src/docs/PackageTagRequest.md new file mode 100644 index 00000000..b397a296 --- /dev/null +++ b/bindings/rust/src/docs/PackageTagRequest.md @@ -0,0 +1,12 @@ +# PackageTagRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **String** | | [optional] [default to null] +**is_immutable** | **bool** | If true, created tags will be immutable. An immutable flag is a tag that cannot be removed from a package. | [optional] [default to null] +**tags** | **Vec** | A list of tags to apply the action to. Not required for clears. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageUsageMetrics.md b/bindings/rust/src/docs/PackageUsageMetrics.md new file mode 100644 index 00000000..2e7d27c2 --- /dev/null +++ b/bindings/rust/src/docs/PackageUsageMetrics.md @@ -0,0 +1,10 @@ +# PackageUsageMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**packages** | [***::models::CommonMetrics**](CommonMetrics.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageVersionBadge.md b/bindings/rust/src/docs/PackageVersionBadge.md new file mode 100644 index 00000000..1940e6ab --- /dev/null +++ b/bindings/rust/src/docs/PackageVersionBadge.md @@ -0,0 +1,9 @@ +# PackageVersionBadge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageVulnerability.md b/bindings/rust/src/docs/PackageVulnerability.md new file mode 100644 index 00000000..6ceaac2f --- /dev/null +++ b/bindings/rust/src/docs/PackageVulnerability.md @@ -0,0 +1,13 @@ +# PackageVulnerability + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **String** | | [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageVulnerabilityPolicyEvaluationRequest.md b/bindings/rust/src/docs/PackageVulnerabilityPolicyEvaluationRequest.md new file mode 100644 index 00000000..61288fce --- /dev/null +++ b/bindings/rust/src/docs/PackageVulnerabilityPolicyEvaluationRequest.md @@ -0,0 +1,16 @@ +# PackageVulnerabilityPolicyEvaluationRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | [optional] [default to null] +**evaluation_count** | **i32** | | [optional] [default to null] +**policy** | [***::models::NestedVulnerabilityPolicy**](NestedVulnerabilityPolicy.md) | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**status** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**violation_count** | **i32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageVulnerabilityPolicyEvaluationRequestRequest.md b/bindings/rust/src/docs/PackageVulnerabilityPolicyEvaluationRequestRequest.md new file mode 100644 index 00000000..9d3d05ff --- /dev/null +++ b/bindings/rust/src/docs/PackageVulnerabilityPolicyEvaluationRequestRequest.md @@ -0,0 +1,9 @@ +# PackageVulnerabilityPolicyEvaluationRequestRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageVulnerabilityPolicyViolationLog.md b/bindings/rust/src/docs/PackageVulnerabilityPolicyViolationLog.md new file mode 100644 index 00000000..c75b7140 --- /dev/null +++ b/bindings/rust/src/docs/PackageVulnerabilityPolicyViolationLog.md @@ -0,0 +1,14 @@ +# PackageVulnerabilityPolicyViolationLog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_at** | **String** | | [optional] [default to null] +**package** | [***::models::PackageVulnerability**](PackageVulnerability.md) | | [default to null] +**policy** | [***::models::NestedVulnerabilityPolicy**](NestedVulnerabilityPolicy.md) | | [default to null] +**reasons** | **Vec** | | [default to null] +**vulnerability_scan_results** | [***::models::NestedVulnerabilityScanResults**](NestedVulnerabilityScanResults.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackageVulnerabilityPolicyViolationLogCursorPage.md b/bindings/rust/src/docs/PackageVulnerabilityPolicyViolationLogCursorPage.md new file mode 100644 index 00000000..73a17263 --- /dev/null +++ b/bindings/rust/src/docs/PackageVulnerabilityPolicyViolationLogCursorPage.md @@ -0,0 +1,12 @@ +# PackageVulnerabilityPolicyViolationLogCursorPage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **String** | | [optional] [default to null] +**previous** | **String** | | [optional] [default to null] +**results** | [**Vec<::models::PackageVulnerabilityPolicyViolationLog>**](PackageVulnerabilityPolicyViolationLog.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PackagesApi.md b/bindings/rust/src/docs/PackagesApi.md new file mode 100644 index 00000000..589307d8 --- /dev/null +++ b/bindings/rust/src/docs/PackagesApi.md @@ -0,0 +1,2466 @@ +# \PackagesApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**packages_copy**](PackagesApi.md#packages_copy) | **Post** /packages/{owner}/{repo}/{identifier}/copy/ | Copy a package to another repository. +[**packages_delete**](PackagesApi.md#packages_delete) | **Delete** /packages/{owner}/{repo}/{identifier}/ | Delete a specific package in a repository. +[**packages_dependencies**](PackagesApi.md#packages_dependencies) | **Get** /packages/{owner}/{repo}/{identifier}/dependencies/ | Get the list of dependencies for a package. Transitive dependencies are included where supported. +[**packages_list**](PackagesApi.md#packages_list) | **Get** /packages/{owner}/{repo}/ | Get a list of all packages associated with repository. +[**packages_move**](PackagesApi.md#packages_move) | **Post** /packages/{owner}/{repo}/{identifier}/move/ | Move a package to another repository. +[**packages_quarantine**](PackagesApi.md#packages_quarantine) | **Post** /packages/{owner}/{repo}/{identifier}/quarantine/ | Quarantine or release a package. +[**packages_read**](PackagesApi.md#packages_read) | **Get** /packages/{owner}/{repo}/{identifier}/ | Get a specific package in a repository. +[**packages_resync**](PackagesApi.md#packages_resync) | **Post** /packages/{owner}/{repo}/{identifier}/resync/ | Schedule a package for resynchronisation. +[**packages_scan**](PackagesApi.md#packages_scan) | **Post** /packages/{owner}/{repo}/{identifier}/scan/ | Schedule a package for scanning. +[**packages_status**](PackagesApi.md#packages_status) | **Get** /packages/{owner}/{repo}/{identifier}/status/ | Get the synchronization status for a package. +[**packages_tag**](PackagesApi.md#packages_tag) | **Post** /packages/{owner}/{repo}/{identifier}/tag/ | Add/Replace/Remove tags for a package. +[**packages_upload_alpine**](PackagesApi.md#packages_upload_alpine) | **Post** /packages/{owner}/{repo}/upload/alpine/ | Create a new Alpine package +[**packages_upload_cargo**](PackagesApi.md#packages_upload_cargo) | **Post** /packages/{owner}/{repo}/upload/cargo/ | Create a new Cargo package +[**packages_upload_cocoapods**](PackagesApi.md#packages_upload_cocoapods) | **Post** /packages/{owner}/{repo}/upload/cocoapods/ | Create a new CocoaPods package +[**packages_upload_composer**](PackagesApi.md#packages_upload_composer) | **Post** /packages/{owner}/{repo}/upload/composer/ | Create a new Composer package +[**packages_upload_conan**](PackagesApi.md#packages_upload_conan) | **Post** /packages/{owner}/{repo}/upload/conan/ | Create a new Conan package +[**packages_upload_conda**](PackagesApi.md#packages_upload_conda) | **Post** /packages/{owner}/{repo}/upload/conda/ | Create a new Conda package +[**packages_upload_cran**](PackagesApi.md#packages_upload_cran) | **Post** /packages/{owner}/{repo}/upload/cran/ | Create a new CRAN package +[**packages_upload_dart**](PackagesApi.md#packages_upload_dart) | **Post** /packages/{owner}/{repo}/upload/dart/ | Create a new Dart package +[**packages_upload_deb**](PackagesApi.md#packages_upload_deb) | **Post** /packages/{owner}/{repo}/upload/deb/ | Create a new Debian package +[**packages_upload_docker**](PackagesApi.md#packages_upload_docker) | **Post** /packages/{owner}/{repo}/upload/docker/ | Create a new Docker package +[**packages_upload_go**](PackagesApi.md#packages_upload_go) | **Post** /packages/{owner}/{repo}/upload/go/ | Create a new Go package +[**packages_upload_helm**](PackagesApi.md#packages_upload_helm) | **Post** /packages/{owner}/{repo}/upload/helm/ | Create a new Helm package +[**packages_upload_hex**](PackagesApi.md#packages_upload_hex) | **Post** /packages/{owner}/{repo}/upload/hex/ | Create a new Hex package +[**packages_upload_luarocks**](PackagesApi.md#packages_upload_luarocks) | **Post** /packages/{owner}/{repo}/upload/luarocks/ | Create a new LuaRocks package +[**packages_upload_maven**](PackagesApi.md#packages_upload_maven) | **Post** /packages/{owner}/{repo}/upload/maven/ | Create a new Maven package +[**packages_upload_npm**](PackagesApi.md#packages_upload_npm) | **Post** /packages/{owner}/{repo}/upload/npm/ | Create a new npm package +[**packages_upload_nuget**](PackagesApi.md#packages_upload_nuget) | **Post** /packages/{owner}/{repo}/upload/nuget/ | Create a new NuGet package +[**packages_upload_p2**](PackagesApi.md#packages_upload_p2) | **Post** /packages/{owner}/{repo}/upload/p2/ | Create a new P2 package +[**packages_upload_python**](PackagesApi.md#packages_upload_python) | **Post** /packages/{owner}/{repo}/upload/python/ | Create a new Python package +[**packages_upload_raw**](PackagesApi.md#packages_upload_raw) | **Post** /packages/{owner}/{repo}/upload/raw/ | Create a new Raw package +[**packages_upload_rpm**](PackagesApi.md#packages_upload_rpm) | **Post** /packages/{owner}/{repo}/upload/rpm/ | Create a new RedHat package +[**packages_upload_ruby**](PackagesApi.md#packages_upload_ruby) | **Post** /packages/{owner}/{repo}/upload/ruby/ | Create a new Ruby package +[**packages_upload_swift**](PackagesApi.md#packages_upload_swift) | **Post** /packages/{owner}/{repo}/upload/swift/ | Create a new Swift package +[**packages_upload_terraform**](PackagesApi.md#packages_upload_terraform) | **Post** /packages/{owner}/{repo}/upload/terraform/ | Create a new Terraform package +[**packages_upload_vagrant**](PackagesApi.md#packages_upload_vagrant) | **Post** /packages/{owner}/{repo}/upload/vagrant/ | Create a new Vagrant package +[**packages_validate_upload_alpine**](PackagesApi.md#packages_validate_upload_alpine) | **Post** /packages/{owner}/{repo}/validate-upload/alpine/ | Validate parameters for create Alpine package +[**packages_validate_upload_cargo**](PackagesApi.md#packages_validate_upload_cargo) | **Post** /packages/{owner}/{repo}/validate-upload/cargo/ | Validate parameters for create Cargo package +[**packages_validate_upload_cocoapods**](PackagesApi.md#packages_validate_upload_cocoapods) | **Post** /packages/{owner}/{repo}/validate-upload/cocoapods/ | Validate parameters for create CocoaPods package +[**packages_validate_upload_composer**](PackagesApi.md#packages_validate_upload_composer) | **Post** /packages/{owner}/{repo}/validate-upload/composer/ | Validate parameters for create Composer package +[**packages_validate_upload_conan**](PackagesApi.md#packages_validate_upload_conan) | **Post** /packages/{owner}/{repo}/validate-upload/conan/ | Validate parameters for create Conan package +[**packages_validate_upload_conda**](PackagesApi.md#packages_validate_upload_conda) | **Post** /packages/{owner}/{repo}/validate-upload/conda/ | Validate parameters for create Conda package +[**packages_validate_upload_cran**](PackagesApi.md#packages_validate_upload_cran) | **Post** /packages/{owner}/{repo}/validate-upload/cran/ | Validate parameters for create CRAN package +[**packages_validate_upload_dart**](PackagesApi.md#packages_validate_upload_dart) | **Post** /packages/{owner}/{repo}/validate-upload/dart/ | Validate parameters for create Dart package +[**packages_validate_upload_deb**](PackagesApi.md#packages_validate_upload_deb) | **Post** /packages/{owner}/{repo}/validate-upload/deb/ | Validate parameters for create Debian package +[**packages_validate_upload_docker**](PackagesApi.md#packages_validate_upload_docker) | **Post** /packages/{owner}/{repo}/validate-upload/docker/ | Validate parameters for create Docker package +[**packages_validate_upload_go**](PackagesApi.md#packages_validate_upload_go) | **Post** /packages/{owner}/{repo}/validate-upload/go/ | Validate parameters for create Go package +[**packages_validate_upload_helm**](PackagesApi.md#packages_validate_upload_helm) | **Post** /packages/{owner}/{repo}/validate-upload/helm/ | Validate parameters for create Helm package +[**packages_validate_upload_hex**](PackagesApi.md#packages_validate_upload_hex) | **Post** /packages/{owner}/{repo}/validate-upload/hex/ | Validate parameters for create Hex package +[**packages_validate_upload_luarocks**](PackagesApi.md#packages_validate_upload_luarocks) | **Post** /packages/{owner}/{repo}/validate-upload/luarocks/ | Validate parameters for create LuaRocks package +[**packages_validate_upload_maven**](PackagesApi.md#packages_validate_upload_maven) | **Post** /packages/{owner}/{repo}/validate-upload/maven/ | Validate parameters for create Maven package +[**packages_validate_upload_npm**](PackagesApi.md#packages_validate_upload_npm) | **Post** /packages/{owner}/{repo}/validate-upload/npm/ | Validate parameters for create npm package +[**packages_validate_upload_nuget**](PackagesApi.md#packages_validate_upload_nuget) | **Post** /packages/{owner}/{repo}/validate-upload/nuget/ | Validate parameters for create NuGet package +[**packages_validate_upload_p2**](PackagesApi.md#packages_validate_upload_p2) | **Post** /packages/{owner}/{repo}/validate-upload/p2/ | Validate parameters for create P2 package +[**packages_validate_upload_python**](PackagesApi.md#packages_validate_upload_python) | **Post** /packages/{owner}/{repo}/validate-upload/python/ | Validate parameters for create Python package +[**packages_validate_upload_raw**](PackagesApi.md#packages_validate_upload_raw) | **Post** /packages/{owner}/{repo}/validate-upload/raw/ | Validate parameters for create Raw package +[**packages_validate_upload_rpm**](PackagesApi.md#packages_validate_upload_rpm) | **Post** /packages/{owner}/{repo}/validate-upload/rpm/ | Validate parameters for create RedHat package +[**packages_validate_upload_ruby**](PackagesApi.md#packages_validate_upload_ruby) | **Post** /packages/{owner}/{repo}/validate-upload/ruby/ | Validate parameters for create Ruby package +[**packages_validate_upload_swift**](PackagesApi.md#packages_validate_upload_swift) | **Post** /packages/{owner}/{repo}/validate-upload/swift/ | Validate parameters for create Swift package +[**packages_validate_upload_terraform**](PackagesApi.md#packages_validate_upload_terraform) | **Post** /packages/{owner}/{repo}/validate-upload/terraform/ | Validate parameters for create Terraform package +[**packages_validate_upload_vagrant**](PackagesApi.md#packages_validate_upload_vagrant) | **Post** /packages/{owner}/{repo}/validate-upload/vagrant/ | Validate parameters for create Vagrant package + + +# **packages_copy** +> ::models::PackageCopy packages_copy(ctx, ctx, owner, repo, identifier, optional) +Copy a package to another repository. + +Copy a package to another repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**PackageCopyRequest**](PackageCopyRequest.md)| | + +### Return type + +[**::models::PackageCopy**](PackageCopy.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_delete** +> packages_delete(ctx, ctx, owner, repo, identifier) +Delete a specific package in a repository. + +Delete a specific package in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_dependencies** +> ::models::PackageDependencies packages_dependencies(ctx, ctx, owner, repo, identifier) +Get the list of dependencies for a package. Transitive dependencies are included where supported. + +Get the list of dependencies for a package. Transitive dependencies are included where supported. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::PackageDependencies**](PackageDependencies.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_list** +> Vec<::models::Package> packages_list(ctx, ctx, owner, repo, optional) +Get a list of all packages associated with repository. + +Get a list of all packages associated with repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + **query** | **String**| A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages. | [default to ] + **sort** | **String**| A field for sorting objects in ascending or descending order. | [default to -date] + +### Return type + +[**Vec<::models::Package>**](Package.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_move** +> ::models::PackageMove packages_move(ctx, ctx, owner, repo, identifier, optional) +Move a package to another repository. + +Move a package to another repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**PackageMoveRequest**](PackageMoveRequest.md)| | + +### Return type + +[**::models::PackageMove**](PackageMove.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_quarantine** +> ::models::PackageQuarantine packages_quarantine(ctx, ctx, owner, repo, identifier, optional) +Quarantine or release a package. + +Quarantine or release a package. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**PackageQuarantineRequest**](PackageQuarantineRequest.md)| | + +### Return type + +[**::models::PackageQuarantine**](PackageQuarantine.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_read** +> ::models::Package packages_read(ctx, ctx, owner, repo, identifier) +Get a specific package in a repository. + +Get a specific package in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::Package**](Package.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_resync** +> ::models::PackageResync packages_resync(ctx, ctx, owner, repo, identifier) +Schedule a package for resynchronisation. + +Schedule a package for resynchronisation. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::PackageResync**](PackageResync.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_scan** +> ::models::Package packages_scan(ctx, ctx, owner, repo, identifier) +Schedule a package for scanning. + +Schedule a package for scanning. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::Package**](Package.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_status** +> ::models::PackageStatus packages_status(ctx, ctx, owner, repo, identifier) +Get the synchronization status for a package. + +Get the synchronization status for a package. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::PackageStatus**](PackageStatus.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_tag** +> ::models::Package packages_tag(ctx, ctx, owner, repo, identifier, optional) +Add/Replace/Remove tags for a package. + +Add/Replace/Remove tags for a package. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**PackageTagRequest**](PackageTagRequest.md)| | + +### Return type + +[**::models::Package**](Package.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_alpine** +> ::models::AlpinePackageUpload packages_upload_alpine(ctx, ctx, owner, repo, optional) +Create a new Alpine package + +Create a new Alpine package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**AlpinePackageUploadRequest**](AlpinePackageUploadRequest.md)| | + +### Return type + +[**::models::AlpinePackageUpload**](AlpinePackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_cargo** +> ::models::CargoPackageUpload packages_upload_cargo(ctx, ctx, owner, repo, optional) +Create a new Cargo package + +Create a new Cargo package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CargoPackageUploadRequest**](CargoPackageUploadRequest.md)| | + +### Return type + +[**::models::CargoPackageUpload**](CargoPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_cocoapods** +> ::models::CocoapodsPackageUpload packages_upload_cocoapods(ctx, ctx, owner, repo, optional) +Create a new CocoaPods package + +Create a new CocoaPods package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CocoapodsPackageUploadRequest**](CocoapodsPackageUploadRequest.md)| | + +### Return type + +[**::models::CocoapodsPackageUpload**](CocoapodsPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_composer** +> ::models::ComposerPackageUpload packages_upload_composer(ctx, ctx, owner, repo, optional) +Create a new Composer package + +Create a new Composer package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**ComposerPackageUploadRequest**](ComposerPackageUploadRequest.md)| | + +### Return type + +[**::models::ComposerPackageUpload**](ComposerPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_conan** +> ::models::ConanPackageUpload packages_upload_conan(ctx, ctx, owner, repo, optional) +Create a new Conan package + +Create a new Conan package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**ConanPackageUploadRequest**](ConanPackageUploadRequest.md)| | + +### Return type + +[**::models::ConanPackageUpload**](ConanPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_conda** +> ::models::CondaPackageUpload packages_upload_conda(ctx, ctx, owner, repo, optional) +Create a new Conda package + +Create a new Conda package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CondaPackageUploadRequest**](CondaPackageUploadRequest.md)| | + +### Return type + +[**::models::CondaPackageUpload**](CondaPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_cran** +> ::models::CranPackageUpload packages_upload_cran(ctx, ctx, owner, repo, optional) +Create a new CRAN package + +Create a new CRAN package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CranPackageUploadRequest**](CranPackageUploadRequest.md)| | + +### Return type + +[**::models::CranPackageUpload**](CranPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_dart** +> ::models::DartPackageUpload packages_upload_dart(ctx, ctx, owner, repo, optional) +Create a new Dart package + +Create a new Dart package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**DartPackageUploadRequest**](DartPackageUploadRequest.md)| | + +### Return type + +[**::models::DartPackageUpload**](DartPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_deb** +> ::models::DebPackageUpload packages_upload_deb(ctx, ctx, owner, repo, optional) +Create a new Debian package + +Create a new Debian package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**DebPackageUploadRequest**](DebPackageUploadRequest.md)| | + +### Return type + +[**::models::DebPackageUpload**](DebPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_docker** +> ::models::DockerPackageUpload packages_upload_docker(ctx, ctx, owner, repo, optional) +Create a new Docker package + +Create a new Docker package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**DockerPackageUploadRequest**](DockerPackageUploadRequest.md)| | + +### Return type + +[**::models::DockerPackageUpload**](DockerPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_go** +> ::models::GoPackageUpload packages_upload_go(ctx, ctx, owner, repo, optional) +Create a new Go package + +Create a new Go package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**GoPackageUploadRequest**](GoPackageUploadRequest.md)| | + +### Return type + +[**::models::GoPackageUpload**](GoPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_helm** +> ::models::HelmPackageUpload packages_upload_helm(ctx, ctx, owner, repo, optional) +Create a new Helm package + +Create a new Helm package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**HelmPackageUploadRequest**](HelmPackageUploadRequest.md)| | + +### Return type + +[**::models::HelmPackageUpload**](HelmPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_hex** +> ::models::HexPackageUpload packages_upload_hex(ctx, ctx, owner, repo, optional) +Create a new Hex package + +Create a new Hex package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**HexPackageUploadRequest**](HexPackageUploadRequest.md)| | + +### Return type + +[**::models::HexPackageUpload**](HexPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_luarocks** +> ::models::LuarocksPackageUpload packages_upload_luarocks(ctx, ctx, owner, repo, optional) +Create a new LuaRocks package + +Create a new LuaRocks package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**LuarocksPackageUploadRequest**](LuarocksPackageUploadRequest.md)| | + +### Return type + +[**::models::LuarocksPackageUpload**](LuarocksPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_maven** +> ::models::MavenPackageUpload packages_upload_maven(ctx, ctx, owner, repo, optional) +Create a new Maven package + +Create a new Maven package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**MavenPackageUploadRequest**](MavenPackageUploadRequest.md)| | + +### Return type + +[**::models::MavenPackageUpload**](MavenPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_npm** +> ::models::NpmPackageUpload packages_upload_npm(ctx, ctx, owner, repo, optional) +Create a new npm package + +Create a new npm package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**NpmPackageUploadRequest**](NpmPackageUploadRequest.md)| | + +### Return type + +[**::models::NpmPackageUpload**](NpmPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_nuget** +> ::models::NugetPackageUpload packages_upload_nuget(ctx, ctx, owner, repo, optional) +Create a new NuGet package + +Create a new NuGet package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**NugetPackageUploadRequest**](NugetPackageUploadRequest.md)| | + +### Return type + +[**::models::NugetPackageUpload**](NugetPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_p2** +> ::models::P2PackageUpload packages_upload_p2(ctx, ctx, owner, repo, optional) +Create a new P2 package + +Create a new P2 package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**P2PackageUploadRequest**](P2PackageUploadRequest.md)| | + +### Return type + +[**::models::P2PackageUpload**](P2PackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_python** +> ::models::PythonPackageUpload packages_upload_python(ctx, ctx, owner, repo, optional) +Create a new Python package + +Create a new Python package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**PythonPackageUploadRequest**](PythonPackageUploadRequest.md)| | + +### Return type + +[**::models::PythonPackageUpload**](PythonPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_raw** +> ::models::RawPackageUpload packages_upload_raw(ctx, ctx, owner, repo, optional) +Create a new Raw package + +Create a new Raw package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RawPackageUploadRequest**](RawPackageUploadRequest.md)| | + +### Return type + +[**::models::RawPackageUpload**](RawPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_rpm** +> ::models::RpmPackageUpload packages_upload_rpm(ctx, ctx, owner, repo, optional) +Create a new RedHat package + +Create a new RedHat package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RpmPackageUploadRequest**](RpmPackageUploadRequest.md)| | + +### Return type + +[**::models::RpmPackageUpload**](RpmPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_ruby** +> ::models::RubyPackageUpload packages_upload_ruby(ctx, ctx, owner, repo, optional) +Create a new Ruby package + +Create a new Ruby package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RubyPackageUploadRequest**](RubyPackageUploadRequest.md)| | + +### Return type + +[**::models::RubyPackageUpload**](RubyPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_swift** +> ::models::SwiftPackageUpload packages_upload_swift(ctx, ctx, owner, repo, optional) +Create a new Swift package + +Create a new Swift package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**SwiftPackageUploadRequest**](SwiftPackageUploadRequest.md)| | + +### Return type + +[**::models::SwiftPackageUpload**](SwiftPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_terraform** +> ::models::TerraformPackageUpload packages_upload_terraform(ctx, ctx, owner, repo, optional) +Create a new Terraform package + +Create a new Terraform package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**TerraformPackageUploadRequest**](TerraformPackageUploadRequest.md)| | + +### Return type + +[**::models::TerraformPackageUpload**](TerraformPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_upload_vagrant** +> ::models::VagrantPackageUpload packages_upload_vagrant(ctx, ctx, owner, repo, optional) +Create a new Vagrant package + +Create a new Vagrant package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**VagrantPackageUploadRequest**](VagrantPackageUploadRequest.md)| | + +### Return type + +[**::models::VagrantPackageUpload**](VagrantPackageUpload.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_alpine** +> packages_validate_upload_alpine(ctx, ctx, owner, repo, optional) +Validate parameters for create Alpine package + +Validate parameters for create Alpine package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**AlpinePackageUploadRequest**](AlpinePackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_cargo** +> packages_validate_upload_cargo(ctx, ctx, owner, repo, optional) +Validate parameters for create Cargo package + +Validate parameters for create Cargo package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CargoPackageUploadRequest**](CargoPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_cocoapods** +> packages_validate_upload_cocoapods(ctx, ctx, owner, repo, optional) +Validate parameters for create CocoaPods package + +Validate parameters for create CocoaPods package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CocoapodsPackageUploadRequest**](CocoapodsPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_composer** +> packages_validate_upload_composer(ctx, ctx, owner, repo, optional) +Validate parameters for create Composer package + +Validate parameters for create Composer package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**ComposerPackageUploadRequest**](ComposerPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_conan** +> packages_validate_upload_conan(ctx, ctx, owner, repo, optional) +Validate parameters for create Conan package + +Validate parameters for create Conan package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**ConanPackageUploadRequest**](ConanPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_conda** +> packages_validate_upload_conda(ctx, ctx, owner, repo, optional) +Validate parameters for create Conda package + +Validate parameters for create Conda package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CondaPackageUploadRequest**](CondaPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_cran** +> packages_validate_upload_cran(ctx, ctx, owner, repo, optional) +Validate parameters for create CRAN package + +Validate parameters for create CRAN package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**CranPackageUploadRequest**](CranPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_dart** +> packages_validate_upload_dart(ctx, ctx, owner, repo, optional) +Validate parameters for create Dart package + +Validate parameters for create Dart package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**DartPackageUploadRequest**](DartPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_deb** +> packages_validate_upload_deb(ctx, ctx, owner, repo, optional) +Validate parameters for create Debian package + +Validate parameters for create Debian package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**DebPackageUploadRequest**](DebPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_docker** +> packages_validate_upload_docker(ctx, ctx, owner, repo, optional) +Validate parameters for create Docker package + +Validate parameters for create Docker package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**DockerPackageUploadRequest**](DockerPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_go** +> packages_validate_upload_go(ctx, ctx, owner, repo, optional) +Validate parameters for create Go package + +Validate parameters for create Go package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**GoPackageUploadRequest**](GoPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_helm** +> packages_validate_upload_helm(ctx, ctx, owner, repo, optional) +Validate parameters for create Helm package + +Validate parameters for create Helm package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**HelmPackageUploadRequest**](HelmPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_hex** +> packages_validate_upload_hex(ctx, ctx, owner, repo, optional) +Validate parameters for create Hex package + +Validate parameters for create Hex package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**HexPackageUploadRequest**](HexPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_luarocks** +> packages_validate_upload_luarocks(ctx, ctx, owner, repo, optional) +Validate parameters for create LuaRocks package + +Validate parameters for create LuaRocks package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**LuarocksPackageUploadRequest**](LuarocksPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_maven** +> packages_validate_upload_maven(ctx, ctx, owner, repo, optional) +Validate parameters for create Maven package + +Validate parameters for create Maven package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**MavenPackageUploadRequest**](MavenPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_npm** +> packages_validate_upload_npm(ctx, ctx, owner, repo, optional) +Validate parameters for create npm package + +Validate parameters for create npm package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**NpmPackageUploadRequest**](NpmPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_nuget** +> packages_validate_upload_nuget(ctx, ctx, owner, repo, optional) +Validate parameters for create NuGet package + +Validate parameters for create NuGet package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**NugetPackageUploadRequest**](NugetPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_p2** +> packages_validate_upload_p2(ctx, ctx, owner, repo, optional) +Validate parameters for create P2 package + +Validate parameters for create P2 package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**P2PackageUploadRequest**](P2PackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_python** +> packages_validate_upload_python(ctx, ctx, owner, repo, optional) +Validate parameters for create Python package + +Validate parameters for create Python package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**PythonPackageUploadRequest**](PythonPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_raw** +> packages_validate_upload_raw(ctx, ctx, owner, repo, optional) +Validate parameters for create Raw package + +Validate parameters for create Raw package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RawPackageUploadRequest**](RawPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_rpm** +> packages_validate_upload_rpm(ctx, ctx, owner, repo, optional) +Validate parameters for create RedHat package + +Validate parameters for create RedHat package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RpmPackageUploadRequest**](RpmPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_ruby** +> packages_validate_upload_ruby(ctx, ctx, owner, repo, optional) +Validate parameters for create Ruby package + +Validate parameters for create Ruby package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RubyPackageUploadRequest**](RubyPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_swift** +> packages_validate_upload_swift(ctx, ctx, owner, repo, optional) +Validate parameters for create Swift package + +Validate parameters for create Swift package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**SwiftPackageUploadRequest**](SwiftPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_terraform** +> packages_validate_upload_terraform(ctx, ctx, owner, repo, optional) +Validate parameters for create Terraform package + +Validate parameters for create Terraform package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**TerraformPackageUploadRequest**](TerraformPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **packages_validate_upload_vagrant** +> packages_validate_upload_vagrant(ctx, ctx, owner, repo, optional) +Validate parameters for create Vagrant package + +Validate parameters for create Vagrant package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**VagrantPackageUploadRequest**](VagrantPackageUploadRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/ProviderSettings.md b/bindings/rust/src/docs/ProviderSettings.md new file mode 100644 index 00000000..204d4dd6 --- /dev/null +++ b/bindings/rust/src/docs/ProviderSettings.md @@ -0,0 +1,16 @@ +# ProviderSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**claims** | [***Value**](Value.md) | The set of claims that any received tokens from the provider must contain to authenticate as the configured service account. | [default to null] +**enabled** | **bool** | Whether the provider settings should be used for incoming OIDC requests. | [default to null] +**name** | **String** | The name of the provider settings are being configured for | [default to null] +**provider_url** | **String** | The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/ | [default to null] +**service_accounts** | **Vec** | The service accounts associated with these provider settings | [default to null] +**slug** | **String** | The slug of the provider settings | [optional] [default to null] +**slug_perm** | **String** | The unique, immutable identifier of the provider settings. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ProviderSettingsRequest.md b/bindings/rust/src/docs/ProviderSettingsRequest.md new file mode 100644 index 00000000..f348f795 --- /dev/null +++ b/bindings/rust/src/docs/ProviderSettingsRequest.md @@ -0,0 +1,14 @@ +# ProviderSettingsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**claims** | [***Value**](Value.md) | The set of claims that any received tokens from the provider must contain to authenticate as the configured service account. | [default to null] +**enabled** | **bool** | Whether the provider settings should be used for incoming OIDC requests. | [default to null] +**name** | **String** | The name of the provider settings are being configured for | [default to null] +**provider_url** | **String** | The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/ | [default to null] +**service_accounts** | **Vec** | The service accounts associated with these provider settings | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ProviderSettingsRequestPatch.md b/bindings/rust/src/docs/ProviderSettingsRequestPatch.md new file mode 100644 index 00000000..939afd11 --- /dev/null +++ b/bindings/rust/src/docs/ProviderSettingsRequestPatch.md @@ -0,0 +1,14 @@ +# ProviderSettingsRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**claims** | [***Value**](Value.md) | The set of claims that any received tokens from the provider must contain to authenticate as the configured service account. | [optional] [default to null] +**enabled** | **bool** | Whether the provider settings should be used for incoming OIDC requests. | [optional] [default to null] +**name** | **String** | The name of the provider settings are being configured for | [optional] [default to null] +**provider_url** | **String** | The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/ | [optional] [default to null] +**service_accounts** | **Vec** | The service accounts associated with these provider settings | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PythonPackageUpload.md b/bindings/rust/src/docs/PythonPackageUpload.md new file mode 100644 index 00000000..630602e3 --- /dev/null +++ b/bindings/rust/src/docs/PythonPackageUpload.md @@ -0,0 +1,89 @@ +# PythonPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PythonPackageUploadRequest.md b/bindings/rust/src/docs/PythonPackageUploadRequest.md new file mode 100644 index 00000000..57a54cd3 --- /dev/null +++ b/bindings/rust/src/docs/PythonPackageUploadRequest.md @@ -0,0 +1,12 @@ +# PythonPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PythonUpstream.md b/bindings/rust/src/docs/PythonUpstream.md new file mode 100644 index 00000000..8dcabbb7 --- /dev/null +++ b/bindings/rust/src/docs/PythonUpstream.md @@ -0,0 +1,27 @@ +# PythonUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PythonUpstreamRequest.md b/bindings/rust/src/docs/PythonUpstreamRequest.md new file mode 100644 index 00000000..40ac9815 --- /dev/null +++ b/bindings/rust/src/docs/PythonUpstreamRequest.md @@ -0,0 +1,22 @@ +# PythonUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/PythonUpstreamRequestPatch.md b/bindings/rust/src/docs/PythonUpstreamRequestPatch.md new file mode 100644 index 00000000..2e6663a9 --- /dev/null +++ b/bindings/rust/src/docs/PythonUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# PythonUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Quota.md b/bindings/rust/src/docs/Quota.md new file mode 100644 index 00000000..a2aa9de0 --- /dev/null +++ b/bindings/rust/src/docs/Quota.md @@ -0,0 +1,10 @@ +# Quota + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usage** | [***::models::UsageFieldset**](UsageFieldset.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/QuotaApi.md b/bindings/rust/src/docs/QuotaApi.md new file mode 100644 index 00000000..f535590b --- /dev/null +++ b/bindings/rust/src/docs/QuotaApi.md @@ -0,0 +1,128 @@ +# \QuotaApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**quota_history_read**](QuotaApi.md#quota_history_read) | **Get** /quota/history/{owner}/ | Quota history for a given namespace. +[**quota_oss_history_read**](QuotaApi.md#quota_oss_history_read) | **Get** /quota/oss/history/{owner}/ | Open-source Quota history for a given namespace. +[**quota_oss_read**](QuotaApi.md#quota_oss_read) | **Get** /quota/oss/{owner}/ | Open-source Quota usage for a given namespace. +[**quota_read**](QuotaApi.md#quota_read) | **Get** /quota/{owner}/ | Quota usage for a given namespace. + + +# **quota_history_read** +> ::models::QuotaHistory quota_history_read(ctx, ctx, owner) +Quota history for a given namespace. + +Quota history for a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + +### Return type + +[**::models::QuotaHistory**](QuotaHistory.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **quota_oss_history_read** +> ::models::QuotaHistory quota_oss_history_read(ctx, ctx, owner) +Open-source Quota history for a given namespace. + +Open-source Quota history for a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + +### Return type + +[**::models::QuotaHistory**](QuotaHistory.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **quota_oss_read** +> ::models::Quota quota_oss_read(ctx, ctx, owner) +Open-source Quota usage for a given namespace. + +Open-source Quota usage for a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + +### Return type + +[**::models::Quota**](Quota.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **quota_read** +> ::models::Quota quota_read(ctx, ctx, owner) +Quota usage for a given namespace. + +Quota usage for a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + +### Return type + +[**::models::Quota**](Quota.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/QuotaHistory.md b/bindings/rust/src/docs/QuotaHistory.md new file mode 100644 index 00000000..ef0a8d80 --- /dev/null +++ b/bindings/rust/src/docs/QuotaHistory.md @@ -0,0 +1,10 @@ +# QuotaHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**history** | [**Vec<::models::History>**](History.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RateCheck.md b/bindings/rust/src/docs/RateCheck.md new file mode 100644 index 00000000..d2e66df1 --- /dev/null +++ b/bindings/rust/src/docs/RateCheck.md @@ -0,0 +1,15 @@ +# RateCheck + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | **f32** | The time in seconds that you are suggested to wait until the next request in order to avoid consuming too much within the rate limit window. | [optional] [default to null] +**limit** | **i32** | The maximum number of requests that you are permitted to send per hour | [optional] [default to null] +**remaining** | **i32** | The number of requests that are remaining in the current rate limit window | [optional] [default to null] +**reset** | **i32** | The UTC epoch timestamp at which the current rate limit window will reset | [optional] [default to null] +**reset_iso_8601** | **String** | The ISO 8601 datetime at which the current rate limit window will reset | [optional] [default to null] +**throttled** | **bool** | If true, throttling is currently being enforced. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RatesApi.md b/bindings/rust/src/docs/RatesApi.md new file mode 100644 index 00000000..e60f3495 --- /dev/null +++ b/bindings/rust/src/docs/RatesApi.md @@ -0,0 +1,33 @@ +# \RatesApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**rates_limits_list**](RatesApi.md#rates_limits_list) | **Get** /rates/limits/ | Endpoint to check rate limits for current user. + + +# **rates_limits_list** +> ::models::ResourcesRateCheck rates_limits_list(ctx, ctx, ) +Endpoint to check rate limits for current user. + +Endpoint to check rate limits for current user. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**::models::ResourcesRateCheck**](ResourcesRateCheck.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/RawPackageUpload.md b/bindings/rust/src/docs/RawPackageUpload.md new file mode 100644 index 00000000..dca884ff --- /dev/null +++ b/bindings/rust/src/docs/RawPackageUpload.md @@ -0,0 +1,89 @@ +# RawPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RawPackageUploadRequest.md b/bindings/rust/src/docs/RawPackageUploadRequest.md new file mode 100644 index 00000000..33c274f7 --- /dev/null +++ b/bindings/rust/src/docs/RawPackageUploadRequest.md @@ -0,0 +1,17 @@ +# RawPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_type** | **String** | A custom content/media (also known as MIME) type to be sent when downloading this file. By default Cloudsmith will attempt to detect the type, but if you need to override it, you can specify it here. | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ReposApi.md b/bindings/rust/src/docs/ReposApi.md new file mode 100644 index 00000000..21f90dea --- /dev/null +++ b/bindings/rust/src/docs/ReposApi.md @@ -0,0 +1,4365 @@ +# \ReposApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_repos_geoip_status**](ReposApi.md#api_repos_geoip_status) | **Get** /repos/{owner}/{identifier}/geoip/status/ | Retrieve the GeoIP status for this repository. +[**repo_retention_partial_update**](ReposApi.md#repo_retention_partial_update) | **Patch** /repos/{owner}/{repo}/retention/ | Update the retention rules for the repository. +[**repo_retention_read**](ReposApi.md#repo_retention_read) | **Get** /repos/{owner}/{repo}/retention/ | Retrieve the retention rules for the repository. +[**repos_create**](ReposApi.md#repos_create) | **Post** /repos/{owner}/ | Create a new repository in a given namespace. +[**repos_delete**](ReposApi.md#repos_delete) | **Delete** /repos/{owner}/{identifier}/ | Delete a repository in a given namespace. +[**repos_ecdsa_create**](ReposApi.md#repos_ecdsa_create) | **Post** /repos/{owner}/{identifier}/ecdsa/ | Set the active ECDSA key for the Repository. +[**repos_ecdsa_list**](ReposApi.md#repos_ecdsa_list) | **Get** /repos/{owner}/{identifier}/ecdsa/ | Retrieve the active ECDSA key for the Repository. +[**repos_ecdsa_regenerate**](ReposApi.md#repos_ecdsa_regenerate) | **Post** /repos/{owner}/{identifier}/ecdsa/regenerate/ | Regenerate ECDSA Key for the Repository. +[**repos_geoip_disable**](ReposApi.md#repos_geoip_disable) | **Post** /repos/{owner}/{identifier}/geoip/disable/ | Disable GeoIP for this repository. +[**repos_geoip_enable**](ReposApi.md#repos_geoip_enable) | **Post** /repos/{owner}/{identifier}/geoip/enable/ | Enable GeoIP for this repository. +[**repos_geoip_partial_update**](ReposApi.md#repos_geoip_partial_update) | **Patch** /repos/{owner}/{identifier}/geoip | Partially update repository geoip rules. +[**repos_geoip_read**](ReposApi.md#repos_geoip_read) | **Get** /repos/{owner}/{identifier}/geoip | List all repository geoip rules. +[**repos_geoip_test**](ReposApi.md#repos_geoip_test) | **Post** /repos/{owner}/{identifier}/geoip/test/ | Test a list of IP addresses against the repository's current GeoIP rules. +[**repos_geoip_update**](ReposApi.md#repos_geoip_update) | **Put** /repos/{owner}/{identifier}/geoip | Replace repository geoip rules. +[**repos_gpg_create**](ReposApi.md#repos_gpg_create) | **Post** /repos/{owner}/{identifier}/gpg/ | Set the active GPG key for the Repository. +[**repos_gpg_list**](ReposApi.md#repos_gpg_list) | **Get** /repos/{owner}/{identifier}/gpg/ | Retrieve the active GPG key for the Repository. +[**repos_gpg_regenerate**](ReposApi.md#repos_gpg_regenerate) | **Post** /repos/{owner}/{identifier}/gpg/regenerate/ | Regenerate GPG Key for the Repository. +[**repos_namespace_list**](ReposApi.md#repos_namespace_list) | **Get** /repos/{owner}/ | Get a list of all repositories within a namespace. +[**repos_partial_update**](ReposApi.md#repos_partial_update) | **Patch** /repos/{owner}/{identifier}/ | Update details about a repository in a given namespace. +[**repos_privileges_list**](ReposApi.md#repos_privileges_list) | **Get** /repos/{owner}/{identifier}/privileges | List all explicity created privileges for the repository. +[**repos_privileges_partial_update**](ReposApi.md#repos_privileges_partial_update) | **Patch** /repos/{owner}/{identifier}/privileges | Modify privileges for the repository. +[**repos_privileges_update**](ReposApi.md#repos_privileges_update) | **Put** /repos/{owner}/{identifier}/privileges | Replace all existing repository privileges with those specified. +[**repos_read**](ReposApi.md#repos_read) | **Get** /repos/{owner}/{identifier}/ | Get a specific repository. +[**repos_rsa_create**](ReposApi.md#repos_rsa_create) | **Post** /repos/{owner}/{identifier}/rsa/ | Set the active RSA key for the Repository. +[**repos_rsa_list**](ReposApi.md#repos_rsa_list) | **Get** /repos/{owner}/{identifier}/rsa/ | Retrieve the active RSA key for the Repository. +[**repos_rsa_regenerate**](ReposApi.md#repos_rsa_regenerate) | **Post** /repos/{owner}/{identifier}/rsa/regenerate/ | Regenerate RSA Key for the Repository. +[**repos_transfer_region**](ReposApi.md#repos_transfer_region) | **Post** /repos/{owner}/{repo}/transfer-region/ | Transfer a repository to a different region. +[**repos_upstream_composer_create**](ReposApi.md#repos_upstream_composer_create) | **Post** /repos/{owner}/{identifier}/upstream/composer/ | Create a Composer upstream config for this repository. +[**repos_upstream_composer_delete**](ReposApi.md#repos_upstream_composer_delete) | **Delete** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Delete a Composer upstream config for this repository. +[**repos_upstream_composer_list**](ReposApi.md#repos_upstream_composer_list) | **Get** /repos/{owner}/{identifier}/upstream/composer/ | List Composer upstream configs for this repository. +[**repos_upstream_composer_partial_update**](ReposApi.md#repos_upstream_composer_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Partially update a Composer upstream config for this repository. +[**repos_upstream_composer_read**](ReposApi.md#repos_upstream_composer_read) | **Get** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Retrieve a Composer upstream config for this repository. +[**repos_upstream_composer_update**](ReposApi.md#repos_upstream_composer_update) | **Put** /repos/{owner}/{identifier}/upstream/composer/{slug_perm}/ | Update a Composer upstream config for this repository. +[**repos_upstream_cran_create**](ReposApi.md#repos_upstream_cran_create) | **Post** /repos/{owner}/{identifier}/upstream/cran/ | Create a CRAN upstream config for this repository. +[**repos_upstream_cran_delete**](ReposApi.md#repos_upstream_cran_delete) | **Delete** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Delete a CRAN upstream config for this repository. +[**repos_upstream_cran_list**](ReposApi.md#repos_upstream_cran_list) | **Get** /repos/{owner}/{identifier}/upstream/cran/ | List CRAN upstream configs for this repository. +[**repos_upstream_cran_partial_update**](ReposApi.md#repos_upstream_cran_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Partially update a CRAN upstream config for this repository. +[**repos_upstream_cran_read**](ReposApi.md#repos_upstream_cran_read) | **Get** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Retrieve a CRAN upstream config for this repository. +[**repos_upstream_cran_update**](ReposApi.md#repos_upstream_cran_update) | **Put** /repos/{owner}/{identifier}/upstream/cran/{slug_perm}/ | Update a CRAN upstream config for this repository. +[**repos_upstream_dart_create**](ReposApi.md#repos_upstream_dart_create) | **Post** /repos/{owner}/{identifier}/upstream/dart/ | Create a Dart upstream config for this repository. +[**repos_upstream_dart_delete**](ReposApi.md#repos_upstream_dart_delete) | **Delete** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Delete a Dart upstream config for this repository. +[**repos_upstream_dart_list**](ReposApi.md#repos_upstream_dart_list) | **Get** /repos/{owner}/{identifier}/upstream/dart/ | List Dart upstream configs for this repository. +[**repos_upstream_dart_partial_update**](ReposApi.md#repos_upstream_dart_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Partially update a Dart upstream config for this repository. +[**repos_upstream_dart_read**](ReposApi.md#repos_upstream_dart_read) | **Get** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Retrieve a Dart upstream config for this repository. +[**repos_upstream_dart_update**](ReposApi.md#repos_upstream_dart_update) | **Put** /repos/{owner}/{identifier}/upstream/dart/{slug_perm}/ | Update a Dart upstream config for this repository. +[**repos_upstream_deb_create**](ReposApi.md#repos_upstream_deb_create) | **Post** /repos/{owner}/{identifier}/upstream/deb/ | Create a Debian upstream config for this repository. +[**repos_upstream_deb_delete**](ReposApi.md#repos_upstream_deb_delete) | **Delete** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Delete a Debian upstream config for this repository. +[**repos_upstream_deb_list**](ReposApi.md#repos_upstream_deb_list) | **Get** /repos/{owner}/{identifier}/upstream/deb/ | List Debian upstream configs for this repository. +[**repos_upstream_deb_partial_update**](ReposApi.md#repos_upstream_deb_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Partially update a Debian upstream config for this repository. +[**repos_upstream_deb_read**](ReposApi.md#repos_upstream_deb_read) | **Get** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Retrieve a Debian upstream config for this repository. +[**repos_upstream_deb_update**](ReposApi.md#repos_upstream_deb_update) | **Put** /repos/{owner}/{identifier}/upstream/deb/{slug_perm}/ | Update a Debian upstream config for this repository. +[**repos_upstream_docker_create**](ReposApi.md#repos_upstream_docker_create) | **Post** /repos/{owner}/{identifier}/upstream/docker/ | Create a Docker upstream config for this repository. +[**repos_upstream_docker_delete**](ReposApi.md#repos_upstream_docker_delete) | **Delete** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Delete a Docker upstream config for this repository. +[**repos_upstream_docker_list**](ReposApi.md#repos_upstream_docker_list) | **Get** /repos/{owner}/{identifier}/upstream/docker/ | List Docker upstream configs for this repository. +[**repos_upstream_docker_partial_update**](ReposApi.md#repos_upstream_docker_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Partially update a Docker upstream config for this repository. +[**repos_upstream_docker_read**](ReposApi.md#repos_upstream_docker_read) | **Get** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Retrieve a Docker upstream config for this repository. +[**repos_upstream_docker_update**](ReposApi.md#repos_upstream_docker_update) | **Put** /repos/{owner}/{identifier}/upstream/docker/{slug_perm}/ | Update a Docker upstream config for this repository. +[**repos_upstream_helm_create**](ReposApi.md#repos_upstream_helm_create) | **Post** /repos/{owner}/{identifier}/upstream/helm/ | Create a Helm upstream config for this repository. +[**repos_upstream_helm_delete**](ReposApi.md#repos_upstream_helm_delete) | **Delete** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Delete a Helm upstream config for this repository. +[**repos_upstream_helm_list**](ReposApi.md#repos_upstream_helm_list) | **Get** /repos/{owner}/{identifier}/upstream/helm/ | List Helm upstream configs for this repository. +[**repos_upstream_helm_partial_update**](ReposApi.md#repos_upstream_helm_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Partially update a Helm upstream config for this repository. +[**repos_upstream_helm_read**](ReposApi.md#repos_upstream_helm_read) | **Get** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Retrieve a Helm upstream config for this repository. +[**repos_upstream_helm_update**](ReposApi.md#repos_upstream_helm_update) | **Put** /repos/{owner}/{identifier}/upstream/helm/{slug_perm}/ | Update a Helm upstream config for this repository. +[**repos_upstream_hex_create**](ReposApi.md#repos_upstream_hex_create) | **Post** /repos/{owner}/{identifier}/upstream/hex/ | Create a Hex upstream config for this repository. +[**repos_upstream_hex_delete**](ReposApi.md#repos_upstream_hex_delete) | **Delete** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Delete a Hex upstream config for this repository. +[**repos_upstream_hex_list**](ReposApi.md#repos_upstream_hex_list) | **Get** /repos/{owner}/{identifier}/upstream/hex/ | List Hex upstream configs for this repository. +[**repos_upstream_hex_partial_update**](ReposApi.md#repos_upstream_hex_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Partially update a Hex upstream config for this repository. +[**repos_upstream_hex_read**](ReposApi.md#repos_upstream_hex_read) | **Get** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Retrieve a Hex upstream config for this repository. +[**repos_upstream_hex_update**](ReposApi.md#repos_upstream_hex_update) | **Put** /repos/{owner}/{identifier}/upstream/hex/{slug_perm}/ | Update a Hex upstream config for this repository. +[**repos_upstream_maven_create**](ReposApi.md#repos_upstream_maven_create) | **Post** /repos/{owner}/{identifier}/upstream/maven/ | Create a Maven upstream config for this repository. +[**repos_upstream_maven_delete**](ReposApi.md#repos_upstream_maven_delete) | **Delete** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Delete a Maven upstream config for this repository. +[**repos_upstream_maven_list**](ReposApi.md#repos_upstream_maven_list) | **Get** /repos/{owner}/{identifier}/upstream/maven/ | List Maven upstream configs for this repository. +[**repos_upstream_maven_partial_update**](ReposApi.md#repos_upstream_maven_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Partially update a Maven upstream config for this repository. +[**repos_upstream_maven_read**](ReposApi.md#repos_upstream_maven_read) | **Get** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Retrieve a Maven upstream config for this repository. +[**repos_upstream_maven_update**](ReposApi.md#repos_upstream_maven_update) | **Put** /repos/{owner}/{identifier}/upstream/maven/{slug_perm}/ | Update a Maven upstream config for this repository. +[**repos_upstream_npm_create**](ReposApi.md#repos_upstream_npm_create) | **Post** /repos/{owner}/{identifier}/upstream/npm/ | Create a npm upstream config for this repository. +[**repos_upstream_npm_delete**](ReposApi.md#repos_upstream_npm_delete) | **Delete** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Delete a npm upstream config for this repository. +[**repos_upstream_npm_list**](ReposApi.md#repos_upstream_npm_list) | **Get** /repos/{owner}/{identifier}/upstream/npm/ | List npm upstream configs for this repository. +[**repos_upstream_npm_partial_update**](ReposApi.md#repos_upstream_npm_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Partially update a npm upstream config for this repository. +[**repos_upstream_npm_read**](ReposApi.md#repos_upstream_npm_read) | **Get** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Retrieve a npm upstream config for this repository. +[**repos_upstream_npm_update**](ReposApi.md#repos_upstream_npm_update) | **Put** /repos/{owner}/{identifier}/upstream/npm/{slug_perm}/ | Update a npm upstream config for this repository. +[**repos_upstream_nuget_create**](ReposApi.md#repos_upstream_nuget_create) | **Post** /repos/{owner}/{identifier}/upstream/nuget/ | Create a NuGet upstream config for this repository. +[**repos_upstream_nuget_delete**](ReposApi.md#repos_upstream_nuget_delete) | **Delete** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Delete a NuGet upstream config for this repository. +[**repos_upstream_nuget_list**](ReposApi.md#repos_upstream_nuget_list) | **Get** /repos/{owner}/{identifier}/upstream/nuget/ | List NuGet upstream configs for this repository. +[**repos_upstream_nuget_partial_update**](ReposApi.md#repos_upstream_nuget_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Partially update a NuGet upstream config for this repository. +[**repos_upstream_nuget_read**](ReposApi.md#repos_upstream_nuget_read) | **Get** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Retrieve a NuGet upstream config for this repository. +[**repos_upstream_nuget_update**](ReposApi.md#repos_upstream_nuget_update) | **Put** /repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/ | Update a NuGet upstream config for this repository. +[**repos_upstream_python_create**](ReposApi.md#repos_upstream_python_create) | **Post** /repos/{owner}/{identifier}/upstream/python/ | Create a Python upstream config for this repository. +[**repos_upstream_python_delete**](ReposApi.md#repos_upstream_python_delete) | **Delete** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Delete a Python upstream config for this repository. +[**repos_upstream_python_list**](ReposApi.md#repos_upstream_python_list) | **Get** /repos/{owner}/{identifier}/upstream/python/ | List Python upstream configs for this repository. +[**repos_upstream_python_partial_update**](ReposApi.md#repos_upstream_python_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Partially update a Python upstream config for this repository. +[**repos_upstream_python_read**](ReposApi.md#repos_upstream_python_read) | **Get** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Retrieve a Python upstream config for this repository. +[**repos_upstream_python_update**](ReposApi.md#repos_upstream_python_update) | **Put** /repos/{owner}/{identifier}/upstream/python/{slug_perm}/ | Update a Python upstream config for this repository. +[**repos_upstream_rpm_create**](ReposApi.md#repos_upstream_rpm_create) | **Post** /repos/{owner}/{identifier}/upstream/rpm/ | Create a RedHat upstream config for this repository. +[**repos_upstream_rpm_delete**](ReposApi.md#repos_upstream_rpm_delete) | **Delete** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Delete a RedHat upstream config for this repository. +[**repos_upstream_rpm_list**](ReposApi.md#repos_upstream_rpm_list) | **Get** /repos/{owner}/{identifier}/upstream/rpm/ | List RedHat upstream configs for this repository. +[**repos_upstream_rpm_partial_update**](ReposApi.md#repos_upstream_rpm_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Partially update a RedHat upstream config for this repository. +[**repos_upstream_rpm_read**](ReposApi.md#repos_upstream_rpm_read) | **Get** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Retrieve a RedHat upstream config for this repository. +[**repos_upstream_rpm_update**](ReposApi.md#repos_upstream_rpm_update) | **Put** /repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/ | Update a RedHat upstream config for this repository. +[**repos_upstream_ruby_create**](ReposApi.md#repos_upstream_ruby_create) | **Post** /repos/{owner}/{identifier}/upstream/ruby/ | Create a Ruby upstream config for this repository. +[**repos_upstream_ruby_delete**](ReposApi.md#repos_upstream_ruby_delete) | **Delete** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Delete a Ruby upstream config for this repository. +[**repos_upstream_ruby_list**](ReposApi.md#repos_upstream_ruby_list) | **Get** /repos/{owner}/{identifier}/upstream/ruby/ | List Ruby upstream configs for this repository. +[**repos_upstream_ruby_partial_update**](ReposApi.md#repos_upstream_ruby_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Partially update a Ruby upstream config for this repository. +[**repos_upstream_ruby_read**](ReposApi.md#repos_upstream_ruby_read) | **Get** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Retrieve a Ruby upstream config for this repository. +[**repos_upstream_ruby_update**](ReposApi.md#repos_upstream_ruby_update) | **Put** /repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/ | Update a Ruby upstream config for this repository. +[**repos_upstream_swift_create**](ReposApi.md#repos_upstream_swift_create) | **Post** /repos/{owner}/{identifier}/upstream/swift/ | Create a Swift upstream config for this repository. +[**repos_upstream_swift_delete**](ReposApi.md#repos_upstream_swift_delete) | **Delete** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Delete a Swift upstream config for this repository. +[**repos_upstream_swift_list**](ReposApi.md#repos_upstream_swift_list) | **Get** /repos/{owner}/{identifier}/upstream/swift/ | List Swift upstream configs for this repository. +[**repos_upstream_swift_partial_update**](ReposApi.md#repos_upstream_swift_partial_update) | **Patch** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Partially update a Swift upstream config for this repository. +[**repos_upstream_swift_read**](ReposApi.md#repos_upstream_swift_read) | **Get** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Retrieve a Swift upstream config for this repository. +[**repos_upstream_swift_update**](ReposApi.md#repos_upstream_swift_update) | **Put** /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/ | Update a Swift upstream config for this repository. +[**repos_user_list**](ReposApi.md#repos_user_list) | **Get** /repos/ | Get a list of all repositories associated with current user. +[**repos_x509_ecdsa_list**](ReposApi.md#repos_x509_ecdsa_list) | **Get** /repos/{owner}/{identifier}/x509-ecdsa/ | Retrieve the active X.509 ECDSA certificate for the Repository. +[**repos_x509_rsa_list**](ReposApi.md#repos_x509_rsa_list) | **Get** /repos/{owner}/{identifier}/x509-rsa/ | Retrieve the active X.509 RSA certificate for the Repository. + + +# **api_repos_geoip_status** +> ::models::RepositoryGeoIpStatus api_repos_geoip_status(ctx, ctx, owner, identifier) +Retrieve the GeoIP status for this repository. + +Retrieve the GeoIP status for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryGeoIpStatus**](RepositoryGeoIpStatus.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_retention_partial_update** +> ::models::RepositoryRetentionRules repo_retention_partial_update(ctx, ctx, owner, repo, optional) +Update the retention rules for the repository. + +Update the retention rules for the repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RepositoryRetentionRulesRequestPatch**](RepositoryRetentionRulesRequestPatch.md)| | + +### Return type + +[**::models::RepositoryRetentionRules**](RepositoryRetentionRules.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_retention_read** +> ::models::RepositoryRetentionRules repo_retention_read(ctx, ctx, owner, repo) +Retrieve the retention rules for the repository. + +Retrieve the retention rules for the repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + +### Return type + +[**::models::RepositoryRetentionRules**](RepositoryRetentionRules.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_create** +> ::models::RepositoryCreate repos_create(ctx, ctx, owner, optional) +Create a new repository in a given namespace. + +Create a new repository in a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **data** | [**RepositoryCreateRequest**](RepositoryCreateRequest.md)| | + +### Return type + +[**::models::RepositoryCreate**](RepositoryCreate.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_delete** +> repos_delete(ctx, ctx, owner, identifier) +Delete a repository in a given namespace. + +Delete a repository in a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_ecdsa_create** +> ::models::RepositoryEcdsaKey repos_ecdsa_create(ctx, ctx, owner, identifier, optional) +Set the active ECDSA key for the Repository. + +Set the active ECDSA key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryEcdsaKeyCreate**](RepositoryEcdsaKeyCreate.md)| | + +### Return type + +[**::models::RepositoryEcdsaKey**](RepositoryEcdsaKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_ecdsa_list** +> ::models::RepositoryEcdsaKey repos_ecdsa_list(ctx, ctx, owner, identifier) +Retrieve the active ECDSA key for the Repository. + +Retrieve the active ECDSA key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryEcdsaKey**](RepositoryEcdsaKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_ecdsa_regenerate** +> ::models::RepositoryEcdsaKey repos_ecdsa_regenerate(ctx, ctx, owner, identifier) +Regenerate ECDSA Key for the Repository. + +Regenerate ECDSA Key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryEcdsaKey**](RepositoryEcdsaKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_geoip_disable** +> repos_geoip_disable(ctx, ctx, owner, identifier, optional) +Disable GeoIP for this repository. + +Disable GeoIP for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RespositoryGeoIpEnableDisableRequest**](RespositoryGeoIpEnableDisableRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_geoip_enable** +> repos_geoip_enable(ctx, ctx, owner, identifier, optional) +Enable GeoIP for this repository. + +Enable GeoIP for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RespositoryGeoIpEnableDisableRequest**](RespositoryGeoIpEnableDisableRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_geoip_partial_update** +> ::models::RepositoryGeoIpRules repos_geoip_partial_update(ctx, ctx, owner, identifier, optional) +Partially update repository geoip rules. + +Partially update repository geoip rules. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryGeoIpRulesRequestPatch**](RepositoryGeoIpRulesRequestPatch.md)| | + +### Return type + +[**::models::RepositoryGeoIpRules**](RepositoryGeoIpRules.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_geoip_read** +> ::models::RepositoryGeoIpRules repos_geoip_read(ctx, ctx, owner, identifier) +List all repository geoip rules. + +List all repository geoip rules. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryGeoIpRules**](RepositoryGeoIpRules.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_geoip_test** +> ::models::RepositoryGeoIpTestAddressResponse repos_geoip_test(ctx, ctx, owner, identifier, optional) +Test a list of IP addresses against the repository's current GeoIP rules. + +Test a list of IP addresses against the repository's current GeoIP rules. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryGeoIpTestAddress**](RepositoryGeoIpTestAddress.md)| | + +### Return type + +[**::models::RepositoryGeoIpTestAddressResponse**](RepositoryGeoIpTestAddressResponse.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_geoip_update** +> ::models::RepositoryGeoIpRules repos_geoip_update(ctx, ctx, owner, identifier, optional) +Replace repository geoip rules. + +Replace repository geoip rules. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryGeoIpRulesRequest**](RepositoryGeoIpRulesRequest.md)| | + +### Return type + +[**::models::RepositoryGeoIpRules**](RepositoryGeoIpRules.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_gpg_create** +> ::models::RepositoryGpgKey repos_gpg_create(ctx, ctx, owner, identifier, optional) +Set the active GPG key for the Repository. + +Set the active GPG key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryGpgKeyCreate**](RepositoryGpgKeyCreate.md)| | + +### Return type + +[**::models::RepositoryGpgKey**](RepositoryGpgKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_gpg_list** +> ::models::RepositoryGpgKey repos_gpg_list(ctx, ctx, owner, identifier) +Retrieve the active GPG key for the Repository. + +Retrieve the active GPG key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryGpgKey**](RepositoryGpgKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_gpg_regenerate** +> ::models::RepositoryGpgKey repos_gpg_regenerate(ctx, ctx, owner, identifier) +Regenerate GPG Key for the Repository. + +Regenerate GPG Key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryGpgKey**](RepositoryGpgKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_namespace_list** +> Vec<::models::Repository> repos_namespace_list(ctx, ctx, owner, optional) +Get a list of all repositories within a namespace. + +Get a list of all repositories within a namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::Repository>**](Repository.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_partial_update** +> ::models::Repository repos_partial_update(ctx, ctx, owner, identifier, optional) +Update details about a repository in a given namespace. + +Update details about a repository in a given namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryRequestPatch**](RepositoryRequestPatch.md)| | + +### Return type + +[**::models::Repository**](Repository.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_privileges_list** +> ::models::RepositoryPrivilegeInput repos_privileges_list(ctx, ctx, owner, identifier, optional) +List all explicity created privileges for the repository. + +List all explicity created privileges for the repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**::models::RepositoryPrivilegeInput**](RepositoryPrivilegeInput.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_privileges_partial_update** +> repos_privileges_partial_update(ctx, ctx, owner, identifier, optional) +Modify privileges for the repository. + +Modify privileges for the repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryPrivilegeInputRequestPatch**](RepositoryPrivilegeInputRequestPatch.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_privileges_update** +> repos_privileges_update(ctx, ctx, owner, identifier, optional) +Replace all existing repository privileges with those specified. + +Replace all existing repository privileges with those specified. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryPrivilegeInputRequest**](RepositoryPrivilegeInputRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_read** +> ::models::Repository repos_read(ctx, ctx, owner, identifier) +Get a specific repository. + +Get a specific repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::Repository**](Repository.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_rsa_create** +> ::models::RepositoryRsaKey repos_rsa_create(ctx, ctx, owner, identifier, optional) +Set the active RSA key for the Repository. + +Set the active RSA key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryRsaKeyCreate**](RepositoryRsaKeyCreate.md)| | + +### Return type + +[**::models::RepositoryRsaKey**](RepositoryRsaKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_rsa_list** +> ::models::RepositoryRsaKey repos_rsa_list(ctx, ctx, owner, identifier) +Retrieve the active RSA key for the Repository. + +Retrieve the active RSA key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryRsaKey**](RepositoryRsaKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_rsa_regenerate** +> ::models::RepositoryRsaKey repos_rsa_regenerate(ctx, ctx, owner, identifier) +Regenerate RSA Key for the Repository. + +Regenerate RSA Key for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryRsaKey**](RepositoryRsaKey.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_transfer_region** +> repos_transfer_region(ctx, ctx, owner, repo, optional) +Transfer a repository to a different region. + +Transfer a repository to a different region. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RepositoryTransferRegionRequest**](RepositoryTransferRegionRequest.md)| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_composer_create** +> ::models::ComposerUpstream repos_upstream_composer_create(ctx, ctx, owner, identifier, optional) +Create a Composer upstream config for this repository. + +Create a Composer upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**ComposerUpstreamRequest**](ComposerUpstreamRequest.md)| | + +### Return type + +[**::models::ComposerUpstream**](ComposerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_composer_delete** +> repos_upstream_composer_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Composer upstream config for this repository. + +Delete a Composer upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_composer_list** +> Vec<::models::ComposerUpstream> repos_upstream_composer_list(ctx, ctx, owner, identifier, optional) +List Composer upstream configs for this repository. + +List Composer upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::ComposerUpstream>**](ComposerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_composer_partial_update** +> ::models::ComposerUpstream repos_upstream_composer_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Composer upstream config for this repository. + +Partially update a Composer upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**ComposerUpstreamRequestPatch**](ComposerUpstreamRequestPatch.md)| | + +### Return type + +[**::models::ComposerUpstream**](ComposerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_composer_read** +> ::models::ComposerUpstream repos_upstream_composer_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Composer upstream config for this repository. + +Retrieve a Composer upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::ComposerUpstream**](ComposerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_composer_update** +> ::models::ComposerUpstream repos_upstream_composer_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Composer upstream config for this repository. + +Update a Composer upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**ComposerUpstreamRequest**](ComposerUpstreamRequest.md)| | + +### Return type + +[**::models::ComposerUpstream**](ComposerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_cran_create** +> ::models::CranUpstream repos_upstream_cran_create(ctx, ctx, owner, identifier, optional) +Create a CRAN upstream config for this repository. + +Create a CRAN upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**CranUpstreamRequest**](CranUpstreamRequest.md)| | + +### Return type + +[**::models::CranUpstream**](CranUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_cran_delete** +> repos_upstream_cran_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a CRAN upstream config for this repository. + +Delete a CRAN upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_cran_list** +> Vec<::models::CranUpstream> repos_upstream_cran_list(ctx, ctx, owner, identifier, optional) +List CRAN upstream configs for this repository. + +List CRAN upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::CranUpstream>**](CranUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_cran_partial_update** +> ::models::CranUpstream repos_upstream_cran_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a CRAN upstream config for this repository. + +Partially update a CRAN upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**CranUpstreamRequestPatch**](CranUpstreamRequestPatch.md)| | + +### Return type + +[**::models::CranUpstream**](CranUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_cran_read** +> ::models::CranUpstream repos_upstream_cran_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a CRAN upstream config for this repository. + +Retrieve a CRAN upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::CranUpstream**](CranUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_cran_update** +> ::models::CranUpstream repos_upstream_cran_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a CRAN upstream config for this repository. + +Update a CRAN upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**CranUpstreamRequest**](CranUpstreamRequest.md)| | + +### Return type + +[**::models::CranUpstream**](CranUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_dart_create** +> ::models::DartUpstream repos_upstream_dart_create(ctx, ctx, owner, identifier, optional) +Create a Dart upstream config for this repository. + +Create a Dart upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**DartUpstreamRequest**](DartUpstreamRequest.md)| | + +### Return type + +[**::models::DartUpstream**](DartUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_dart_delete** +> repos_upstream_dart_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Dart upstream config for this repository. + +Delete a Dart upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_dart_list** +> Vec<::models::DartUpstream> repos_upstream_dart_list(ctx, ctx, owner, identifier, optional) +List Dart upstream configs for this repository. + +List Dart upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::DartUpstream>**](DartUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_dart_partial_update** +> ::models::DartUpstream repos_upstream_dart_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Dart upstream config for this repository. + +Partially update a Dart upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**DartUpstreamRequestPatch**](DartUpstreamRequestPatch.md)| | + +### Return type + +[**::models::DartUpstream**](DartUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_dart_read** +> ::models::DartUpstream repos_upstream_dart_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Dart upstream config for this repository. + +Retrieve a Dart upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::DartUpstream**](DartUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_dart_update** +> ::models::DartUpstream repos_upstream_dart_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Dart upstream config for this repository. + +Update a Dart upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**DartUpstreamRequest**](DartUpstreamRequest.md)| | + +### Return type + +[**::models::DartUpstream**](DartUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_deb_create** +> ::models::DebUpstream repos_upstream_deb_create(ctx, ctx, owner, identifier, optional) +Create a Debian upstream config for this repository. + +Create a Debian upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**DebUpstreamRequest**](DebUpstreamRequest.md)| | + +### Return type + +[**::models::DebUpstream**](DebUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_deb_delete** +> repos_upstream_deb_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Debian upstream config for this repository. + +Delete a Debian upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_deb_list** +> Vec<::models::DebUpstream> repos_upstream_deb_list(ctx, ctx, owner, identifier, optional) +List Debian upstream configs for this repository. + +List Debian upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::DebUpstream>**](DebUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_deb_partial_update** +> ::models::DebUpstream repos_upstream_deb_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Debian upstream config for this repository. + +Partially update a Debian upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**DebUpstreamRequestPatch**](DebUpstreamRequestPatch.md)| | + +### Return type + +[**::models::DebUpstream**](DebUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_deb_read** +> ::models::DebUpstream repos_upstream_deb_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Debian upstream config for this repository. + +Retrieve a Debian upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::DebUpstream**](DebUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_deb_update** +> ::models::DebUpstream repos_upstream_deb_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Debian upstream config for this repository. + +Update a Debian upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**DebUpstreamRequest**](DebUpstreamRequest.md)| | + +### Return type + +[**::models::DebUpstream**](DebUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_docker_create** +> ::models::DockerUpstream repos_upstream_docker_create(ctx, ctx, owner, identifier, optional) +Create a Docker upstream config for this repository. + +Create a Docker upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**DockerUpstreamRequest**](DockerUpstreamRequest.md)| | + +### Return type + +[**::models::DockerUpstream**](DockerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_docker_delete** +> repos_upstream_docker_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Docker upstream config for this repository. + +Delete a Docker upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_docker_list** +> Vec<::models::DockerUpstream> repos_upstream_docker_list(ctx, ctx, owner, identifier, optional) +List Docker upstream configs for this repository. + +List Docker upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::DockerUpstream>**](DockerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_docker_partial_update** +> ::models::DockerUpstream repos_upstream_docker_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Docker upstream config for this repository. + +Partially update a Docker upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**DockerUpstreamRequestPatch**](DockerUpstreamRequestPatch.md)| | + +### Return type + +[**::models::DockerUpstream**](DockerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_docker_read** +> ::models::DockerUpstream repos_upstream_docker_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Docker upstream config for this repository. + +Retrieve a Docker upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::DockerUpstream**](DockerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_docker_update** +> ::models::DockerUpstream repos_upstream_docker_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Docker upstream config for this repository. + +Update a Docker upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**DockerUpstreamRequest**](DockerUpstreamRequest.md)| | + +### Return type + +[**::models::DockerUpstream**](DockerUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_helm_create** +> ::models::HelmUpstream repos_upstream_helm_create(ctx, ctx, owner, identifier, optional) +Create a Helm upstream config for this repository. + +Create a Helm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**HelmUpstreamRequest**](HelmUpstreamRequest.md)| | + +### Return type + +[**::models::HelmUpstream**](HelmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_helm_delete** +> repos_upstream_helm_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Helm upstream config for this repository. + +Delete a Helm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_helm_list** +> Vec<::models::HelmUpstream> repos_upstream_helm_list(ctx, ctx, owner, identifier, optional) +List Helm upstream configs for this repository. + +List Helm upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::HelmUpstream>**](HelmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_helm_partial_update** +> ::models::HelmUpstream repos_upstream_helm_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Helm upstream config for this repository. + +Partially update a Helm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**HelmUpstreamRequestPatch**](HelmUpstreamRequestPatch.md)| | + +### Return type + +[**::models::HelmUpstream**](HelmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_helm_read** +> ::models::HelmUpstream repos_upstream_helm_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Helm upstream config for this repository. + +Retrieve a Helm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::HelmUpstream**](HelmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_helm_update** +> ::models::HelmUpstream repos_upstream_helm_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Helm upstream config for this repository. + +Update a Helm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**HelmUpstreamRequest**](HelmUpstreamRequest.md)| | + +### Return type + +[**::models::HelmUpstream**](HelmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_hex_create** +> ::models::HexUpstream repos_upstream_hex_create(ctx, ctx, owner, identifier, optional) +Create a Hex upstream config for this repository. + +Create a Hex upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**HexUpstreamRequest**](HexUpstreamRequest.md)| | + +### Return type + +[**::models::HexUpstream**](HexUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_hex_delete** +> repos_upstream_hex_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Hex upstream config for this repository. + +Delete a Hex upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_hex_list** +> Vec<::models::HexUpstream> repos_upstream_hex_list(ctx, ctx, owner, identifier, optional) +List Hex upstream configs for this repository. + +List Hex upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::HexUpstream>**](HexUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_hex_partial_update** +> ::models::HexUpstream repos_upstream_hex_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Hex upstream config for this repository. + +Partially update a Hex upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**HexUpstreamRequestPatch**](HexUpstreamRequestPatch.md)| | + +### Return type + +[**::models::HexUpstream**](HexUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_hex_read** +> ::models::HexUpstream repos_upstream_hex_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Hex upstream config for this repository. + +Retrieve a Hex upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::HexUpstream**](HexUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_hex_update** +> ::models::HexUpstream repos_upstream_hex_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Hex upstream config for this repository. + +Update a Hex upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**HexUpstreamRequest**](HexUpstreamRequest.md)| | + +### Return type + +[**::models::HexUpstream**](HexUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_maven_create** +> ::models::MavenUpstream repos_upstream_maven_create(ctx, ctx, owner, identifier, optional) +Create a Maven upstream config for this repository. + +Create a Maven upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**MavenUpstreamRequest**](MavenUpstreamRequest.md)| | + +### Return type + +[**::models::MavenUpstream**](MavenUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_maven_delete** +> repos_upstream_maven_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Maven upstream config for this repository. + +Delete a Maven upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_maven_list** +> Vec<::models::MavenUpstream> repos_upstream_maven_list(ctx, ctx, owner, identifier, optional) +List Maven upstream configs for this repository. + +List Maven upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::MavenUpstream>**](MavenUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_maven_partial_update** +> ::models::MavenUpstream repos_upstream_maven_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Maven upstream config for this repository. + +Partially update a Maven upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**MavenUpstreamRequestPatch**](MavenUpstreamRequestPatch.md)| | + +### Return type + +[**::models::MavenUpstream**](MavenUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_maven_read** +> ::models::MavenUpstream repos_upstream_maven_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Maven upstream config for this repository. + +Retrieve a Maven upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::MavenUpstream**](MavenUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_maven_update** +> ::models::MavenUpstream repos_upstream_maven_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Maven upstream config for this repository. + +Update a Maven upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**MavenUpstreamRequest**](MavenUpstreamRequest.md)| | + +### Return type + +[**::models::MavenUpstream**](MavenUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_npm_create** +> ::models::NpmUpstream repos_upstream_npm_create(ctx, ctx, owner, identifier, optional) +Create a npm upstream config for this repository. + +Create a npm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**NpmUpstreamRequest**](NpmUpstreamRequest.md)| | + +### Return type + +[**::models::NpmUpstream**](NpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_npm_delete** +> repos_upstream_npm_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a npm upstream config for this repository. + +Delete a npm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_npm_list** +> Vec<::models::NpmUpstream> repos_upstream_npm_list(ctx, ctx, owner, identifier, optional) +List npm upstream configs for this repository. + +List npm upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::NpmUpstream>**](NpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_npm_partial_update** +> ::models::NpmUpstream repos_upstream_npm_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a npm upstream config for this repository. + +Partially update a npm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**NpmUpstreamRequestPatch**](NpmUpstreamRequestPatch.md)| | + +### Return type + +[**::models::NpmUpstream**](NpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_npm_read** +> ::models::NpmUpstream repos_upstream_npm_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a npm upstream config for this repository. + +Retrieve a npm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::NpmUpstream**](NpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_npm_update** +> ::models::NpmUpstream repos_upstream_npm_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a npm upstream config for this repository. + +Update a npm upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**NpmUpstreamRequest**](NpmUpstreamRequest.md)| | + +### Return type + +[**::models::NpmUpstream**](NpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_nuget_create** +> ::models::NugetUpstream repos_upstream_nuget_create(ctx, ctx, owner, identifier, optional) +Create a NuGet upstream config for this repository. + +Create a NuGet upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**NugetUpstreamRequest**](NugetUpstreamRequest.md)| | + +### Return type + +[**::models::NugetUpstream**](NugetUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_nuget_delete** +> repos_upstream_nuget_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a NuGet upstream config for this repository. + +Delete a NuGet upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_nuget_list** +> Vec<::models::NugetUpstream> repos_upstream_nuget_list(ctx, ctx, owner, identifier, optional) +List NuGet upstream configs for this repository. + +List NuGet upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::NugetUpstream>**](NugetUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_nuget_partial_update** +> ::models::NugetUpstream repos_upstream_nuget_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a NuGet upstream config for this repository. + +Partially update a NuGet upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**NugetUpstreamRequestPatch**](NugetUpstreamRequestPatch.md)| | + +### Return type + +[**::models::NugetUpstream**](NugetUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_nuget_read** +> ::models::NugetUpstream repos_upstream_nuget_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a NuGet upstream config for this repository. + +Retrieve a NuGet upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::NugetUpstream**](NugetUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_nuget_update** +> ::models::NugetUpstream repos_upstream_nuget_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a NuGet upstream config for this repository. + +Update a NuGet upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**NugetUpstreamRequest**](NugetUpstreamRequest.md)| | + +### Return type + +[**::models::NugetUpstream**](NugetUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_python_create** +> ::models::PythonUpstream repos_upstream_python_create(ctx, ctx, owner, identifier, optional) +Create a Python upstream config for this repository. + +Create a Python upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**PythonUpstreamRequest**](PythonUpstreamRequest.md)| | + +### Return type + +[**::models::PythonUpstream**](PythonUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_python_delete** +> repos_upstream_python_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Python upstream config for this repository. + +Delete a Python upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_python_list** +> Vec<::models::PythonUpstream> repos_upstream_python_list(ctx, ctx, owner, identifier, optional) +List Python upstream configs for this repository. + +List Python upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::PythonUpstream>**](PythonUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_python_partial_update** +> ::models::PythonUpstream repos_upstream_python_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Python upstream config for this repository. + +Partially update a Python upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**PythonUpstreamRequestPatch**](PythonUpstreamRequestPatch.md)| | + +### Return type + +[**::models::PythonUpstream**](PythonUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_python_read** +> ::models::PythonUpstream repos_upstream_python_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Python upstream config for this repository. + +Retrieve a Python upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::PythonUpstream**](PythonUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_python_update** +> ::models::PythonUpstream repos_upstream_python_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Python upstream config for this repository. + +Update a Python upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**PythonUpstreamRequest**](PythonUpstreamRequest.md)| | + +### Return type + +[**::models::PythonUpstream**](PythonUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_rpm_create** +> ::models::RpmUpstream repos_upstream_rpm_create(ctx, ctx, owner, identifier, optional) +Create a RedHat upstream config for this repository. + +Create a RedHat upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RpmUpstreamRequest**](RpmUpstreamRequest.md)| | + +### Return type + +[**::models::RpmUpstream**](RpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_rpm_delete** +> repos_upstream_rpm_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a RedHat upstream config for this repository. + +Delete a RedHat upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_rpm_list** +> Vec<::models::RpmUpstream> repos_upstream_rpm_list(ctx, ctx, owner, identifier, optional) +List RedHat upstream configs for this repository. + +List RedHat upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::RpmUpstream>**](RpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_rpm_partial_update** +> ::models::RpmUpstream repos_upstream_rpm_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a RedHat upstream config for this repository. + +Partially update a RedHat upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**RpmUpstreamRequestPatch**](RpmUpstreamRequestPatch.md)| | + +### Return type + +[**::models::RpmUpstream**](RpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_rpm_read** +> ::models::RpmUpstream repos_upstream_rpm_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a RedHat upstream config for this repository. + +Retrieve a RedHat upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::RpmUpstream**](RpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_rpm_update** +> ::models::RpmUpstream repos_upstream_rpm_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a RedHat upstream config for this repository. + +Update a RedHat upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**RpmUpstreamRequest**](RpmUpstreamRequest.md)| | + +### Return type + +[**::models::RpmUpstream**](RpmUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_ruby_create** +> ::models::RubyUpstream repos_upstream_ruby_create(ctx, ctx, owner, identifier, optional) +Create a Ruby upstream config for this repository. + +Create a Ruby upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**RubyUpstreamRequest**](RubyUpstreamRequest.md)| | + +### Return type + +[**::models::RubyUpstream**](RubyUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_ruby_delete** +> repos_upstream_ruby_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Ruby upstream config for this repository. + +Delete a Ruby upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_ruby_list** +> Vec<::models::RubyUpstream> repos_upstream_ruby_list(ctx, ctx, owner, identifier, optional) +List Ruby upstream configs for this repository. + +List Ruby upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::RubyUpstream>**](RubyUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_ruby_partial_update** +> ::models::RubyUpstream repos_upstream_ruby_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Ruby upstream config for this repository. + +Partially update a Ruby upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**RubyUpstreamRequestPatch**](RubyUpstreamRequestPatch.md)| | + +### Return type + +[**::models::RubyUpstream**](RubyUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_ruby_read** +> ::models::RubyUpstream repos_upstream_ruby_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Ruby upstream config for this repository. + +Retrieve a Ruby upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::RubyUpstream**](RubyUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_ruby_update** +> ::models::RubyUpstream repos_upstream_ruby_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Ruby upstream config for this repository. + +Update a Ruby upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**RubyUpstreamRequest**](RubyUpstreamRequest.md)| | + +### Return type + +[**::models::RubyUpstream**](RubyUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_swift_create** +> ::models::SwiftUpstream repos_upstream_swift_create(ctx, ctx, owner, identifier, optional) +Create a Swift upstream config for this repository. + +Create a Swift upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **data** | [**SwiftUpstreamRequest**](SwiftUpstreamRequest.md)| | + +### Return type + +[**::models::SwiftUpstream**](SwiftUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_swift_delete** +> repos_upstream_swift_delete(ctx, ctx, owner, identifier, slug_perm) +Delete a Swift upstream config for this repository. + +Delete a Swift upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_swift_list** +> Vec<::models::SwiftUpstream> repos_upstream_swift_list(ctx, ctx, owner, identifier, optional) +List Swift upstream configs for this repository. + +List Swift upstream configs for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::SwiftUpstream>**](SwiftUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_swift_partial_update** +> ::models::SwiftUpstream repos_upstream_swift_partial_update(ctx, ctx, owner, identifier, slug_perm, optional) +Partially update a Swift upstream config for this repository. + +Partially update a Swift upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**SwiftUpstreamRequestPatch**](SwiftUpstreamRequestPatch.md)| | + +### Return type + +[**::models::SwiftUpstream**](SwiftUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_swift_read** +> ::models::SwiftUpstream repos_upstream_swift_read(ctx, ctx, owner, identifier, slug_perm) +Retrieve a Swift upstream config for this repository. + +Retrieve a Swift upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + +### Return type + +[**::models::SwiftUpstream**](SwiftUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_upstream_swift_update** +> ::models::SwiftUpstream repos_upstream_swift_update(ctx, ctx, owner, identifier, slug_perm, optional) +Update a Swift upstream config for this repository. + +Update a Swift upstream config for this repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **identifier** | **String**| | + **slug_perm** | **String**| | + **data** | [**SwiftUpstreamRequest**](SwiftUpstreamRequest.md)| | + +### Return type + +[**::models::SwiftUpstream**](SwiftUpstream.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_user_list** +> Vec<::models::Repository> repos_user_list(ctx, ctx, optional) +Get a list of all repositories associated with current user. + +Get a list of all repositories associated with current user. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::Repository>**](Repository.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_x509_ecdsa_list** +> ::models::RepositoryX509EcdsaCertificate repos_x509_ecdsa_list(ctx, ctx, owner, identifier) +Retrieve the active X.509 ECDSA certificate for the Repository. + +Retrieve the active X.509 ECDSA certificate for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryX509EcdsaCertificate**](RepositoryX509EcdsaCertificate.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repos_x509_rsa_list** +> ::models::RepositoryX509RsaCertificate repos_x509_rsa_list(ctx, ctx, owner, identifier) +Retrieve the active X.509 RSA certificate for the Repository. + +Retrieve the active X.509 RSA certificate for the Repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryX509RsaCertificate**](RepositoryX509RsaCertificate.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/Repository.md b/bindings/rust/src/docs/Repository.md new file mode 100644 index 00000000..600068a4 --- /dev/null +++ b/bindings/rust/src/docs/Repository.md @@ -0,0 +1,73 @@ +# Repository + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cdn_url** | **String** | Base URL from which packages and other artifacts are downloaded. | [optional] [default to null] +**content_kind** | **String** | The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. | [optional] [default to null] +**contextual_auth_realm** | **bool** | If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. | [optional] [default to null] +**copy_own** | **bool** | If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**copy_packages** | **String** | This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**default_privilege** | **String** | This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. | [optional] [default to null] +**delete_own** | **bool** | If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**delete_packages** | **String** | This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. | [optional] [default to null] +**deleted_at** | **String** | The datetime the repository was manually deleted at. | [optional] [default to null] +**description** | **String** | A description of the repository's purpose/contents. | [optional] [default to null] +**distributes** | **Vec** | The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. | [optional] [default to null] +**docker_refresh_tokens_enabled** | **bool** | If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. | [optional] [default to null] +**ecdsa_keys** | [**Vec<::models::RepositoryEcdsaKey>**](RepositoryEcdsaKey.md) | | [optional] [default to null] +**enforce_eula** | **bool** | If checked, downloads will explicitly require acceptance of an EULA. | [optional] [default to null] +**gpg_keys** | [**Vec<::models::RepositoryGpgKey>**](RepositoryGpgKey.md) | | [optional] [default to null] +**index_files** | **bool** | If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. | [optional] [default to null] +**is_open_source** | **bool** | | [optional] [default to null] +**is_private** | **bool** | | [optional] [default to null] +**is_public** | **bool** | | [optional] [default to null] +**manage_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. | [optional] [default to null] +**move_own** | **bool** | If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**move_packages** | **String** | This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. | [optional] [default to null] +**name** | **String** | A descriptive name for the repository. | [default to null] +**namespace** | **String** | Namespace to which this repository belongs. | [optional] [default to null] +**namespace_url** | **String** | API endpoint where data about this namespace can be retrieved. | [optional] [default to null] +**nuget_native_signing_enabled** | **bool** | When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. | [optional] [default to null] +**num_downloads** | **i32** | The number of downloads for packages in the repository. | [optional] [default to null] +**num_policy_violated_packages** | **i32** | Number of packages with policy violations in a repository. | [optional] [default to null] +**num_quarantined_packages** | **i32** | Number of quarantined packages in a repository. | [optional] [default to null] +**open_source_license** | **String** | The SPDX identifier of the open source license. | [optional] [default to null] +**open_source_project_url** | **String** | The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. | [optional] [default to null] +**package_count** | **i32** | The number of packages in the repository. | [optional] [default to null] +**package_group_count** | **i32** | The number of groups in the repository. | [optional] [default to null] +**proxy_npmjs** | **bool** | If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**proxy_pypi** | **bool** | If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**raw_package_index_enabled** | **bool** | If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. | [optional] [default to null] +**raw_package_index_signatures_enabled** | **bool** | If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. | [optional] [default to null] +**replace_packages** | **String** | This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. | [optional] [default to null] +**replace_packages_by_default** | **bool** | If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. | [optional] [default to null] +**repository_type** | **i32** | The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time. | [optional] [default to null] +**repository_type_str** | **String** | The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. | [optional] [default to null] +**resync_own** | **bool** | If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**resync_packages** | **String** | This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. | [optional] [default to null] +**scan_own** | **bool** | If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**scan_packages** | **String** | This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. | [optional] [default to null] +**self_html_url** | **String** | Website URL for this repository. | [optional] [default to null] +**self_url** | **String** | API endpoint where data about this repository can be retrieved. | [optional] [default to null] +**show_setup_all** | **bool** | If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. | [optional] [default to null] +**size** | **i32** | The calculated size of the repository. | [optional] [default to null] +**size_str** | **String** | The calculated size of the repository (human readable). | [optional] [default to null] +**slug** | **String** | The slug identifies the repository in URIs. | [optional] [default to null] +**slug_perm** | **String** | The slug_perm immutably identifies the repository. It will never change once a repository has been created. | [optional] [default to null] +**storage_region** | **String** | The Cloudsmith region in which package files are stored. | [optional] [default to null] +**strict_npm_validation** | **bool** | If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. | [optional] [default to null] +**tag_pre_releases_as_latest** | **bool** | If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools | [optional] [default to null] +**use_debian_labels** | **bool** | If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-<identifier>'; or 'source=none' if no token was used. You can use this to help with pinning. | [optional] [default to null] +**use_default_cargo_upstream** | **bool** | If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. | [optional] [default to null] +**use_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). | [optional] [default to null] +**use_noarch_packages** | **bool** | If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). | [optional] [default to null] +**use_source_packages** | **bool** | If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. | [optional] [default to null] +**use_vulnerability_scanning** | **bool** | If checked, vulnerability scanning will be enabled for all supported packages within this repository. | [optional] [default to null] +**user_entitlements_enabled** | **bool** | If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. | [optional] [default to null] +**view_statistics** | **String** | This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryAuditLog.md b/bindings/rust/src/docs/RepositoryAuditLog.md new file mode 100644 index 00000000..692e53aa --- /dev/null +++ b/bindings/rust/src/docs/RepositoryAuditLog.md @@ -0,0 +1,22 @@ +# RepositoryAuditLog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actor** | **String** | | [default to null] +**actor_ip_address** | **String** | | [default to null] +**actor_kind** | **String** | | [optional] [default to null] +**actor_location** | [***::models::GeoIpLocation**](GeoIpLocation.md) | | [default to null] +**actor_slug_perm** | **String** | | [default to null] +**actor_url** | **String** | | [optional] [default to null] +**context** | **String** | | [default to null] +**event** | **String** | | [default to null] +**event_at** | **String** | | [default to null] +**object** | **String** | | [default to null] +**object_kind** | **String** | | [default to null] +**object_slug_perm** | **String** | | [default to null] +**uuid** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryCreate.md b/bindings/rust/src/docs/RepositoryCreate.md new file mode 100644 index 00000000..2b1296af --- /dev/null +++ b/bindings/rust/src/docs/RepositoryCreate.md @@ -0,0 +1,73 @@ +# RepositoryCreate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cdn_url** | **String** | Base URL from which packages and other artifacts are downloaded. | [optional] [default to null] +**content_kind** | **String** | The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. | [optional] [default to null] +**contextual_auth_realm** | **bool** | If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. | [optional] [default to null] +**copy_own** | **bool** | If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**copy_packages** | **String** | This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**default_privilege** | **String** | This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. | [optional] [default to null] +**delete_own** | **bool** | If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**delete_packages** | **String** | This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. | [optional] [default to null] +**deleted_at** | **String** | The datetime the repository was manually deleted at. | [optional] [default to null] +**description** | **String** | A description of the repository's purpose/contents. | [optional] [default to null] +**distributes** | **Vec** | The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. | [optional] [default to null] +**docker_refresh_tokens_enabled** | **bool** | If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. | [optional] [default to null] +**ecdsa_keys** | [**Vec<::models::RepositoryEcdsaKey>**](RepositoryEcdsaKey.md) | | [optional] [default to null] +**enforce_eula** | **bool** | If checked, downloads will explicitly require acceptance of an EULA. | [optional] [default to null] +**gpg_keys** | [**Vec<::models::RepositoryGpgKey>**](RepositoryGpgKey.md) | | [optional] [default to null] +**index_files** | **bool** | If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. | [optional] [default to null] +**is_open_source** | **bool** | | [optional] [default to null] +**is_private** | **bool** | | [optional] [default to null] +**is_public** | **bool** | | [optional] [default to null] +**manage_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. | [optional] [default to null] +**move_own** | **bool** | If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**move_packages** | **String** | This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. | [optional] [default to null] +**name** | **String** | A descriptive name for the repository. | [default to null] +**namespace** | **String** | Namespace to which this repository belongs. | [optional] [default to null] +**namespace_url** | **String** | API endpoint where data about this namespace can be retrieved. | [optional] [default to null] +**nuget_native_signing_enabled** | **bool** | When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. | [optional] [default to null] +**num_downloads** | **i32** | The number of downloads for packages in the repository. | [optional] [default to null] +**num_policy_violated_packages** | **i32** | Number of packages with policy violations in a repository. | [optional] [default to null] +**num_quarantined_packages** | **i32** | Number of quarantined packages in a repository. | [optional] [default to null] +**open_source_license** | **String** | The SPDX identifier of the open source license. | [optional] [default to null] +**open_source_project_url** | **String** | The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. | [optional] [default to null] +**package_count** | **i32** | The number of packages in the repository. | [optional] [default to null] +**package_group_count** | **i32** | The number of groups in the repository. | [optional] [default to null] +**proxy_npmjs** | **bool** | If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**proxy_pypi** | **bool** | If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**raw_package_index_enabled** | **bool** | If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. | [optional] [default to null] +**raw_package_index_signatures_enabled** | **bool** | If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. | [optional] [default to null] +**replace_packages** | **String** | This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. | [optional] [default to null] +**replace_packages_by_default** | **bool** | If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. | [optional] [default to null] +**repository_type** | **i32** | The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time. | [optional] [default to null] +**repository_type_str** | **String** | The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. | [optional] [default to null] +**resync_own** | **bool** | If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**resync_packages** | **String** | This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. | [optional] [default to null] +**scan_own** | **bool** | If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**scan_packages** | **String** | This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. | [optional] [default to null] +**self_html_url** | **String** | Website URL for this repository. | [optional] [default to null] +**self_url** | **String** | API endpoint where data about this repository can be retrieved. | [optional] [default to null] +**show_setup_all** | **bool** | If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. | [optional] [default to null] +**size** | **i32** | The calculated size of the repository. | [optional] [default to null] +**size_str** | **String** | The calculated size of the repository (human readable). | [optional] [default to null] +**slug** | **String** | The slug identifies the repository in URIs. | [optional] [default to null] +**slug_perm** | **String** | The slug_perm immutably identifies the repository. It will never change once a repository has been created. | [optional] [default to null] +**storage_region** | **String** | The Cloudsmith region in which package files are stored. | [optional] [default to null] +**strict_npm_validation** | **bool** | If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. | [optional] [default to null] +**tag_pre_releases_as_latest** | **bool** | If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools | [optional] [default to null] +**use_debian_labels** | **bool** | If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-<identifier>'; or 'source=none' if no token was used. You can use this to help with pinning. | [optional] [default to null] +**use_default_cargo_upstream** | **bool** | If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. | [optional] [default to null] +**use_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). | [optional] [default to null] +**use_noarch_packages** | **bool** | If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). | [optional] [default to null] +**use_source_packages** | **bool** | If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. | [optional] [default to null] +**use_vulnerability_scanning** | **bool** | If checked, vulnerability scanning will be enabled for all supported packages within this repository. | [optional] [default to null] +**user_entitlements_enabled** | **bool** | If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. | [optional] [default to null] +**view_statistics** | **String** | This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryCreateRequest.md b/bindings/rust/src/docs/RepositoryCreateRequest.md new file mode 100644 index 00000000..618a6817 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryCreateRequest.md @@ -0,0 +1,52 @@ +# RepositoryCreateRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_kind** | **String** | The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. | [optional] [default to null] +**contextual_auth_realm** | **bool** | If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. | [optional] [default to null] +**copy_own** | **bool** | If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**copy_packages** | **String** | This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. | [optional] [default to null] +**default_privilege** | **String** | This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. | [optional] [default to null] +**delete_own** | **bool** | If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**delete_packages** | **String** | This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. | [optional] [default to null] +**description** | **String** | A description of the repository's purpose/contents. | [optional] [default to null] +**distributes** | **Vec** | The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. | [optional] [default to null] +**docker_refresh_tokens_enabled** | **bool** | If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. | [optional] [default to null] +**enforce_eula** | **bool** | If checked, downloads will explicitly require acceptance of an EULA. | [optional] [default to null] +**index_files** | **bool** | If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. | [optional] [default to null] +**manage_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. | [optional] [default to null] +**move_own** | **bool** | If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**move_packages** | **String** | This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. | [optional] [default to null] +**name** | **String** | A descriptive name for the repository. | [default to null] +**nuget_native_signing_enabled** | **bool** | When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. | [optional] [default to null] +**open_source_license** | **String** | The SPDX identifier of the open source license. | [optional] [default to null] +**open_source_project_url** | **String** | The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. | [optional] [default to null] +**proxy_npmjs** | **bool** | If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**proxy_pypi** | **bool** | If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**raw_package_index_enabled** | **bool** | If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. | [optional] [default to null] +**raw_package_index_signatures_enabled** | **bool** | If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. | [optional] [default to null] +**replace_packages** | **String** | This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. | [optional] [default to null] +**replace_packages_by_default** | **bool** | If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. | [optional] [default to null] +**repository_type_str** | **String** | The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. | [optional] [default to null] +**resync_own** | **bool** | If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**resync_packages** | **String** | This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. | [optional] [default to null] +**scan_own** | **bool** | If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**scan_packages** | **String** | This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. | [optional] [default to null] +**show_setup_all** | **bool** | If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. | [optional] [default to null] +**slug** | **String** | The slug identifies the repository in URIs. | [optional] [default to null] +**storage_region** | **String** | The Cloudsmith region in which package files are stored. | [optional] [default to null] +**strict_npm_validation** | **bool** | If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. | [optional] [default to null] +**tag_pre_releases_as_latest** | **bool** | If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools | [optional] [default to null] +**use_debian_labels** | **bool** | If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-<identifier>'; or 'source=none' if no token was used. You can use this to help with pinning. | [optional] [default to null] +**use_default_cargo_upstream** | **bool** | If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. | [optional] [default to null] +**use_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). | [optional] [default to null] +**use_noarch_packages** | **bool** | If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). | [optional] [default to null] +**use_source_packages** | **bool** | If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. | [optional] [default to null] +**use_vulnerability_scanning** | **bool** | If checked, vulnerability scanning will be enabled for all supported packages within this repository. | [optional] [default to null] +**user_entitlements_enabled** | **bool** | If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. | [optional] [default to null] +**view_statistics** | **String** | This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryEcdsaKey.md b/bindings/rust/src/docs/RepositoryEcdsaKey.md new file mode 100644 index 00000000..45e85e01 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryEcdsaKey.md @@ -0,0 +1,16 @@ +# RepositoryEcdsaKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | If selected this is the active key for this repository. | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default key for this repository. | [optional] [default to null] +**fingerprint** | **String** | The long identifier used by ECDSA for this key. | [optional] [default to null] +**fingerprint_short** | **String** | | [optional] [default to null] +**public_key** | **String** | The public key given to repository users. | [optional] [default to null] +**ssh_fingerprint** | **String** | The SSH fingerprint used by ECDSA for this key. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryEcdsaKeyCreate.md b/bindings/rust/src/docs/RepositoryEcdsaKeyCreate.md new file mode 100644 index 00000000..1144d50c --- /dev/null +++ b/bindings/rust/src/docs/RepositoryEcdsaKeyCreate.md @@ -0,0 +1,11 @@ +# RepositoryEcdsaKeyCreate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ecdsa_passphrase** | **String** | The ECDSA passphrase used for signing. | [optional] [default to null] +**ecdsa_private_key** | **String** | The ECDSA private key. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpCidr.md b/bindings/rust/src/docs/RepositoryGeoIpCidr.md new file mode 100644 index 00000000..96c9b1aa --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpCidr.md @@ -0,0 +1,11 @@ +# RepositoryGeoIpCidr + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow** | **Vec** | The allowed CIDRs for this repository | [default to null] +**deny** | **Vec** | The denied CIDRs for this repository | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpCountryCode.md b/bindings/rust/src/docs/RepositoryGeoIpCountryCode.md new file mode 100644 index 00000000..f633685d --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpCountryCode.md @@ -0,0 +1,11 @@ +# RepositoryGeoIpCountryCode + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow** | **Vec** | The allowed country codes for this repository | [default to null] +**deny** | **Vec** | The denied country codes for this repository | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpRules.md b/bindings/rust/src/docs/RepositoryGeoIpRules.md new file mode 100644 index 00000000..f76df7b6 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpRules.md @@ -0,0 +1,11 @@ +# RepositoryGeoIpRules + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cidr** | [***::models::RepositoryGeoIpCidr**](RepositoryGeoIpCidr.md) | | [default to null] +**country_code** | [***::models::RepositoryGeoIpCountryCode**](RepositoryGeoIpCountryCode.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpRulesRequest.md b/bindings/rust/src/docs/RepositoryGeoIpRulesRequest.md new file mode 100644 index 00000000..b1df5707 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpRulesRequest.md @@ -0,0 +1,11 @@ +# RepositoryGeoIpRulesRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cidr** | [***::models::RepositoryGeoIpCidr**](RepositoryGeoIpCidr.md) | | [default to null] +**country_code** | [***::models::RepositoryGeoIpCountryCode**](RepositoryGeoIpCountryCode.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpRulesRequestPatch.md b/bindings/rust/src/docs/RepositoryGeoIpRulesRequestPatch.md new file mode 100644 index 00000000..a75a0b38 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpRulesRequestPatch.md @@ -0,0 +1,11 @@ +# RepositoryGeoIpRulesRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cidr** | [***::models::RepositoryGeoIpCidr**](RepositoryGeoIpCidr.md) | | [optional] [default to null] +**country_code** | [***::models::RepositoryGeoIpCountryCode**](RepositoryGeoIpCountryCode.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpStatus.md b/bindings/rust/src/docs/RepositoryGeoIpStatus.md new file mode 100644 index 00000000..a7ee1b14 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpStatus.md @@ -0,0 +1,10 @@ +# RepositoryGeoIpStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**geoip_enabled** | **bool** | If checked, any access to the website or downloads for this repository is allowed/denied according to the configured Geo/IP restriction rules. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpTestAddress.md b/bindings/rust/src/docs/RepositoryGeoIpTestAddress.md new file mode 100644 index 00000000..d39bb821 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpTestAddress.md @@ -0,0 +1,10 @@ +# RepositoryGeoIpTestAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addresses** | **Vec** | The IP addresses to test against this repository | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpTestAddressResponse.md b/bindings/rust/src/docs/RepositoryGeoIpTestAddressResponse.md new file mode 100644 index 00000000..f5860675 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpTestAddressResponse.md @@ -0,0 +1,10 @@ +# RepositoryGeoIpTestAddressResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addresses** | [**Vec<::models::RepositoryGeoIpTestAddressResponseDict>**](RepositoryGeoIpTestAddressResponseDict.md) | The IP address test results ordered by allowed | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGeoIpTestAddressResponseDict.md b/bindings/rust/src/docs/RepositoryGeoIpTestAddressResponseDict.md new file mode 100644 index 00000000..54645b1e --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGeoIpTestAddressResponseDict.md @@ -0,0 +1,13 @@ +# RepositoryGeoIpTestAddressResponseDict + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed** | **bool** | The result of the IP test | [default to null] +**country_code** | **String** | The country code of the tested IP address | [default to null] +**ip_address** | **String** | The IP address that was tested | [default to null] +**reason** | **String** | The reason for the result | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGpgKey.md b/bindings/rust/src/docs/RepositoryGpgKey.md new file mode 100644 index 00000000..acbadc64 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGpgKey.md @@ -0,0 +1,16 @@ +# RepositoryGpgKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | If selected this is the active key for this repository. | [optional] [default to null] +**comment** | **String** | | [default to null] +**created_at** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default key for this repository. | [optional] [default to null] +**fingerprint** | **String** | The long identifier used by GPG for this key. | [optional] [default to null] +**fingerprint_short** | **String** | | [optional] [default to null] +**public_key** | **String** | The public key given to repository users. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryGpgKeyCreate.md b/bindings/rust/src/docs/RepositoryGpgKeyCreate.md new file mode 100644 index 00000000..7fd995f7 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryGpgKeyCreate.md @@ -0,0 +1,11 @@ +# RepositoryGpgKeyCreate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gpg_passphrase** | **String** | The GPG passphrase used for signing. | [optional] [default to null] +**gpg_private_key** | **String** | The GPG private key. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryPrivilegeDict.md b/bindings/rust/src/docs/RepositoryPrivilegeDict.md new file mode 100644 index 00000000..3b042464 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryPrivilegeDict.md @@ -0,0 +1,13 @@ +# RepositoryPrivilegeDict + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**privilege** | **String** | The level of privilege that the user or team should be granted to the specified repository. | [default to null] +**service** | **String** | The service identifier (slug). | [optional] [default to null] +**team** | **String** | The team identifier (slug). | [optional] [default to null] +**user** | **String** | The user identifier (slug). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryPrivilegeInput.md b/bindings/rust/src/docs/RepositoryPrivilegeInput.md new file mode 100644 index 00000000..6db4223d --- /dev/null +++ b/bindings/rust/src/docs/RepositoryPrivilegeInput.md @@ -0,0 +1,10 @@ +# RepositoryPrivilegeInput + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**privileges** | [**Vec<::models::RepositoryPrivilegeDict>**](RepositoryPrivilegeDict.md) | List of objects with explicit privileges to the repository. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryPrivilegeInputRequest.md b/bindings/rust/src/docs/RepositoryPrivilegeInputRequest.md new file mode 100644 index 00000000..947d2b24 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryPrivilegeInputRequest.md @@ -0,0 +1,10 @@ +# RepositoryPrivilegeInputRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**privileges** | [**Vec<::models::RepositoryPrivilegeDict>**](RepositoryPrivilegeDict.md) | List of objects with explicit privileges to the repository. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryPrivilegeInputRequestPatch.md b/bindings/rust/src/docs/RepositoryPrivilegeInputRequestPatch.md new file mode 100644 index 00000000..ae8bf85a --- /dev/null +++ b/bindings/rust/src/docs/RepositoryPrivilegeInputRequestPatch.md @@ -0,0 +1,10 @@ +# RepositoryPrivilegeInputRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**privileges** | [**Vec<::models::RepositoryPrivilegeDict>**](RepositoryPrivilegeDict.md) | List of objects with explicit privileges to the repository. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryRequestPatch.md b/bindings/rust/src/docs/RepositoryRequestPatch.md new file mode 100644 index 00000000..dbd01b37 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryRequestPatch.md @@ -0,0 +1,51 @@ +# RepositoryRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_kind** | **String** | The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. | [optional] [default to null] +**contextual_auth_realm** | **bool** | If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. | [optional] [default to null] +**copy_own** | **bool** | If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**copy_packages** | **String** | This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. | [optional] [default to null] +**default_privilege** | **String** | This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. | [optional] [default to null] +**delete_own** | **bool** | If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**delete_packages** | **String** | This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. | [optional] [default to null] +**description** | **String** | A description of the repository's purpose/contents. | [optional] [default to null] +**distributes** | **Vec** | The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. | [optional] [default to null] +**docker_refresh_tokens_enabled** | **bool** | If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. | [optional] [default to null] +**enforce_eula** | **bool** | If checked, downloads will explicitly require acceptance of an EULA. | [optional] [default to null] +**index_files** | **bool** | If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. | [optional] [default to null] +**manage_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. | [optional] [default to null] +**move_own** | **bool** | If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**move_packages** | **String** | This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. | [optional] [default to null] +**name** | **String** | A descriptive name for the repository. | [optional] [default to null] +**nuget_native_signing_enabled** | **bool** | When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. | [optional] [default to null] +**open_source_license** | **String** | The SPDX identifier of the open source license. | [optional] [default to null] +**open_source_project_url** | **String** | The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. | [optional] [default to null] +**proxy_npmjs** | **bool** | If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**proxy_pypi** | **bool** | If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. | [optional] [default to null] +**raw_package_index_enabled** | **bool** | If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. | [optional] [default to null] +**raw_package_index_signatures_enabled** | **bool** | If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. | [optional] [default to null] +**replace_packages** | **String** | This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. | [optional] [default to null] +**replace_packages_by_default** | **bool** | If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. | [optional] [default to null] +**repository_type_str** | **String** | The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. | [optional] [default to null] +**resync_own** | **bool** | If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**resync_packages** | **String** | This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. | [optional] [default to null] +**scan_own** | **bool** | If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. | [optional] [default to null] +**scan_packages** | **String** | This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. | [optional] [default to null] +**show_setup_all** | **bool** | If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. | [optional] [default to null] +**slug** | **String** | The slug identifies the repository in URIs. | [optional] [default to null] +**strict_npm_validation** | **bool** | If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. | [optional] [default to null] +**tag_pre_releases_as_latest** | **bool** | If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools | [optional] [default to null] +**use_debian_labels** | **bool** | If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-<identifier>'; or 'source=none' if no token was used. You can use this to help with pinning. | [optional] [default to null] +**use_default_cargo_upstream** | **bool** | If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. | [optional] [default to null] +**use_entitlements_privilege** | **String** | This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). | [optional] [default to null] +**use_noarch_packages** | **bool** | If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). | [optional] [default to null] +**use_source_packages** | **bool** | If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. | [optional] [default to null] +**use_vulnerability_scanning** | **bool** | If checked, vulnerability scanning will be enabled for all supported packages within this repository. | [optional] [default to null] +**user_entitlements_enabled** | **bool** | If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. | [optional] [default to null] +**view_statistics** | **String** | This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryRetentionRules.md b/bindings/rust/src/docs/RepositoryRetentionRules.md new file mode 100644 index 00000000..db6d74fc --- /dev/null +++ b/bindings/rust/src/docs/RepositoryRetentionRules.md @@ -0,0 +1,16 @@ +# RepositoryRetentionRules + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**retention_count_limit** | **i32** | The maximum X number of packages to retain. | [optional] [default to null] +**retention_days_limit** | **i32** | The X number of days of packages to retain. | [optional] [default to null] +**retention_enabled** | **bool** | If checked, the retention lifecycle rules will be activated for the repository. Any packages that don't match will be deleted automatically, and the rest are retained. | [optional] [default to null] +**retention_group_by_format** | **bool** | If checked, retention will apply to packages by package formats rather than across all package formats.For example, when retaining by a limit of 1 and you upload PythonPkg 1.0 and RubyPkg 1.0, no packages are deleted because they are different formats. | [optional] [default to null] +**retention_group_by_name** | **bool** | If checked, retention will apply to groups of packages by name rather than all packages.<br>For example, when retaining by a limit of 1 and you upload PkgA 1.0, PkgB 1.0 and PkgB 1.1; only PkgB 1.0 is deleted because there are two (2) PkgBs and one (1) PkgA. | [optional] [default to null] +**retention_group_by_package_type** | **bool** | If checked, retention will apply to packages by package type (e.g. by binary, by source, etc.), rather than across all package types for one or more formats. <br>For example, when retaining by a limit of 1 and you upload DebPackage 1.0 and DebSourcePackage 1.0, no packages are deleted because they are different package types, binary and source respectively. | [optional] [default to null] +**retention_size_limit** | **i32** | The maximum X total size (in bytes) of packages to retain. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryRetentionRulesRequestPatch.md b/bindings/rust/src/docs/RepositoryRetentionRulesRequestPatch.md new file mode 100644 index 00000000..f7a4c5a1 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryRetentionRulesRequestPatch.md @@ -0,0 +1,16 @@ +# RepositoryRetentionRulesRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**retention_count_limit** | **i32** | The maximum X number of packages to retain. | [optional] [default to null] +**retention_days_limit** | **i32** | The X number of days of packages to retain. | [optional] [default to null] +**retention_enabled** | **bool** | If checked, the retention lifecycle rules will be activated for the repository. Any packages that don't match will be deleted automatically, and the rest are retained. | [optional] [default to null] +**retention_group_by_format** | **bool** | If checked, retention will apply to packages by package formats rather than across all package formats.For example, when retaining by a limit of 1 and you upload PythonPkg 1.0 and RubyPkg 1.0, no packages are deleted because they are different formats. | [optional] [default to null] +**retention_group_by_name** | **bool** | If checked, retention will apply to groups of packages by name rather than all packages.<br>For example, when retaining by a limit of 1 and you upload PkgA 1.0, PkgB 1.0 and PkgB 1.1; only PkgB 1.0 is deleted because there are two (2) PkgBs and one (1) PkgA. | [optional] [default to null] +**retention_group_by_package_type** | **bool** | If checked, retention will apply to packages by package type (e.g. by binary, by source, etc.), rather than across all package types for one or more formats. <br>For example, when retaining by a limit of 1 and you upload DebPackage 1.0 and DebSourcePackage 1.0, no packages are deleted because they are different package types, binary and source respectively. | [optional] [default to null] +**retention_size_limit** | **i32** | The maximum X total size (in bytes) of packages to retain. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryRsaKey.md b/bindings/rust/src/docs/RepositoryRsaKey.md new file mode 100644 index 00000000..103798e2 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryRsaKey.md @@ -0,0 +1,16 @@ +# RepositoryRsaKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | If selected this is the active key for this repository. | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default key for this repository. | [optional] [default to null] +**fingerprint** | **String** | The long identifier used by RSA for this key. | [optional] [default to null] +**fingerprint_short** | **String** | | [optional] [default to null] +**public_key** | **String** | The public key given to repository users. | [optional] [default to null] +**ssh_fingerprint** | **String** | The SSH fingerprint used by RSA for this key. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryRsaKeyCreate.md b/bindings/rust/src/docs/RepositoryRsaKeyCreate.md new file mode 100644 index 00000000..618df2f2 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryRsaKeyCreate.md @@ -0,0 +1,11 @@ +# RepositoryRsaKeyCreate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rsa_passphrase** | **String** | The RSA passphrase used for signing. | [optional] [default to null] +**rsa_private_key** | **String** | The RSA private key. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryToken.md b/bindings/rust/src/docs/RepositoryToken.md new file mode 100644 index 00000000..248482b5 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryToken.md @@ -0,0 +1,48 @@ +# RepositoryToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clients** | **i32** | | [optional] [default to null] +**created_at** | **String** | The datetime the token was updated at. | [optional] [default to null] +**created_by** | **String** | | [optional] [default to null] +**created_by_url** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default token for this repository. | [optional] [default to null] +**disable_url** | **String** | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**enable_url** | **String** | | [optional] [default to null] +**eula_accepted** | [***::models::Eula**](Eula.md) | | [optional] [default to null] +**eula_accepted_at** | **String** | The datetime the EULA was accepted at. | [optional] [default to null] +**eula_accepted_from** | **String** | | [optional] [default to null] +**eula_required** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null] +**has_limits** | **bool** | | [optional] [default to null] +**identifier** | **i32** | Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified an entitlement within a repository. | [optional] [default to null] +**is_active** | **bool** | If enabled, the token will allow downloads based on configured restrictions (if any). | [optional] [default to null] +**is_limited** | **bool** | | [optional] [default to null] +**limit_bandwidth** | **i32** | The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_bandwidth_unit** | **String** | | [optional] [default to null] +**limit_date_range_from** | **String** | The starting date/time the token is allowed to be used from. | [optional] [default to null] +**limit_date_range_to** | **String** | The ending date/time the token is allowed to be used until. | [optional] [default to null] +**limit_num_clients** | **i32** | The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_num_downloads** | **i32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_package_query** | **String** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null] +**limit_path_query** | **String** | THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null] +**metadata** | [***Value**](Value.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**refresh_url** | **String** | | [optional] [default to null] +**reset_url** | **String** | | [optional] [default to null] +**scheduled_reset_at** | **String** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null] +**scheduled_reset_period** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**token** | **String** | | [optional] [default to null] +**updated_at** | **String** | The datetime the token was updated at. | [optional] [default to null] +**updated_by** | **String** | | [optional] [default to null] +**updated_by_url** | **String** | | [optional] [default to null] +**usage** | **String** | | [optional] [default to null] +**user** | **String** | | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenAction.md b/bindings/rust/src/docs/RepositoryTokenAction.md new file mode 100644 index 00000000..f716fa19 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenAction.md @@ -0,0 +1,9 @@ +# RepositoryTokenAction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenRefresh.md b/bindings/rust/src/docs/RepositoryTokenRefresh.md new file mode 100644 index 00000000..aecf3e25 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenRefresh.md @@ -0,0 +1,48 @@ +# RepositoryTokenRefresh + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clients** | **i32** | | [optional] [default to null] +**created_at** | **String** | The datetime the token was updated at. | [optional] [default to null] +**created_by** | **String** | | [optional] [default to null] +**created_by_url** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default token for this repository. | [optional] [default to null] +**disable_url** | **String** | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**enable_url** | **String** | | [optional] [default to null] +**eula_accepted** | [***::models::Eula**](Eula.md) | | [optional] [default to null] +**eula_accepted_at** | **String** | The datetime the EULA was accepted at. | [optional] [default to null] +**eula_accepted_from** | **String** | | [optional] [default to null] +**eula_required** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null] +**has_limits** | **bool** | | [optional] [default to null] +**identifier** | **i32** | Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified an entitlement within a repository. | [optional] [default to null] +**is_active** | **bool** | If enabled, the token will allow downloads based on configured restrictions (if any). | [optional] [default to null] +**is_limited** | **bool** | | [optional] [default to null] +**limit_bandwidth** | **i32** | The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_bandwidth_unit** | **String** | | [optional] [default to null] +**limit_date_range_from** | **String** | The starting date/time the token is allowed to be used from. | [optional] [default to null] +**limit_date_range_to** | **String** | The ending date/time the token is allowed to be used until. | [optional] [default to null] +**limit_num_clients** | **i32** | The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_num_downloads** | **i32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_package_query** | **String** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null] +**limit_path_query** | **String** | THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null] +**metadata** | [***Value**](Value.md) | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**refresh_url** | **String** | | [optional] [default to null] +**reset_url** | **String** | | [optional] [default to null] +**scheduled_reset_at** | **String** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null] +**scheduled_reset_period** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**token** | **String** | | [optional] [default to null] +**updated_at** | **String** | The datetime the token was updated at. | [optional] [default to null] +**updated_by** | **String** | | [optional] [default to null] +**updated_by_url** | **String** | | [optional] [default to null] +**usage** | **String** | | [optional] [default to null] +**user** | **String** | | [optional] [default to null] +**user_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenRefreshRequest.md b/bindings/rust/src/docs/RepositoryTokenRefreshRequest.md new file mode 100644 index 00000000..b9413c3d --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenRefreshRequest.md @@ -0,0 +1,23 @@ +# RepositoryTokenRefreshRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eula_required** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null] +**is_active** | **bool** | If enabled, the token will allow downloads based on configured restrictions (if any). | [optional] [default to null] +**limit_bandwidth** | **i32** | The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_bandwidth_unit** | **String** | | [optional] [default to null] +**limit_date_range_from** | **String** | The starting date/time the token is allowed to be used from. | [optional] [default to null] +**limit_date_range_to** | **String** | The ending date/time the token is allowed to be used until. | [optional] [default to null] +**limit_num_clients** | **i32** | The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_num_downloads** | **i32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_package_query** | **String** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null] +**limit_path_query** | **String** | THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null] +**metadata** | [***Value**](Value.md) | | [optional] [default to null] +**scheduled_reset_at** | **String** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null] +**scheduled_reset_period** | **String** | | [optional] [default to null] +**token** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenRequest.md b/bindings/rust/src/docs/RepositoryTokenRequest.md new file mode 100644 index 00000000..97334019 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenRequest.md @@ -0,0 +1,24 @@ +# RepositoryTokenRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eula_required** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null] +**is_active** | **bool** | If enabled, the token will allow downloads based on configured restrictions (if any). | [optional] [default to null] +**limit_bandwidth** | **i32** | The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_bandwidth_unit** | **String** | | [optional] [default to null] +**limit_date_range_from** | **String** | The starting date/time the token is allowed to be used from. | [optional] [default to null] +**limit_date_range_to** | **String** | The ending date/time the token is allowed to be used until. | [optional] [default to null] +**limit_num_clients** | **i32** | The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_num_downloads** | **i32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_package_query** | **String** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null] +**limit_path_query** | **String** | THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null] +**metadata** | [***Value**](Value.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**scheduled_reset_at** | **String** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null] +**scheduled_reset_period** | **String** | | [optional] [default to null] +**token** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenRequestPatch.md b/bindings/rust/src/docs/RepositoryTokenRequestPatch.md new file mode 100644 index 00000000..0307258d --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenRequestPatch.md @@ -0,0 +1,24 @@ +# RepositoryTokenRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eula_required** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null] +**is_active** | **bool** | If enabled, the token will allow downloads based on configured restrictions (if any). | [optional] [default to null] +**limit_bandwidth** | **i32** | The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_bandwidth_unit** | **String** | | [optional] [default to null] +**limit_date_range_from** | **String** | The starting date/time the token is allowed to be used from. | [optional] [default to null] +**limit_date_range_to** | **String** | The ending date/time the token is allowed to be used until. | [optional] [default to null] +**limit_num_clients** | **i32** | The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_num_downloads** | **i32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null] +**limit_package_query** | **String** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null] +**limit_path_query** | **String** | THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null] +**metadata** | [***Value**](Value.md) | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] +**scheduled_reset_at** | **String** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null] +**scheduled_reset_period** | **String** | | [optional] [default to null] +**token** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenSync.md b/bindings/rust/src/docs/RepositoryTokenSync.md new file mode 100644 index 00000000..229b36e6 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenSync.md @@ -0,0 +1,10 @@ +# RepositoryTokenSync + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tokens** | [**Vec<::models::RepositoryToken>**](RepositoryToken.md) | The entitlements that have been synchronised. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTokenSyncRequest.md b/bindings/rust/src/docs/RepositoryTokenSyncRequest.md new file mode 100644 index 00000000..9ec4a7f4 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTokenSyncRequest.md @@ -0,0 +1,10 @@ +# RepositoryTokenSyncRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **String** | The source repository slug (in the same owner namespace). | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTransferRegion.md b/bindings/rust/src/docs/RepositoryTransferRegion.md new file mode 100644 index 00000000..ca925925 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTransferRegion.md @@ -0,0 +1,10 @@ +# RepositoryTransferRegion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storage_region** | **String** | The Cloudsmith region in which package files are stored. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryTransferRegionRequest.md b/bindings/rust/src/docs/RepositoryTransferRegionRequest.md new file mode 100644 index 00000000..e8afad25 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryTransferRegionRequest.md @@ -0,0 +1,10 @@ +# RepositoryTransferRegionRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storage_region** | **String** | The Cloudsmith region in which package files are stored. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryWebhook.md b/bindings/rust/src/docs/RepositoryWebhook.md new file mode 100644 index 00000000..6b9e9138 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryWebhook.md @@ -0,0 +1,36 @@ +# RepositoryWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | [optional] [default to null] +**created_by** | **String** | | [optional] [default to null] +**created_by_url** | **String** | | [optional] [default to null] +**disable_reason** | **i32** | | [optional] [default to null] +**disable_reason_str** | **String** | | [optional] [default to null] +**events** | **Vec** | | [default to null] +**identifier** | **i32** | Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified a webhook request within a repository. | [optional] [default to null] +**is_active** | **bool** | If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL. | [optional] [default to null] +**is_last_response_bad** | **bool** | | [optional] [default to null] +**last_response_status** | **i32** | | [optional] [default to null] +**last_response_status_str** | **String** | | [optional] [default to null] +**num_sent** | **i32** | | [optional] [default to null] +**package_query** | **String** | The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire. | [optional] [default to null] +**request_body_format** | **i32** | The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template. | [optional] [default to null] +**request_body_format_str** | **String** | | [optional] [default to null] +**request_body_template_format** | **i32** | The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML. | [optional] [default to null] +**request_body_template_format_str** | **String** | | [optional] [default to null] +**request_content_type** | **String** | The value that will be sent for the 'Content Type' header. | [optional] [default to null] +**secret_header** | **String** | The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side. | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**target_url** | **String** | The destination URL that webhook payloads will be POST'ed to. | [default to null] +**templates** | [**Vec<::models::WebhookTemplate>**](WebhookTemplate.md) | | [default to null] +**updated_at** | **String** | | [optional] [default to null] +**updated_by** | **String** | | [optional] [default to null] +**updated_by_url** | **String** | | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryWebhookRequest.md b/bindings/rust/src/docs/RepositoryWebhookRequest.md new file mode 100644 index 00000000..982ee976 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryWebhookRequest.md @@ -0,0 +1,21 @@ +# RepositoryWebhookRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | **Vec** | | [default to null] +**is_active** | **bool** | If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL. | [optional] [default to null] +**package_query** | **String** | The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire. | [optional] [default to null] +**request_body_format** | **i32** | The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template. | [optional] [default to null] +**request_body_template_format** | **i32** | The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML. | [optional] [default to null] +**request_content_type** | **String** | The value that will be sent for the 'Content Type' header. | [optional] [default to null] +**secret_header** | **String** | The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side. | [optional] [default to null] +**secret_value** | **String** | The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side. | [optional] [default to null] +**signature_key** | **String** | The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it). | [optional] [default to null] +**target_url** | **String** | The destination URL that webhook payloads will be POST'ed to. | [default to null] +**templates** | [**Vec<::models::WebhookTemplate>**](WebhookTemplate.md) | | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryWebhookRequestPatch.md b/bindings/rust/src/docs/RepositoryWebhookRequestPatch.md new file mode 100644 index 00000000..2255c5ff --- /dev/null +++ b/bindings/rust/src/docs/RepositoryWebhookRequestPatch.md @@ -0,0 +1,21 @@ +# RepositoryWebhookRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | **Vec** | | [optional] [default to null] +**is_active** | **bool** | If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL. | [optional] [default to null] +**package_query** | **String** | The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire. | [optional] [default to null] +**request_body_format** | **i32** | The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template. | [optional] [default to null] +**request_body_template_format** | **i32** | The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML. | [optional] [default to null] +**request_content_type** | **String** | The value that will be sent for the 'Content Type' header. | [optional] [default to null] +**secret_header** | **String** | The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side. | [optional] [default to null] +**secret_value** | **String** | The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side. | [optional] [default to null] +**signature_key** | **String** | The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it). | [optional] [default to null] +**target_url** | **String** | The destination URL that webhook payloads will be POST'ed to. | [optional] [default to null] +**templates** | [**Vec<::models::WebhookTemplate>**](WebhookTemplate.md) | | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryX509EcdsaCertificate.md b/bindings/rust/src/docs/RepositoryX509EcdsaCertificate.md new file mode 100644 index 00000000..5a48cb9e --- /dev/null +++ b/bindings/rust/src/docs/RepositoryX509EcdsaCertificate.md @@ -0,0 +1,19 @@ +# RepositoryX509EcdsaCertificate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | If selected this is the active key for this repository. | [optional] [default to null] +**certificate** | **String** | The issued certificate. | [optional] [default to null] +**certificate_chain** | **String** | Base64 encoded CA certificate chain. | [optional] [default to null] +**certificate_chain_fingerprint** | **String** | | [optional] [default to null] +**certificate_chain_fingerprint_short** | **String** | | [optional] [default to null] +**certificate_fingerprint** | **String** | The SHA-256 long identifier used | [optional] [default to null] +**certificate_fingerprint_short** | **String** | | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default key for this repository. | [optional] [default to null] +**issuing_status** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RepositoryX509RsaCertificate.md b/bindings/rust/src/docs/RepositoryX509RsaCertificate.md new file mode 100644 index 00000000..cdf44de6 --- /dev/null +++ b/bindings/rust/src/docs/RepositoryX509RsaCertificate.md @@ -0,0 +1,19 @@ +# RepositoryX509RsaCertificate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | If selected this is the active key for this repository. | [optional] [default to null] +**certificate** | **String** | The issued certificate. | [optional] [default to null] +**certificate_chain** | **String** | Base64 encoded CA certificate chain. | [optional] [default to null] +**certificate_chain_fingerprint** | **String** | | [optional] [default to null] +**certificate_chain_fingerprint_short** | **String** | | [optional] [default to null] +**certificate_fingerprint** | **String** | The SHA-256 long identifier used | [optional] [default to null] +**certificate_fingerprint_short** | **String** | | [optional] [default to null] +**created_at** | **String** | | [optional] [default to null] +**default** | **bool** | If selected this is the default key for this repository. | [optional] [default to null] +**issuing_status** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ResourcesRateCheck.md b/bindings/rust/src/docs/ResourcesRateCheck.md new file mode 100644 index 00000000..096c9b67 --- /dev/null +++ b/bindings/rust/src/docs/ResourcesRateCheck.md @@ -0,0 +1,10 @@ +# ResourcesRateCheck + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**::std::collections::HashMap**](RateCheck.md) | Rate limit values per resource | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RespositoryGeoIpEnableDisable.md b/bindings/rust/src/docs/RespositoryGeoIpEnableDisable.md new file mode 100644 index 00000000..00c13066 --- /dev/null +++ b/bindings/rust/src/docs/RespositoryGeoIpEnableDisable.md @@ -0,0 +1,9 @@ +# RespositoryGeoIpEnableDisable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RespositoryGeoIpEnableDisableRequest.md b/bindings/rust/src/docs/RespositoryGeoIpEnableDisableRequest.md new file mode 100644 index 00000000..86c7f2ab --- /dev/null +++ b/bindings/rust/src/docs/RespositoryGeoIpEnableDisableRequest.md @@ -0,0 +1,9 @@ +# RespositoryGeoIpEnableDisableRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RpmPackageUpload.md b/bindings/rust/src/docs/RpmPackageUpload.md new file mode 100644 index 00000000..7a99b03c --- /dev/null +++ b/bindings/rust/src/docs/RpmPackageUpload.md @@ -0,0 +1,89 @@ +# RpmPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RpmPackageUploadRequest.md b/bindings/rust/src/docs/RpmPackageUploadRequest.md new file mode 100644 index 00000000..8d935d7b --- /dev/null +++ b/bindings/rust/src/docs/RpmPackageUploadRequest.md @@ -0,0 +1,13 @@ +# RpmPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**distribution** | **String** | The distribution to store the package for. | [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RpmUpstream.md b/bindings/rust/src/docs/RpmUpstream.md new file mode 100644 index 00000000..106ad442 --- /dev/null +++ b/bindings/rust/src/docs/RpmUpstream.md @@ -0,0 +1,33 @@ +# RpmUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**distro_version** | **String** | The distribution version that packages found on this upstream will be associated with. | [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**include_sources** | **bool** | When checked, source packages will be available from this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verification_status** | **String** | The signature verification status for this upstream. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RpmUpstreamRequest.md b/bindings/rust/src/docs/RpmUpstreamRequest.md new file mode 100644 index 00000000..61088259 --- /dev/null +++ b/bindings/rust/src/docs/RpmUpstreamRequest.md @@ -0,0 +1,27 @@ +# RpmUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**distro_version** | **String** | The distribution version that packages found on this upstream will be associated with. | [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**include_sources** | **bool** | When checked, source packages will be available from this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RpmUpstreamRequestPatch.md b/bindings/rust/src/docs/RpmUpstreamRequestPatch.md new file mode 100644 index 00000000..ca9d8f44 --- /dev/null +++ b/bindings/rust/src/docs/RpmUpstreamRequestPatch.md @@ -0,0 +1,27 @@ +# RpmUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**distro_version** | **String** | The distribution version that packages found on this upstream will be associated with. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**gpg_key_inline** | **String** | A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_key_url** | **String** | When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. | [optional] [default to null] +**gpg_verification** | **String** | The GPG signature verification mode for this upstream. | [optional] [default to null] +**include_sources** | **bool** | When checked, source packages will be available from this upstream. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RubyPackageUpload.md b/bindings/rust/src/docs/RubyPackageUpload.md new file mode 100644 index 00000000..e2f984a7 --- /dev/null +++ b/bindings/rust/src/docs/RubyPackageUpload.md @@ -0,0 +1,89 @@ +# RubyPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RubyPackageUploadRequest.md b/bindings/rust/src/docs/RubyPackageUploadRequest.md new file mode 100644 index 00000000..7a480e2b --- /dev/null +++ b/bindings/rust/src/docs/RubyPackageUploadRequest.md @@ -0,0 +1,12 @@ +# RubyPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RubyUpstream.md b/bindings/rust/src/docs/RubyUpstream.md new file mode 100644 index 00000000..aa3202fd --- /dev/null +++ b/bindings/rust/src/docs/RubyUpstream.md @@ -0,0 +1,27 @@ +# RubyUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RubyUpstreamRequest.md b/bindings/rust/src/docs/RubyUpstreamRequest.md new file mode 100644 index 00000000..23f4560f --- /dev/null +++ b/bindings/rust/src/docs/RubyUpstreamRequest.md @@ -0,0 +1,22 @@ +# RubyUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/RubyUpstreamRequestPatch.md b/bindings/rust/src/docs/RubyUpstreamRequestPatch.md new file mode 100644 index 00000000..a9e6030e --- /dev/null +++ b/bindings/rust/src/docs/RubyUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# RubyUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Service.md b/bindings/rust/src/docs/Service.md new file mode 100644 index 00000000..8388eb3e --- /dev/null +++ b/bindings/rust/src/docs/Service.md @@ -0,0 +1,19 @@ +# Service + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | [optional] [default to null] +**created_by** | **String** | | [optional] [default to null] +**created_by_url** | **String** | | [optional] [default to null] +**description** | **String** | The description of the service | [optional] [default to null] +**key** | **String** | The API key of the service | [optional] [default to null] +**key_expires_at** | **String** | The time at which the API key will expire. This will only be populated if the Organization has an active API Key Policy. | [optional] [default to null] +**name** | **String** | The name of the service | [default to null] +**role** | **String** | The role of the service. | [optional] [default to null] +**slug** | **String** | The slug of the service | [optional] [default to null] +**teams** | [**Vec<::models::ServiceTeams>**](ServiceTeams.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ServiceRequest.md b/bindings/rust/src/docs/ServiceRequest.md new file mode 100644 index 00000000..1d4880e2 --- /dev/null +++ b/bindings/rust/src/docs/ServiceRequest.md @@ -0,0 +1,13 @@ +# ServiceRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The description of the service | [optional] [default to null] +**name** | **String** | The name of the service | [default to null] +**role** | **String** | The role of the service. | [optional] [default to null] +**teams** | [**Vec<::models::ServiceTeams>**](ServiceTeams.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ServiceRequestPatch.md b/bindings/rust/src/docs/ServiceRequestPatch.md new file mode 100644 index 00000000..50541985 --- /dev/null +++ b/bindings/rust/src/docs/ServiceRequestPatch.md @@ -0,0 +1,13 @@ +# ServiceRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The description of the service | [optional] [default to null] +**name** | **String** | The name of the service | [optional] [default to null] +**role** | **String** | The role of the service. | [optional] [default to null] +**teams** | [**Vec<::models::ServiceTeams>**](ServiceTeams.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/ServiceTeams.md b/bindings/rust/src/docs/ServiceTeams.md new file mode 100644 index 00000000..170ba6a7 --- /dev/null +++ b/bindings/rust/src/docs/ServiceTeams.md @@ -0,0 +1,11 @@ +# ServiceTeams + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **String** | The team role associated with the service | [optional] [default to null] +**slug** | **String** | The teams associated with the service | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/StatusApi.md b/bindings/rust/src/docs/StatusApi.md new file mode 100644 index 00000000..735275b5 --- /dev/null +++ b/bindings/rust/src/docs/StatusApi.md @@ -0,0 +1,33 @@ +# \StatusApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**status_check_basic**](StatusApi.md#status_check_basic) | **Get** /status/check/basic/ | Endpoint to check basic API connectivity. + + +# **status_check_basic** +> ::models::StatusBasic status_check_basic() +Endpoint to check basic API connectivity. + +Endpoint to check basic API connectivity. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**::models::StatusBasic**](StatusBasic.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/StatusBasic.md b/bindings/rust/src/docs/StatusBasic.md new file mode 100644 index 00000000..b366967e --- /dev/null +++ b/bindings/rust/src/docs/StatusBasic.md @@ -0,0 +1,11 @@ +# StatusBasic + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | **String** | The message describing the state of the API. | [optional] [default to null] +**version** | **String** | The current version for the Cloudsmith service. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/StorageAllocatedLimit.md b/bindings/rust/src/docs/StorageAllocatedLimit.md new file mode 100644 index 00000000..d53f83a4 --- /dev/null +++ b/bindings/rust/src/docs/StorageAllocatedLimit.md @@ -0,0 +1,14 @@ +# StorageAllocatedLimit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configured** | **String** | | [optional] [default to null] +**peak** | **String** | | [optional] [default to null] +**percentage_used** | **String** | | [optional] [default to null] +**plan_limit** | **String** | | [optional] [default to null] +**used** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/StorageAllocatedLimitRaw.md b/bindings/rust/src/docs/StorageAllocatedLimitRaw.md new file mode 100644 index 00000000..75a6596f --- /dev/null +++ b/bindings/rust/src/docs/StorageAllocatedLimitRaw.md @@ -0,0 +1,14 @@ +# StorageAllocatedLimitRaw + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configured** | **i32** | | [optional] [default to null] +**peak** | **i32** | | [optional] [default to null] +**percentage_used** | **String** | | [optional] [default to null] +**plan_limit** | **i32** | | [optional] [default to null] +**used** | **i32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/StorageRegion.md b/bindings/rust/src/docs/StorageRegion.md new file mode 100644 index 00000000..fd50850f --- /dev/null +++ b/bindings/rust/src/docs/StorageRegion.md @@ -0,0 +1,11 @@ +# StorageRegion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **String** | Name of the storage region | [default to null] +**slug** | **String** | Slug for the storage region | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/StorageRegionsApi.md b/bindings/rust/src/docs/StorageRegionsApi.md new file mode 100644 index 00000000..9946ce13 --- /dev/null +++ b/bindings/rust/src/docs/StorageRegionsApi.md @@ -0,0 +1,63 @@ +# \StorageRegionsApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**storage_regions_list**](StorageRegionsApi.md#storage_regions_list) | **Get** /storage-regions/ | Get a list of all available storage regions. +[**storage_regions_read**](StorageRegionsApi.md#storage_regions_read) | **Get** /storage-regions/{slug}/ | Get a specific storage region. + + +# **storage_regions_list** +> Vec<::models::StorageRegion> storage_regions_list(ctx, ctx, ) +Get a list of all available storage regions. + +Get a list of all available storage regions. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**Vec<::models::StorageRegion>**](StorageRegion.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **storage_regions_read** +> ::models::StorageRegion storage_regions_read(ctx, ctx, slug) +Get a specific storage region. + +Get a specific storage region. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **slug** | **String**| | + +### Return type + +[**::models::StorageRegion**](StorageRegion.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/StorageUsage.md b/bindings/rust/src/docs/StorageUsage.md new file mode 100644 index 00000000..030b0b69 --- /dev/null +++ b/bindings/rust/src/docs/StorageUsage.md @@ -0,0 +1,13 @@ +# StorageUsage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **String** | | [optional] [default to null] +**peak** | **String** | | [optional] [default to null] +**percentage** | **String** | | [optional] [default to null] +**used** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/StorageUsageRaw.md b/bindings/rust/src/docs/StorageUsageRaw.md new file mode 100644 index 00000000..36f3ae09 --- /dev/null +++ b/bindings/rust/src/docs/StorageUsageRaw.md @@ -0,0 +1,13 @@ +# StorageUsageRaw + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **i32** | | [optional] [default to null] +**peak** | **i32** | | [optional] [default to null] +**percentage** | **String** | | [optional] [default to null] +**used** | **i32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/SwiftPackageUpload.md b/bindings/rust/src/docs/SwiftPackageUpload.md new file mode 100644 index 00000000..ffb53bf0 --- /dev/null +++ b/bindings/rust/src/docs/SwiftPackageUpload.md @@ -0,0 +1,94 @@ +# SwiftPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**author_name** | **String** | The name of the author of the package. | [optional] [default to null] +**author_org** | **String** | The organization of the author. | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**license_url** | **String** | The license URL of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**readme_url** | **String** | The URL of the readme for the package. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | The URL of the SCM repository for the package. | [optional] [default to null] +**scope** | **String** | A scope provides a namespace for related packages within the package registry. | [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/SwiftPackageUploadRequest.md b/bindings/rust/src/docs/SwiftPackageUploadRequest.md new file mode 100644 index 00000000..484aace5 --- /dev/null +++ b/bindings/rust/src/docs/SwiftPackageUploadRequest.md @@ -0,0 +1,20 @@ +# SwiftPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author_name** | **String** | The name of the author of the package. | [optional] [default to null] +**author_org** | **String** | The organization of the author. | [optional] [default to null] +**license_url** | **String** | The license URL of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**readme_url** | **String** | The URL of the readme for the package. | [optional] [default to null] +**repository_url** | **String** | The URL of the SCM repository for the package. | [optional] [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**scope** | **String** | A scope provides a namespace for related packages within the package registry. | [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] +**version** | **String** | The raw version for this package. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/SwiftUpstream.md b/bindings/rust/src/docs/SwiftUpstream.md new file mode 100644 index 00000000..e7d22b4a --- /dev/null +++ b/bindings/rust/src/docs/SwiftUpstream.md @@ -0,0 +1,27 @@ +# SwiftUpstream + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**created_at** | **String** | The datetime the upstream source was created. | [optional] [default to null] +**disable_reason** | **String** | | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**pending_validation** | **bool** | When true, this upstream source is pending validation. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**updated_at** | **String** | | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/SwiftUpstreamRequest.md b/bindings/rust/src/docs/SwiftUpstreamRequest.md new file mode 100644 index 00000000..7c06873c --- /dev/null +++ b/bindings/rust/src/docs/SwiftUpstreamRequest.md @@ -0,0 +1,22 @@ +# SwiftUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/SwiftUpstreamRequestPatch.md b/bindings/rust/src/docs/SwiftUpstreamRequestPatch.md new file mode 100644 index 00000000..48dd783b --- /dev/null +++ b/bindings/rust/src/docs/SwiftUpstreamRequestPatch.md @@ -0,0 +1,22 @@ +# SwiftUpstreamRequestPatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_mode** | **String** | The authentication mode to use when accessing this upstream. | [optional] [default to null] +**auth_secret** | **String** | Secret to provide with requests to upstream. | [optional] [default to null] +**auth_username** | **String** | Username to provide with requests to upstream. | [optional] [default to null] +**extra_header_1** | **String** | The key for extra header #1 to send to upstream. | [optional] [default to null] +**extra_header_2** | **String** | The key for extra header #2 to send to upstream. | [optional] [default to null] +**extra_value_1** | **String** | The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**extra_value_2** | **String** | The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. | [optional] [default to null] +**is_active** | **bool** | Whether or not this upstream is active and ready for requests. | [optional] [default to null] +**mode** | **String** | The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. | [optional] [default to null] +**name** | **String** | A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. | [optional] [default to null] +**priority** | **i32** | Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. | [optional] [default to null] +**upstream_url** | **String** | The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. | [optional] [default to null] +**verify_ssl** | **bool** | If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Tags.md b/bindings/rust/src/docs/Tags.md new file mode 100644 index 00000000..3324dcb4 --- /dev/null +++ b/bindings/rust/src/docs/Tags.md @@ -0,0 +1,9 @@ +# Tags + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/TerraformPackageUpload.md b/bindings/rust/src/docs/TerraformPackageUpload.md new file mode 100644 index 00000000..9347c455 --- /dev/null +++ b/bindings/rust/src/docs/TerraformPackageUpload.md @@ -0,0 +1,89 @@ +# TerraformPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [optional] [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [optional] [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/TerraformPackageUploadRequest.md b/bindings/rust/src/docs/TerraformPackageUploadRequest.md new file mode 100644 index 00000000..88047c90 --- /dev/null +++ b/bindings/rust/src/docs/TerraformPackageUploadRequest.md @@ -0,0 +1,12 @@ +# TerraformPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**package_file** | **String** | The primary file for the package. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/Usage.md b/bindings/rust/src/docs/Usage.md new file mode 100644 index 00000000..dce7f8e3 --- /dev/null +++ b/bindings/rust/src/docs/Usage.md @@ -0,0 +1,12 @@ +# Usage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **String** | | [optional] [default to null] +**percentage** | **String** | | [optional] [default to null] +**used** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UsageFieldset.md b/bindings/rust/src/docs/UsageFieldset.md new file mode 100644 index 00000000..f68a5b43 --- /dev/null +++ b/bindings/rust/src/docs/UsageFieldset.md @@ -0,0 +1,11 @@ +# UsageFieldset + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display** | [***::models::UsageLimits**](UsageLimits.md) | | [default to null] +**raw** | [***::models::UsageLimitsRaw**](UsageLimitsRaw.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UsageLimits.md b/bindings/rust/src/docs/UsageLimits.md new file mode 100644 index 00000000..b7960a65 --- /dev/null +++ b/bindings/rust/src/docs/UsageLimits.md @@ -0,0 +1,11 @@ +# UsageLimits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth** | [***::models::AllocatedLimit**](AllocatedLimit.md) | | [default to null] +**storage** | [***::models::StorageAllocatedLimit**](StorageAllocatedLimit.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UsageLimitsRaw.md b/bindings/rust/src/docs/UsageLimitsRaw.md new file mode 100644 index 00000000..1a225f32 --- /dev/null +++ b/bindings/rust/src/docs/UsageLimitsRaw.md @@ -0,0 +1,11 @@ +# UsageLimitsRaw + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth** | [***::models::AllocatedLimitRaw**](AllocatedLimitRaw.md) | | [default to null] +**storage** | [***::models::StorageAllocatedLimitRaw**](StorageAllocatedLimitRaw.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UsageRaw.md b/bindings/rust/src/docs/UsageRaw.md new file mode 100644 index 00000000..49eec2a4 --- /dev/null +++ b/bindings/rust/src/docs/UsageRaw.md @@ -0,0 +1,12 @@ +# UsageRaw + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **i32** | | [optional] [default to null] +**percentage** | **String** | | [optional] [default to null] +**used** | **i32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UserApi.md b/bindings/rust/src/docs/UserApi.md new file mode 100644 index 00000000..ce5a81b3 --- /dev/null +++ b/bindings/rust/src/docs/UserApi.md @@ -0,0 +1,69 @@ +# \UserApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**user_self**](UserApi.md#user_self) | **Get** /user/self/ | Provide a brief for the current user (if any). +[**user_token_create**](UserApi.md#user_token_create) | **Post** /user/token/ | Retrieve/Create API key/token for the authenticated user. + + +# **user_self** +> ::models::UserBrief user_self(ctx, ctx, ) +Provide a brief for the current user (if any). + +Provide a brief for the current user (if any). + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**::models::UserBrief**](UserBrief.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_token_create** +> ::models::UserAuthToken user_token_create(ctx, optional) +Retrieve/Create API key/token for the authenticated user. + +Retrieve/Create API key/token for the authenticated user. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**UserAuthTokenRequest**](UserAuthTokenRequest.md)| | + +### Return type + +[**::models::UserAuthToken**](UserAuthToken.md) + +### Authorization + +[basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/UserAuthToken.md b/bindings/rust/src/docs/UserAuthToken.md new file mode 100644 index 00000000..fb184e39 --- /dev/null +++ b/bindings/rust/src/docs/UserAuthToken.md @@ -0,0 +1,10 @@ +# UserAuthToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | API token for the authenticated user | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UserAuthTokenRequest.md b/bindings/rust/src/docs/UserAuthTokenRequest.md new file mode 100644 index 00000000..9cd83d1a --- /dev/null +++ b/bindings/rust/src/docs/UserAuthTokenRequest.md @@ -0,0 +1,11 @@ +# UserAuthTokenRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address to authenticate with | [optional] [default to null] +**password** | **String** | Password to authenticate with | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UserBrief.md b/bindings/rust/src/docs/UserBrief.md new file mode 100644 index 00000000..36e0a5a3 --- /dev/null +++ b/bindings/rust/src/docs/UserBrief.md @@ -0,0 +1,16 @@ +# UserBrief + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authenticated** | **bool** | If true then you're logged in as a user. | [optional] [default to null] +**email** | **String** | Your email address that we use to contact you. This is only visible to you. | [optional] [default to null] +**name** | **String** | The full name of the user (if any). | [optional] [default to null] +**profile_url** | **String** | The URL for the full profile of the user. | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**slug** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UserProfile.md b/bindings/rust/src/docs/UserProfile.md new file mode 100644 index 00000000..190f027a --- /dev/null +++ b/bindings/rust/src/docs/UserProfile.md @@ -0,0 +1,19 @@ +# UserProfile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company** | **String** | | [optional] [default to null] +**first_name** | **String** | | [default to null] +**job_title** | **String** | | [optional] [default to null] +**joined_at** | **String** | | [optional] [default to null] +**last_name** | **String** | | [default to null] +**name** | **String** | | [optional] [default to null] +**slug** | **String** | | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**tagline** | **String** | Your tagline is a sentence about you. Make it funny. Make it professional. Either way, it's public and it represents who you are. | [optional] [default to null] +**url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/UsersApi.md b/bindings/rust/src/docs/UsersApi.md new file mode 100644 index 00000000..aec0431a --- /dev/null +++ b/bindings/rust/src/docs/UsersApi.md @@ -0,0 +1,38 @@ +# \UsersApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**users_profile_read**](UsersApi.md#users_profile_read) | **Get** /users/profile/{slug}/ | Provide a brief for the specified user (if any). + + +# **users_profile_read** +> ::models::UserProfile users_profile_read(ctx, ctx, slug) +Provide a brief for the specified user (if any). + +Provide a brief for the specified user (if any). + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **slug** | **String**| | + +### Return type + +[**::models::UserProfile**](UserProfile.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/VagrantPackageUpload.md b/bindings/rust/src/docs/VagrantPackageUpload.md new file mode 100644 index 00000000..60716036 --- /dev/null +++ b/bindings/rust/src/docs/VagrantPackageUpload.md @@ -0,0 +1,90 @@ +# VagrantPackageUpload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**architectures** | [**Vec<::models::Architecture>**](Architecture.md) | | [optional] [default to null] +**cdn_url** | **String** | | [optional] [default to null] +**checksum_md5** | **String** | | [optional] [default to null] +**checksum_sha1** | **String** | | [optional] [default to null] +**checksum_sha256** | **String** | | [optional] [default to null] +**checksum_sha512** | **String** | | [optional] [default to null] +**dependencies_checksum_md5** | **String** | A checksum of all of the package's dependencies. | [optional] [default to null] +**dependencies_url** | **String** | | [optional] [default to null] +**description** | **String** | A textual description of this package. | [optional] [default to null] +**display_name** | **String** | | [optional] [default to null] +**distro** | [***::models::Distribution**](Distribution.md) | | [optional] [default to null] +**distro_version** | [***::models::DistributionVersion**](DistributionVersion.md) | | [optional] [default to null] +**downloads** | **i32** | | [optional] [default to null] +**epoch** | **i32** | The epoch of the package version (if any). | [optional] [default to null] +**extension** | **String** | | [optional] [default to null] +**filename** | **String** | | [optional] [default to null] +**files** | [**Vec<::models::PackageFile>**](PackageFile.md) | | [optional] [default to null] +**format** | **String** | | [optional] [default to null] +**format_url** | **String** | | [optional] [default to null] +**freeable_storage** | **i32** | Amount of storage that will be freed if this package is deleted | [optional] [default to null] +**fully_qualified_name** | **String** | | [optional] [default to null] +**identifier_perm** | **String** | Unique and permanent identifier for the package. | [optional] [default to null] +**identifiers** | **::std::collections::HashMap** | Return a map of identifier field names and their values. | [optional] [default to null] +**indexed** | **bool** | | [optional] [default to null] +**is_cancellable** | **bool** | | [optional] [default to null] +**is_copyable** | **bool** | | [optional] [default to null] +**is_deleteable** | **bool** | | [optional] [default to null] +**is_downloadable** | **bool** | | [optional] [default to null] +**is_moveable** | **bool** | | [optional] [default to null] +**is_quarantinable** | **bool** | | [optional] [default to null] +**is_quarantined** | **bool** | | [optional] [default to null] +**is_resyncable** | **bool** | | [optional] [default to null] +**is_security_scannable** | **bool** | | [optional] [default to null] +**is_sync_awaiting** | **bool** | | [optional] [default to null] +**is_sync_completed** | **bool** | | [optional] [default to null] +**is_sync_failed** | **bool** | | [optional] [default to null] +**is_sync_in_flight** | **bool** | | [optional] [default to null] +**is_sync_in_progress** | **bool** | | [optional] [default to null] +**license** | **String** | The license of this package. | [optional] [default to null] +**name** | **String** | The name of this package. | [default to null] +**namespace** | **String** | | [optional] [default to null] +**namespace_url** | **String** | | [optional] [default to null] +**num_files** | **i32** | | [optional] [default to null] +**origin_repository** | **String** | | [optional] [default to null] +**origin_repository_url** | **String** | | [optional] [default to null] +**package_type** | **i32** | The type of package contents. | [optional] [default to null] +**policy_violated** | **bool** | Whether or not the package has violated any policy. | [optional] [default to null] +**provider** | **String** | The virtual machine provider for the box. | [default to null] +**release** | **String** | The release of the package version (if any). | [optional] [default to null] +**repository** | **String** | | [optional] [default to null] +**repository_url** | **String** | | [optional] [default to null] +**security_scan_completed_at** | **String** | The datetime the security scanning was completed. | [optional] [default to null] +**security_scan_started_at** | **String** | The datetime the security scanning was started. | [optional] [default to null] +**security_scan_status** | **String** | | [optional] [default to null] +**security_scan_status_updated_at** | **String** | The datetime the security scanning status was updated. | [optional] [default to null] +**self_html_url** | **String** | | [optional] [default to null] +**self_url** | **String** | | [optional] [default to null] +**signature_url** | **String** | | [optional] [default to null] +**size** | **i32** | The calculated size of the package. | [optional] [default to null] +**slug** | **String** | The public unique identifier for the package. | [optional] [default to null] +**slug_perm** | **String** | | [optional] [default to null] +**stage** | **i32** | The synchronisation (in progress) stage of the package. | [optional] [default to null] +**stage_str** | **String** | | [optional] [default to null] +**stage_updated_at** | **String** | The datetime the package stage was updated at. | [optional] [default to null] +**status** | **i32** | The synchronisation status of the package. | [optional] [default to null] +**status_reason** | **String** | A textual description for the synchronous status reason (if any | [optional] [default to null] +**status_str** | **String** | | [optional] [default to null] +**status_updated_at** | **String** | The datetime the package status was updated at. | [optional] [default to null] +**status_url** | **String** | | [optional] [default to null] +**subtype** | **String** | | [optional] [default to null] +**summary** | **String** | A one-liner synopsis of this package. | [optional] [default to null] +**sync_finished_at** | **String** | The datetime the package sync was finished at. | [optional] [default to null] +**sync_progress** | **i32** | Synchronisation progress (from 0-100) | [optional] [default to null] +**tags_immutable** | [***::models::Tags**](Tags.md) | | [optional] [default to null] +**type_display** | **String** | | [optional] [default to null] +**uploaded_at** | **String** | The date this package was uploaded. | [optional] [default to null] +**uploader** | **String** | | [optional] [default to null] +**uploader_url** | **String** | | [optional] [default to null] +**version** | **String** | The raw version for this package. | [default to null] +**version_orig** | **String** | | [optional] [default to null] +**vulnerability_scan_results_url** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/VagrantPackageUploadRequest.md b/bindings/rust/src/docs/VagrantPackageUploadRequest.md new file mode 100644 index 00000000..06b8aebd --- /dev/null +++ b/bindings/rust/src/docs/VagrantPackageUploadRequest.md @@ -0,0 +1,15 @@ +# VagrantPackageUploadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The name of this package. | [default to null] +**package_file** | **String** | The primary file for the package. | [default to null] +**provider** | **String** | The virtual machine provider for the box. | [default to null] +**republish** | **bool** | If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. | [optional] [default to null] +**tags** | **String** | A comma-separated values list of tags to add to the package. | [optional] [default to null] +**version** | **String** | The raw version for this package. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/VulnerabilitiesApi.md b/bindings/rust/src/docs/VulnerabilitiesApi.md new file mode 100644 index 00000000..a0daba81 --- /dev/null +++ b/bindings/rust/src/docs/VulnerabilitiesApi.md @@ -0,0 +1,167 @@ +# \VulnerabilitiesApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**vulnerabilities_namespace_list**](VulnerabilitiesApi.md#vulnerabilities_namespace_list) | **Get** /vulnerabilities/{owner}/ | Lists scan results for a specific namespace. +[**vulnerabilities_package_list**](VulnerabilitiesApi.md#vulnerabilities_package_list) | **Get** /vulnerabilities/{owner}/{repo}/{package}/ | Lists scan results for a specific package. +[**vulnerabilities_read**](VulnerabilitiesApi.md#vulnerabilities_read) | **Get** /vulnerabilities/{owner}/{repo}/{package}/{identifier}/ | Get a scan result. +[**vulnerabilities_repo_list**](VulnerabilitiesApi.md#vulnerabilities_repo_list) | **Get** /vulnerabilities/{owner}/{repo}/ | Lists scan results for a specific repository. + + +# **vulnerabilities_namespace_list** +> Vec<::models::VulnerabilityScanResultsList> vulnerabilities_namespace_list(ctx, ctx, owner, optional) +Lists scan results for a specific namespace. + +Lists scan results for a specific namespace. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::VulnerabilityScanResultsList>**](VulnerabilityScanResultsList.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **vulnerabilities_package_list** +> Vec<::models::VulnerabilityScanResultsList> vulnerabilities_package_list(ctx, ctx, owner, repo, package, optional) +Lists scan results for a specific package. + +Lists scan results for a specific package. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **package** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **package** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::VulnerabilityScanResultsList>**](VulnerabilityScanResultsList.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **vulnerabilities_read** +> ::models::VulnerabilityScanResults vulnerabilities_read(ctx, ctx, owner, repo, package, identifier) +Get a scan result. + +Get a scan result. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **package** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::VulnerabilityScanResults**](VulnerabilityScanResults.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **vulnerabilities_repo_list** +> Vec<::models::VulnerabilityScanResultsList> vulnerabilities_repo_list(ctx, ctx, owner, repo, optional) +Lists scan results for a specific repository. + +Lists scan results for a specific repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::VulnerabilityScanResultsList>**](VulnerabilityScanResultsList.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/docs/Vulnerability.md b/bindings/rust/src/docs/Vulnerability.md new file mode 100644 index 00000000..7e728f58 --- /dev/null +++ b/bindings/rust/src/docs/Vulnerability.md @@ -0,0 +1,18 @@ +# Vulnerability + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**affected_version** | [***::models::VulnerabilityScanVersion**](VulnerabilityScanVersion.md) | | [default to null] +**description** | **String** | | [default to null] +**fixed_version** | [***::models::VulnerabilityScanVersion**](VulnerabilityScanVersion.md) | | [default to null] +**package_name** | **String** | | [default to null] +**references** | **Vec** | | [default to null] +**severity** | **String** | | [optional] [default to null] +**severity_source** | **String** | | [default to null] +**title** | **String** | | [default to null] +**vulnerability_id** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/VulnerabilityScan.md b/bindings/rust/src/docs/VulnerabilityScan.md new file mode 100644 index 00000000..54059e3e --- /dev/null +++ b/bindings/rust/src/docs/VulnerabilityScan.md @@ -0,0 +1,12 @@ +# VulnerabilityScan + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**Vec<::models::Vulnerability>**](Vulnerability.md) | | [default to null] +**target** | **String** | | [default to null] +**_type** | **String** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/VulnerabilityScanResults.md b/bindings/rust/src/docs/VulnerabilityScanResults.md new file mode 100644 index 00000000..0ec3da86 --- /dev/null +++ b/bindings/rust/src/docs/VulnerabilityScanResults.md @@ -0,0 +1,17 @@ +# VulnerabilityScanResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | The time this scan result was stored. | [optional] [default to null] +**has_vulnerabilities** | **bool** | Do the results contain any known vulnerabilities? | [optional] [default to null] +**identifier** | **String** | | [default to null] +**max_severity** | **String** | | [optional] [default to null] +**num_vulnerabilities** | **i32** | | [optional] [default to null] +**package** | [***::models::PackageVulnerability**](PackageVulnerability.md) | | [default to null] +**scan_id** | **i32** | Deprecated (23-05-15): Please use 'identifier' instead. Previously: A monotonically increasing number that identified a scan within a repository. | [default to null] +**scans** | [**Vec<::models::VulnerabilityScan>**](VulnerabilityScan.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/VulnerabilityScanResultsList.md b/bindings/rust/src/docs/VulnerabilityScanResultsList.md new file mode 100644 index 00000000..3f09c798 --- /dev/null +++ b/bindings/rust/src/docs/VulnerabilityScanResultsList.md @@ -0,0 +1,16 @@ +# VulnerabilityScanResultsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | The time this scan result was stored. | [optional] [default to null] +**has_vulnerabilities** | **bool** | Do the results contain any known vulnerabilities? | [optional] [default to null] +**identifier** | **String** | | [default to null] +**max_severity** | **String** | | [optional] [default to null] +**num_vulnerabilities** | **i32** | | [optional] [default to null] +**package** | [***::models::PackageVulnerability**](PackageVulnerability.md) | | [default to null] +**scan_id** | **i32** | Deprecated (23-05-15): Please use 'identifier' instead. Previously: A monotonically increasing number that identified a scan within a repository. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/VulnerabilityScanVersion.md b/bindings/rust/src/docs/VulnerabilityScanVersion.md new file mode 100644 index 00000000..058d0d8f --- /dev/null +++ b/bindings/rust/src/docs/VulnerabilityScanVersion.md @@ -0,0 +1,15 @@ +# VulnerabilityScanVersion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**major** | **i32** | | [default to null] +**minor** | **i32** | | [default to null] +**operator** | **String** | | [optional] [default to null] +**patch** | **i32** | | [default to null] +**raw_version** | **String** | | [optional] [default to null] +**version** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/WebhookTemplate.md b/bindings/rust/src/docs/WebhookTemplate.md new file mode 100644 index 00000000..dd38f513 --- /dev/null +++ b/bindings/rust/src/docs/WebhookTemplate.md @@ -0,0 +1,11 @@ +# WebhookTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event** | **String** | | [default to null] +**template** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/bindings/rust/src/docs/WebhooksApi.md b/bindings/rust/src/docs/WebhooksApi.md new file mode 100644 index 00000000..6198d168 --- /dev/null +++ b/bindings/rust/src/docs/WebhooksApi.md @@ -0,0 +1,198 @@ +# \WebhooksApi + +All URIs are relative to *https://api.cloudsmith.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**webhooks_create**](WebhooksApi.md#webhooks_create) | **Post** /webhooks/{owner}/{repo}/ | Create a specific webhook in a repository. +[**webhooks_delete**](WebhooksApi.md#webhooks_delete) | **Delete** /webhooks/{owner}/{repo}/{identifier}/ | Delete a specific webhook in a repository. +[**webhooks_list**](WebhooksApi.md#webhooks_list) | **Get** /webhooks/{owner}/{repo}/ | Get a list of all webhooks in a repository. +[**webhooks_partial_update**](WebhooksApi.md#webhooks_partial_update) | **Patch** /webhooks/{owner}/{repo}/{identifier}/ | Update a specific webhook in a repository. +[**webhooks_read**](WebhooksApi.md#webhooks_read) | **Get** /webhooks/{owner}/{repo}/{identifier}/ | Views for working with repository webhooks. + + +# **webhooks_create** +> ::models::RepositoryWebhook webhooks_create(ctx, ctx, owner, repo, optional) +Create a specific webhook in a repository. + +Create a specific webhook in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **data** | [**RepositoryWebhookRequest**](RepositoryWebhookRequest.md)| | + +### Return type + +[**::models::RepositoryWebhook**](RepositoryWebhook.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_delete** +> webhooks_delete(ctx, ctx, owner, repo, identifier) +Delete a specific webhook in a repository. + +Delete a specific webhook in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + + (empty response body) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_list** +> Vec<::models::RepositoryWebhook> webhooks_list(ctx, ctx, owner, repo, optional) +Get a list of all webhooks in a repository. + +Get a list of all webhooks in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **page** | **i32**| A page number within the paginated result set. | + **page_size** | **i32**| Number of results to return per page. | + +### Return type + +[**Vec<::models::RepositoryWebhook>**](RepositoryWebhook.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_partial_update** +> ::models::RepositoryWebhook webhooks_partial_update(ctx, ctx, owner, repo, identifier, optional) +Update a specific webhook in a repository. + +Update a specific webhook in a repository. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + **data** | [**RepositoryWebhookRequestPatch**](RepositoryWebhookRequestPatch.md)| | + +### Return type + +[**::models::RepositoryWebhook**](RepositoryWebhook.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_read** +> ::models::RepositoryWebhook webhooks_read(ctx, ctx, owner, repo, identifier) +Views for working with repository webhooks. + +Views for working with repository webhooks. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **owner** | **String**| | + **repo** | **String**| | + **identifier** | **String**| | + +### Return type + +[**::models::RepositoryWebhook**](RepositoryWebhook.md) + +### Authorization + +[apikey](../README.md#apikey), [basic](../README.md#basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/bindings/rust/src/git_push.sh b/bindings/rust/src/git_push.sh new file mode 100644 index 00000000..4fda2ff0 --- /dev/null +++ b/bindings/rust/src/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="cloudsmith-io" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="cloudsmith-api" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/bindings/rust/src/src/apis/audit_log_api.rs b/bindings/rust/src/src/apis/audit_log_api.rs new file mode 100644 index 00000000..a32dbafd --- /dev/null +++ b/bindings/rust/src/src/apis/audit_log_api.rs @@ -0,0 +1,200 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct AuditLogApiClient { + configuration: Rc>, +} + +impl AuditLogApiClient { + pub fn new(configuration: Rc>) -> AuditLogApiClient { + AuditLogApiClient { + configuration: configuration, + } + } +} + +pub trait AuditLogApi { + fn audit_log_namespace_list(&self, owner: &str, page: i32, page_size: i32, query: &str) -> Box, Error = Error>>; + fn audit_log_repo_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, query: &str) -> Box, Error = Error>>; +} + + +implAuditLogApi for AuditLogApiClient { + fn audit_log_namespace_list(&self, owner: &str, page: i32, page_size: i32, query: &str) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("query", &query.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/audit-log/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn audit_log_repo_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, query: &str) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("query", &query.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/audit-log/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/badges_api.rs b/bindings/rust/src/src/apis/badges_api.rs new file mode 100644 index 00000000..b4c7c577 --- /dev/null +++ b/bindings/rust/src/src/apis/badges_api.rs @@ -0,0 +1,129 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct BadgesApiClient { + configuration: Rc>, +} + +impl BadgesApiClient { + pub fn new(configuration: Rc>) -> BadgesApiClient { + BadgesApiClient { + configuration: configuration, + } + } +} + +pub trait BadgesApi { + fn badges_version_list(&self, owner: &str, repo: &str, package_format: &str, package_name: &str, package_version: &str, package_identifiers: &str, badge_token: &str, cache_seconds: &str, color: &str, label: &str, label_color: &str, logo_color: &str, logo_width: &str, render: bool, shields: bool, show_latest: bool, style: &str) -> Box>>; +} + + +implBadgesApi for BadgesApiClient { + fn badges_version_list(&self, owner: &str, repo: &str, package_format: &str, package_name: &str, package_version: &str, package_identifiers: &str, badge_token: &str, cache_seconds: &str, color: &str, label: &str, label_color: &str, logo_color: &str, logo_width: &str, render: bool, shields: bool, show_latest: bool, style: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("badge_token", &badge_token.to_string()); + url_query_param.append_pair("cacheSeconds", &cache_seconds.to_string()); + url_query_param.append_pair("color", &color.to_string()); + url_query_param.append_pair("label", &label.to_string()); + url_query_param.append_pair("labelColor", &label_color.to_string()); + url_query_param.append_pair("logoColor", &logo_color.to_string()); + url_query_param.append_pair("logoWidth", &logo_width.to_string()); + url_query_param.append_pair("render", &render.to_string()); + url_query_param.append_pair("shields", &shields.to_string()); + url_query_param.append_pair("show_latest", &show_latest.to_string()); + url_query_param.append_pair("style", &style.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, package_format=package_format, package_name=package_name, package_version=package_version, package_identifiers=package_identifiers); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageVersionBadge, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/client.rs b/bindings/rust/src/src/apis/client.rs new file mode 100644 index 00000000..934c72cb --- /dev/null +++ b/bindings/rust/src/src/apis/client.rs @@ -0,0 +1,134 @@ +use std::rc::Rc; + +use hyper; +use super::configuration::Configuration; + +pub struct APIClient { + configuration: Rc>, + audit_log_api: Box<::apis::AuditLogApi>, + badges_api: Box<::apis::BadgesApi>, + distros_api: Box<::apis::DistrosApi>, + entitlements_api: Box<::apis::EntitlementsApi>, + files_api: Box<::apis::FilesApi>, + formats_api: Box<::apis::FormatsApi>, + metrics_api: Box<::apis::MetricsApi>, + namespaces_api: Box<::apis::NamespacesApi>, + orgs_api: Box<::apis::OrgsApi>, + packages_api: Box<::apis::PackagesApi>, + quota_api: Box<::apis::QuotaApi>, + rates_api: Box<::apis::RatesApi>, + repos_api: Box<::apis::ReposApi>, + status_api: Box<::apis::StatusApi>, + storage_regions_api: Box<::apis::StorageRegionsApi>, + user_api: Box<::apis::UserApi>, + users_api: Box<::apis::UsersApi>, + vulnerabilities_api: Box<::apis::VulnerabilitiesApi>, + webhooks_api: Box<::apis::WebhooksApi>, +} + +impl APIClient { + pub fn new(configuration: Configuration) -> APIClient { + let rc = Rc::new(configuration); + + APIClient { + configuration: rc.clone(), + audit_log_api: Box::new(::apis::AuditLogApiClient::new(rc.clone())), + badges_api: Box::new(::apis::BadgesApiClient::new(rc.clone())), + distros_api: Box::new(::apis::DistrosApiClient::new(rc.clone())), + entitlements_api: Box::new(::apis::EntitlementsApiClient::new(rc.clone())), + files_api: Box::new(::apis::FilesApiClient::new(rc.clone())), + formats_api: Box::new(::apis::FormatsApiClient::new(rc.clone())), + metrics_api: Box::new(::apis::MetricsApiClient::new(rc.clone())), + namespaces_api: Box::new(::apis::NamespacesApiClient::new(rc.clone())), + orgs_api: Box::new(::apis::OrgsApiClient::new(rc.clone())), + packages_api: Box::new(::apis::PackagesApiClient::new(rc.clone())), + quota_api: Box::new(::apis::QuotaApiClient::new(rc.clone())), + rates_api: Box::new(::apis::RatesApiClient::new(rc.clone())), + repos_api: Box::new(::apis::ReposApiClient::new(rc.clone())), + status_api: Box::new(::apis::StatusApiClient::new(rc.clone())), + storage_regions_api: Box::new(::apis::StorageRegionsApiClient::new(rc.clone())), + user_api: Box::new(::apis::UserApiClient::new(rc.clone())), + users_api: Box::new(::apis::UsersApiClient::new(rc.clone())), + vulnerabilities_api: Box::new(::apis::VulnerabilitiesApiClient::new(rc.clone())), + webhooks_api: Box::new(::apis::WebhooksApiClient::new(rc.clone())), + } + } + + pub fn audit_log_api(&self) -> &::apis::AuditLogApi{ + self.audit_log_api.as_ref() + } + + pub fn badges_api(&self) -> &::apis::BadgesApi{ + self.badges_api.as_ref() + } + + pub fn distros_api(&self) -> &::apis::DistrosApi{ + self.distros_api.as_ref() + } + + pub fn entitlements_api(&self) -> &::apis::EntitlementsApi{ + self.entitlements_api.as_ref() + } + + pub fn files_api(&self) -> &::apis::FilesApi{ + self.files_api.as_ref() + } + + pub fn formats_api(&self) -> &::apis::FormatsApi{ + self.formats_api.as_ref() + } + + pub fn metrics_api(&self) -> &::apis::MetricsApi{ + self.metrics_api.as_ref() + } + + pub fn namespaces_api(&self) -> &::apis::NamespacesApi{ + self.namespaces_api.as_ref() + } + + pub fn orgs_api(&self) -> &::apis::OrgsApi{ + self.orgs_api.as_ref() + } + + pub fn packages_api(&self) -> &::apis::PackagesApi{ + self.packages_api.as_ref() + } + + pub fn quota_api(&self) -> &::apis::QuotaApi{ + self.quota_api.as_ref() + } + + pub fn rates_api(&self) -> &::apis::RatesApi{ + self.rates_api.as_ref() + } + + pub fn repos_api(&self) -> &::apis::ReposApi{ + self.repos_api.as_ref() + } + + pub fn status_api(&self) -> &::apis::StatusApi{ + self.status_api.as_ref() + } + + pub fn storage_regions_api(&self) -> &::apis::StorageRegionsApi{ + self.storage_regions_api.as_ref() + } + + pub fn user_api(&self) -> &::apis::UserApi{ + self.user_api.as_ref() + } + + pub fn users_api(&self) -> &::apis::UsersApi{ + self.users_api.as_ref() + } + + pub fn vulnerabilities_api(&self) -> &::apis::VulnerabilitiesApi{ + self.vulnerabilities_api.as_ref() + } + + pub fn webhooks_api(&self) -> &::apis::WebhooksApi{ + self.webhooks_api.as_ref() + } + + +} diff --git a/bindings/rust/src/src/apis/configuration.rs b/bindings/rust/src/src/apis/configuration.rs new file mode 100644 index 00000000..95611d94 --- /dev/null +++ b/bindings/rust/src/src/apis/configuration.rs @@ -0,0 +1,42 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use hyper; +use std::collections::HashMap; + +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: hyper::client::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one +} + +pub type BasicAuth = (String, Option); + +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + +impl Configuration { + pub fn new(client: hyper::client::Client) -> Configuration { + Configuration { + base_path: "https://api.cloudsmith.io/v1".to_owned(), + user_agent: Some("Swagger-Codegen/v1/rust".to_owned()), + client: client, + basic_auth: None, + oauth_access_token: None, + api_key: None, + } + } +} diff --git a/bindings/rust/src/src/apis/distros_api.rs b/bindings/rust/src/src/apis/distros_api.rs new file mode 100644 index 00000000..16c6a81a --- /dev/null +++ b/bindings/rust/src/src/apis/distros_api.rs @@ -0,0 +1,194 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct DistrosApiClient { + configuration: Rc>, +} + +impl DistrosApiClient { + pub fn new(configuration: Rc>) -> DistrosApiClient { + DistrosApiClient { + configuration: configuration, + } + } +} + +pub trait DistrosApi { + fn distros_list(&self, ) -> Box, Error = Error>>; + fn distros_read(&self, slug: &str) -> Box>>; +} + + +implDistrosApi for DistrosApiClient { + fn distros_list(&self, ) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/distros/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn distros_read(&self, slug: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/distros/{slug}/?{}", configuration.base_path, query_string, slug=slug); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DistributionFull, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/entitlements_api.rs b/bindings/rust/src/src/apis/entitlements_api.rs new file mode 100644 index 00000000..c4a4e0ed --- /dev/null +++ b/bindings/rust/src/src/apis/entitlements_api.rs @@ -0,0 +1,818 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct EntitlementsApiClient { + configuration: Rc>, +} + +impl EntitlementsApiClient { + pub fn new(configuration: Rc>) -> EntitlementsApiClient { + EntitlementsApiClient { + configuration: configuration, + } + } +} + +pub trait EntitlementsApi { + fn entitlements_create(&self, owner: &str, repo: &str, data: ::models::RepositoryTokenRequest, show_tokens: bool) -> Box>>; + fn entitlements_delete(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn entitlements_disable(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn entitlements_enable(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn entitlements_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, show_tokens: bool, query: &str, active: bool) -> Box, Error = Error>>; + fn entitlements_partial_update(&self, owner: &str, repo: &str, identifier: &str, data: ::models::RepositoryTokenRequestPatch, show_tokens: bool) -> Box>>; + fn entitlements_read(&self, owner: &str, repo: &str, identifier: &str, fuzzy: bool, show_tokens: bool) -> Box>>; + fn entitlements_refresh(&self, owner: &str, repo: &str, identifier: &str, data: ::models::RepositoryTokenRefreshRequest, show_tokens: bool) -> Box>>; + fn entitlements_reset(&self, owner: &str, repo: &str, identifier: &str, show_tokens: bool) -> Box>>; + fn entitlements_sync(&self, owner: &str, repo: &str, data: ::models::RepositoryTokenSyncRequest, show_tokens: bool) -> Box>>; +} + + +implEntitlementsApi for EntitlementsApiClient { + fn entitlements_create(&self, owner: &str, repo: &str, data: ::models::RepositoryTokenRequest, show_tokens: bool) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryToken, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn entitlements_delete(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn entitlements_disable(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/disable/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn entitlements_enable(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/enable/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn entitlements_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, show_tokens: bool, query: &str, active: bool) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + url_query_param.append_pair("query", &query.to_string()); + url_query_param.append_pair("active", &active.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn entitlements_partial_update(&self, owner: &str, repo: &str, identifier: &str, data: ::models::RepositoryTokenRequestPatch, show_tokens: bool) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryToken, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn entitlements_read(&self, owner: &str, repo: &str, identifier: &str, fuzzy: bool, show_tokens: bool) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("fuzzy", &fuzzy.to_string()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryToken, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn entitlements_refresh(&self, owner: &str, repo: &str, identifier: &str, data: ::models::RepositoryTokenRefreshRequest, show_tokens: bool) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/refresh/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryTokenRefresh, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn entitlements_reset(&self, owner: &str, repo: &str, identifier: &str, show_tokens: bool) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/{identifier}/reset/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn entitlements_sync(&self, owner: &str, repo: &str, data: ::models::RepositoryTokenSyncRequest, show_tokens: bool) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("show_tokens", &show_tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/entitlements/{owner}/{repo}/sync/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryTokenSync, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/files_api.rs b/bindings/rust/src/src/apis/files_api.rs new file mode 100644 index 00000000..263a663f --- /dev/null +++ b/bindings/rust/src/src/apis/files_api.rs @@ -0,0 +1,434 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct FilesApiClient { + configuration: Rc>, +} + +impl FilesApiClient { + pub fn new(configuration: Rc>) -> FilesApiClient { + FilesApiClient { + configuration: configuration, + } + } +} + +pub trait FilesApi { + fn files_abort(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageFileUploadRequest) -> Box>>; + fn files_complete(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageFileUploadRequest) -> Box>>; + fn files_create(&self, owner: &str, repo: &str, data: ::models::PackageFileUploadRequest) -> Box>>; + fn files_info(&self, owner: &str, repo: &str, identifier: &str, filename: &str, part_number: i32) -> Box>>; + fn files_validate(&self, owner: &str, repo: &str, data: ::models::PackageFileUploadRequest) -> Box>>; +} + + +implFilesApi for FilesApiClient { + fn files_abort(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageFileUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/files/{owner}/{repo}/{identifier}/abort/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn files_complete(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageFileUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/files/{owner}/{repo}/{identifier}/complete/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageFileUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn files_create(&self, owner: &str, repo: &str, data: ::models::PackageFileUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/files/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageFileUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn files_info(&self, owner: &str, repo: &str, identifier: &str, filename: &str, part_number: i32) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("filename", &filename.to_string()); + url_query_param.append_pair("part_number", &part_number.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/files/{owner}/{repo}/{identifier}/info/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageFilePartsUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn files_validate(&self, owner: &str, repo: &str, data: ::models::PackageFileUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/files/{owner}/{repo}/validate/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/formats_api.rs b/bindings/rust/src/src/apis/formats_api.rs new file mode 100644 index 00000000..1a7747d2 --- /dev/null +++ b/bindings/rust/src/src/apis/formats_api.rs @@ -0,0 +1,194 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct FormatsApiClient { + configuration: Rc>, +} + +impl FormatsApiClient { + pub fn new(configuration: Rc>) -> FormatsApiClient { + FormatsApiClient { + configuration: configuration, + } + } +} + +pub trait FormatsApi { + fn formats_list(&self, ) -> Box, Error = Error>>; + fn formats_read(&self, slug: &str) -> Box>>; +} + + +implFormatsApi for FormatsApiClient { + fn formats_list(&self, ) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/formats/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn formats_read(&self, slug: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/formats/{slug}/?{}", configuration.base_path, query_string, slug=slug); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Format, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/metrics_api.rs b/bindings/rust/src/src/apis/metrics_api.rs new file mode 100644 index 00000000..8d016a68 --- /dev/null +++ b/bindings/rust/src/src/apis/metrics_api.rs @@ -0,0 +1,285 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct MetricsApiClient { + configuration: Rc>, +} + +impl MetricsApiClient { + pub fn new(configuration: Rc>) -> MetricsApiClient { + MetricsApiClient { + configuration: configuration, + } + } +} + +pub trait MetricsApi { + fn metrics_entitlements_account_list(&self, owner: &str, page: i32, page_size: i32, finish: &str, start: &str, tokens: &str) -> Box>>; + fn metrics_entitlements_repo_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, finish: &str, start: &str, tokens: &str) -> Box>>; + fn metrics_packages_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, finish: &str, packages: &str, start: &str) -> Box>>; +} + + +implMetricsApi for MetricsApiClient { + fn metrics_entitlements_account_list(&self, owner: &str, page: i32, page_size: i32, finish: &str, start: &str, tokens: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("finish", &finish.to_string()); + url_query_param.append_pair("start", &start.to_string()); + url_query_param.append_pair("tokens", &tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/metrics/entitlements/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::EntitlementUsageMetrics, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn metrics_entitlements_repo_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, finish: &str, start: &str, tokens: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("finish", &finish.to_string()); + url_query_param.append_pair("start", &start.to_string()); + url_query_param.append_pair("tokens", &tokens.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/metrics/entitlements/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::EntitlementUsageMetrics, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn metrics_packages_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, finish: &str, packages: &str, start: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("finish", &finish.to_string()); + url_query_param.append_pair("packages", &packages.to_string()); + url_query_param.append_pair("start", &start.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/metrics/packages/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageUsageMetrics, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/mod.rs b/bindings/rust/src/src/apis/mod.rs new file mode 100644 index 00000000..915078e6 --- /dev/null +++ b/bindings/rust/src/src/apis/mod.rs @@ -0,0 +1,93 @@ +use hyper; +use serde; +use serde_json; + +#[derive(Debug)] +pub enum Error { + Hyper(hyper::Error), + Serde(serde_json::Error), + ApiError(ApiError), +} + +#[derive(Debug)] +pub struct ApiError { + pub code: hyper::StatusCode, + pub content: Option, +} + +impl<'de, T> From<(hyper::StatusCode, &'de [u8])> for Error + where T: serde::Deserialize<'de> { + fn from(e: (hyper::StatusCode, &'de [u8])) -> Self { + if e.1.len() == 0 { + return Error::ApiError(ApiError{ + code: e.0, + content: None, + }); + } + match serde_json::from_slice::(e.1) { + Ok(t) => Error::ApiError(ApiError{ + code: e.0, + content: Some(t), + }), + Err(e) => { + Error::from(e) + } + } + } +} + +impl From for Error { + fn from(e: hyper::Error) -> Self { + return Error::Hyper(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + return Error::Serde(e) + } +} + +use super::models::*; + +mod audit_log_api; +pub use self::audit_log_api::{ AuditLogApi, AuditLogApiClient }; +mod badges_api; +pub use self::badges_api::{ BadgesApi, BadgesApiClient }; +mod distros_api; +pub use self::distros_api::{ DistrosApi, DistrosApiClient }; +mod entitlements_api; +pub use self::entitlements_api::{ EntitlementsApi, EntitlementsApiClient }; +mod files_api; +pub use self::files_api::{ FilesApi, FilesApiClient }; +mod formats_api; +pub use self::formats_api::{ FormatsApi, FormatsApiClient }; +mod metrics_api; +pub use self::metrics_api::{ MetricsApi, MetricsApiClient }; +mod namespaces_api; +pub use self::namespaces_api::{ NamespacesApi, NamespacesApiClient }; +mod orgs_api; +pub use self::orgs_api::{ OrgsApi, OrgsApiClient }; +mod packages_api; +pub use self::packages_api::{ PackagesApi, PackagesApiClient }; +mod quota_api; +pub use self::quota_api::{ QuotaApi, QuotaApiClient }; +mod rates_api; +pub use self::rates_api::{ RatesApi, RatesApiClient }; +mod repos_api; +pub use self::repos_api::{ ReposApi, ReposApiClient }; +mod status_api; +pub use self::status_api::{ StatusApi, StatusApiClient }; +mod storage_regions_api; +pub use self::storage_regions_api::{ StorageRegionsApi, StorageRegionsApiClient }; +mod user_api; +pub use self::user_api::{ UserApi, UserApiClient }; +mod users_api; +pub use self::users_api::{ UsersApi, UsersApiClient }; +mod vulnerabilities_api; +pub use self::vulnerabilities_api::{ VulnerabilitiesApi, VulnerabilitiesApiClient }; +mod webhooks_api; +pub use self::webhooks_api::{ WebhooksApi, WebhooksApiClient }; + +pub mod configuration; +pub mod client; diff --git a/bindings/rust/src/src/apis/namespaces_api.rs b/bindings/rust/src/src/apis/namespaces_api.rs new file mode 100644 index 00000000..2b74948e --- /dev/null +++ b/bindings/rust/src/src/apis/namespaces_api.rs @@ -0,0 +1,196 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct NamespacesApiClient { + configuration: Rc>, +} + +impl NamespacesApiClient { + pub fn new(configuration: Rc>) -> NamespacesApiClient { + NamespacesApiClient { + configuration: configuration, + } + } +} + +pub trait NamespacesApi { + fn namespaces_list(&self, page: i32, page_size: i32) -> Box, Error = Error>>; + fn namespaces_read(&self, slug: &str) -> Box>>; +} + + +implNamespacesApi for NamespacesApiClient { + fn namespaces_list(&self, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/namespaces/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn namespaces_read(&self, slug: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/namespaces/{slug}/?{}", configuration.base_path, query_string, slug=slug); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Namespace, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/orgs_api.rs b/bindings/rust/src/src/apis/orgs_api.rs new file mode 100644 index 00000000..59f394f3 --- /dev/null +++ b/bindings/rust/src/src/apis/orgs_api.rs @@ -0,0 +1,5535 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct OrgsApiClient { + configuration: Rc>, +} + +impl OrgsApiClient { + pub fn new(configuration: Rc>) -> OrgsApiClient { + OrgsApiClient { + configuration: configuration, + } + } +} + +pub trait OrgsApi { + fn orgs_delete(&self, org: &str) -> Box>>; + fn orgs_deny_policy_create(&self, org: &str, data: ::models::PackageDenyPolicyRequest) -> Box>>; + fn orgs_deny_policy_delete(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_deny_policy_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_deny_policy_partial_update(&self, org: &str, slug_perm: &str, data: ::models::PackageDenyPolicyRequestPatch) -> Box>>; + fn orgs_deny_policy_read(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_deny_policy_update(&self, org: &str, slug_perm: &str, data: ::models::PackageDenyPolicyRequest) -> Box>>; + fn orgs_invites_create(&self, org: &str, data: ::models::OrganizationInviteRequest) -> Box>>; + fn orgs_invites_delete(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_invites_extend(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_invites_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_invites_partial_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationInviteUpdateRequestPatch) -> Box>>; + fn orgs_invites_resend(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_license_policy_create(&self, org: &str, data: ::models::OrganizationPackageLicensePolicyRequest) -> Box>>; + fn orgs_license_policy_delete(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_license_policy_evaluation_create(&self, org: &str, policy_slug_perm: &str, data: ::models::PackageLicensePolicyEvaluationRequestRequest) -> Box>>; + fn orgs_license_policy_evaluation_list(&self, org: &str, policy_slug_perm: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_license_policy_evaluation_read(&self, org: &str, policy_slug_perm: &str, slug_perm: &str) -> Box>>; + fn orgs_license_policy_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_license_policy_partial_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageLicensePolicyRequestPatch) -> Box>>; + fn orgs_license_policy_read(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_license_policy_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageLicensePolicyRequest) -> Box>>; + fn orgs_license_policy_violation_list(&self, org: &str, cursor: &str, page_size: i32) -> Box>>; + fn orgs_list(&self, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_members_delete(&self, org: &str, member: &str) -> Box>>; + fn orgs_members_list(&self, org: &str, page: i32, page_size: i32, is_active: bool, query: &str, sort: &str) -> Box, Error = Error>>; + fn orgs_members_partial_update(&self, org: &str, member: &str, data: ::models::OrganizationMembershipRequestPatch) -> Box>>; + fn orgs_members_read(&self, org: &str, member: &str) -> Box>>; + fn orgs_members_refresh(&self, org: &str, member: &str) -> Box>>; + fn orgs_members_remove(&self, org: &str, member: &str) -> Box>>; + fn orgs_members_update_role(&self, org: &str, member: &str, data: ::models::OrganizationMembershipRoleUpdateRequestPatch) -> Box>>; + fn orgs_members_update_visibility(&self, org: &str, member: &str, data: ::models::OrganizationMembershipVisibilityUpdateRequestPatch) -> Box>>; + fn orgs_openid_connect_create(&self, org: &str, data: ::models::ProviderSettingsRequest) -> Box>>; + fn orgs_openid_connect_delete(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_openid_connect_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_openid_connect_partial_update(&self, org: &str, slug_perm: &str, data: ::models::ProviderSettingsRequestPatch) -> Box>>; + fn orgs_openid_connect_read(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_openid_connect_update(&self, org: &str, slug_perm: &str, data: ::models::ProviderSettingsRequest) -> Box>>; + fn orgs_read(&self, org: &str) -> Box>>; + fn orgs_saml_authentication_partial_update(&self, org: &str, data: ::models::OrganizationSamlAuthRequestPatch) -> Box>>; + fn orgs_saml_authentication_read(&self, org: &str) -> Box>>; + fn orgs_saml_group_sync_create(&self, org: &str, data: ::models::OrganizationGroupSyncRequest) -> Box>>; + fn orgs_saml_group_sync_delete(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_saml_group_sync_disable(&self, org: &str) -> Box>>; + fn orgs_saml_group_sync_enable(&self, org: &str) -> Box>>; + fn orgs_saml_group_sync_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_saml_group_sync_status(&self, org: &str) -> Box>>; + fn orgs_services_create(&self, org: &str, data: ::models::ServiceRequest) -> Box>>; + fn orgs_services_delete(&self, org: &str, service: &str) -> Box>>; + fn orgs_services_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_services_partial_update(&self, org: &str, service: &str, data: ::models::ServiceRequestPatch) -> Box>>; + fn orgs_services_read(&self, org: &str, service: &str) -> Box>>; + fn orgs_services_refresh(&self, org: &str, service: &str) -> Box>>; + fn orgs_teams_create(&self, org: &str, data: ::models::OrganizationTeamRequest) -> Box>>; + fn orgs_teams_delete(&self, org: &str, team: &str) -> Box>>; + fn orgs_teams_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_teams_members_create(&self, org: &str, team: &str, data: ::models::OrganizationTeamMembers) -> Box>>; + fn orgs_teams_members_list(&self, org: &str, team: &str) -> Box>>; + fn orgs_teams_members_update(&self, org: &str, team: &str, data: ::models::OrganizationTeamMembers) -> Box>>; + fn orgs_teams_partial_update(&self, org: &str, team: &str, data: ::models::OrganizationTeamRequestPatch) -> Box>>; + fn orgs_teams_read(&self, org: &str, team: &str) -> Box>>; + fn orgs_vulnerability_policy_create(&self, org: &str, data: ::models::OrganizationPackageVulnerabilityPolicyRequest) -> Box>>; + fn orgs_vulnerability_policy_delete(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_vulnerability_policy_evaluation_create(&self, org: &str, policy_slug_perm: &str, data: ::models::PackageVulnerabilityPolicyEvaluationRequestRequest) -> Box>>; + fn orgs_vulnerability_policy_evaluation_list(&self, org: &str, policy_slug_perm: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_vulnerability_policy_evaluation_read(&self, org: &str, policy_slug_perm: &str, slug_perm: &str) -> Box>>; + fn orgs_vulnerability_policy_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn orgs_vulnerability_policy_partial_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageVulnerabilityPolicyRequestPatch) -> Box>>; + fn orgs_vulnerability_policy_read(&self, org: &str, slug_perm: &str) -> Box>>; + fn orgs_vulnerability_policy_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageVulnerabilityPolicyRequest) -> Box>>; + fn orgs_vulnerability_policy_violation_list(&self, org: &str, cursor: &str, page_size: i32) -> Box>>; +} + + +implOrgsApi for OrgsApiClient { + fn orgs_delete(&self, org: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_deny_policy_create(&self, org: &str, data: ::models::PackageDenyPolicyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/deny-policy/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageDenyPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_deny_policy_delete(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/deny-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_deny_policy_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/deny-policy/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_deny_policy_partial_update(&self, org: &str, slug_perm: &str, data: ::models::PackageDenyPolicyRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/deny-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageDenyPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_deny_policy_read(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/deny-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageDenyPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_deny_policy_update(&self, org: &str, slug_perm: &str, data: ::models::PackageDenyPolicyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/deny-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageDenyPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_invites_create(&self, org: &str, data: ::models::OrganizationInviteRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/invites/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationInvite, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_invites_delete(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/invites/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_invites_extend(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/invites/{slug_perm}/extend/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationInviteExtend, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_invites_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/invites/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_invites_partial_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationInviteUpdateRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/invites/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationInvite, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_invites_resend(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/invites/{slug_perm}/resend/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationInviteExtend, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_create(&self, org: &str, data: ::models::OrganizationPackageLicensePolicyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageLicensePolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_delete(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_license_policy_evaluation_create(&self, org: &str, policy_slug_perm: &str, data: ::models::PackageLicensePolicyEvaluationRequestRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/?{}", configuration.base_path, query_string, org=org, policy_slug_perm=policy_slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageLicensePolicyEvaluationRequest, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_evaluation_list(&self, org: &str, policy_slug_perm: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/?{}", configuration.base_path, query_string, org=org, policy_slug_perm=policy_slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_evaluation_read(&self, org: &str, policy_slug_perm: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/{slug_perm}/?{}", configuration.base_path, query_string, org=org, policy_slug_perm=policy_slug_perm, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageLicensePolicyEvaluationRequest, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_partial_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageLicensePolicyRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageLicensePolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_read(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageLicensePolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageLicensePolicyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageLicensePolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_license_policy_violation_list(&self, org: &str, cursor: &str, page_size: i32) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("cursor", &cursor.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/license-policy-violation/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageLicensePolicyViolationLogCursorPage, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_list(&self, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_members_delete(&self, org: &str, member: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_members_list(&self, org: &str, page: i32, page_size: i32, is_active: bool, query: &str, sort: &str) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("is_active", &is_active.to_string()); + url_query_param.append_pair("query", &query.to_string()); + url_query_param.append_pair("sort", &sort.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_members_partial_update(&self, org: &str, member: &str, data: ::models::OrganizationMembershipRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationMembership, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_members_read(&self, org: &str, member: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationMembership, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_members_refresh(&self, org: &str, member: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/refresh/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_members_remove(&self, org: &str, member: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/remove/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_members_update_role(&self, org: &str, member: &str, data: ::models::OrganizationMembershipRoleUpdateRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/update-role/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationMembershipRoleUpdate, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_members_update_visibility(&self, org: &str, member: &str, data: ::models::OrganizationMembershipVisibilityUpdateRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/members/{member}/update-visibility/?{}", configuration.base_path, query_string, org=org, member=member); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationMembershipVisibilityUpdate, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_openid_connect_create(&self, org: &str, data: ::models::ProviderSettingsRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/openid-connect/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ProviderSettings, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_openid_connect_delete(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/openid-connect/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_openid_connect_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/openid-connect/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_openid_connect_partial_update(&self, org: &str, slug_perm: &str, data: ::models::ProviderSettingsRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/openid-connect/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ProviderSettings, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_openid_connect_read(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/openid-connect/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ProviderSettings, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_openid_connect_update(&self, org: &str, slug_perm: &str, data: ::models::ProviderSettingsRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/openid-connect/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ProviderSettings, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_read(&self, org: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Organization, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_saml_authentication_partial_update(&self, org: &str, data: ::models::OrganizationSamlAuthRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-authentication?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationSamlAuth, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_saml_authentication_read(&self, org: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-authentication?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationSamlAuth, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_saml_group_sync_create(&self, org: &str, data: ::models::OrganizationGroupSyncRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-group-sync/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationGroupSync, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_saml_group_sync_delete(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-group-sync/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_saml_group_sync_disable(&self, org: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-group-sync/disable/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_saml_group_sync_enable(&self, org: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-group-sync/enable/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_saml_group_sync_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-group-sync/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_saml_group_sync_status(&self, org: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/saml-group-sync/status/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationGroupSyncStatus, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_services_create(&self, org: &str, data: ::models::ServiceRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/services/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Service, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_services_delete(&self, org: &str, service: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/services/{service}/?{}", configuration.base_path, query_string, org=org, service=service); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_services_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/services/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_services_partial_update(&self, org: &str, service: &str, data: ::models::ServiceRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/services/{service}/?{}", configuration.base_path, query_string, org=org, service=service); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Service, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_services_read(&self, org: &str, service: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/services/{service}/?{}", configuration.base_path, query_string, org=org, service=service); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Service, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_services_refresh(&self, org: &str, service: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/services/{service}/refresh/?{}", configuration.base_path, query_string, org=org, service=service); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Service, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_create(&self, org: &str, data: ::models::OrganizationTeamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationTeam, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_delete(&self, org: &str, team: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/{team}/?{}", configuration.base_path, query_string, org=org, team=team); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_teams_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_members_create(&self, org: &str, team: &str, data: ::models::OrganizationTeamMembers) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/{team}/members?{}", configuration.base_path, query_string, org=org, team=team); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationTeamMembers, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_members_list(&self, org: &str, team: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/{team}/members?{}", configuration.base_path, query_string, org=org, team=team); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationTeamMembers, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_members_update(&self, org: &str, team: &str, data: ::models::OrganizationTeamMembers) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/{team}/members?{}", configuration.base_path, query_string, org=org, team=team); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationTeamMembers, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_partial_update(&self, org: &str, team: &str, data: ::models::OrganizationTeamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/{team}/?{}", configuration.base_path, query_string, org=org, team=team); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationTeam, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_teams_read(&self, org: &str, team: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/teams/{team}/?{}", configuration.base_path, query_string, org=org, team=team); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationTeam, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_create(&self, org: &str, data: ::models::OrganizationPackageVulnerabilityPolicyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageVulnerabilityPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_delete(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn orgs_vulnerability_policy_evaluation_create(&self, org: &str, policy_slug_perm: &str, data: ::models::PackageVulnerabilityPolicyEvaluationRequestRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/?{}", configuration.base_path, query_string, org=org, policy_slug_perm=policy_slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageVulnerabilityPolicyEvaluationRequest, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_evaluation_list(&self, org: &str, policy_slug_perm: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/?{}", configuration.base_path, query_string, org=org, policy_slug_perm=policy_slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_evaluation_read(&self, org: &str, policy_slug_perm: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/{slug_perm}/?{}", configuration.base_path, query_string, org=org, policy_slug_perm=policy_slug_perm, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageVulnerabilityPolicyEvaluationRequest, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_list(&self, org: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_partial_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageVulnerabilityPolicyRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageVulnerabilityPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_read(&self, org: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageVulnerabilityPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_update(&self, org: &str, slug_perm: &str, data: ::models::OrganizationPackageVulnerabilityPolicyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy/{slug_perm}/?{}", configuration.base_path, query_string, org=org, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::OrganizationPackageVulnerabilityPolicy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn orgs_vulnerability_policy_violation_list(&self, org: &str, cursor: &str, page_size: i32) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("cursor", &cursor.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/orgs/{org}/vulnerability-policy-violation/?{}", configuration.base_path, query_string, org=org); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageVulnerabilityPolicyViolationLogCursorPage, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/packages_api.rs b/bindings/rust/src/src/apis/packages_api.rs new file mode 100644 index 00000000..1ecfb1bc --- /dev/null +++ b/bindings/rust/src/src/apis/packages_api.rs @@ -0,0 +1,4820 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct PackagesApiClient { + configuration: Rc>, +} + +impl PackagesApiClient { + pub fn new(configuration: Rc>) -> PackagesApiClient { + PackagesApiClient { + configuration: configuration, + } + } +} + +pub trait PackagesApi { + fn packages_copy(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageCopyRequest) -> Box>>; + fn packages_delete(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn packages_dependencies(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn packages_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, query: &str, sort: &str) -> Box, Error = Error>>; + fn packages_move(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageMoveRequest) -> Box>>; + fn packages_quarantine(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageQuarantineRequest) -> Box>>; + fn packages_read(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn packages_resync(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn packages_scan(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn packages_status(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn packages_tag(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageTagRequest) -> Box>>; + fn packages_upload_alpine(&self, owner: &str, repo: &str, data: ::models::AlpinePackageUploadRequest) -> Box>>; + fn packages_upload_cargo(&self, owner: &str, repo: &str, data: ::models::CargoPackageUploadRequest) -> Box>>; + fn packages_upload_cocoapods(&self, owner: &str, repo: &str, data: ::models::CocoapodsPackageUploadRequest) -> Box>>; + fn packages_upload_composer(&self, owner: &str, repo: &str, data: ::models::ComposerPackageUploadRequest) -> Box>>; + fn packages_upload_conan(&self, owner: &str, repo: &str, data: ::models::ConanPackageUploadRequest) -> Box>>; + fn packages_upload_conda(&self, owner: &str, repo: &str, data: ::models::CondaPackageUploadRequest) -> Box>>; + fn packages_upload_cran(&self, owner: &str, repo: &str, data: ::models::CranPackageUploadRequest) -> Box>>; + fn packages_upload_dart(&self, owner: &str, repo: &str, data: ::models::DartPackageUploadRequest) -> Box>>; + fn packages_upload_deb(&self, owner: &str, repo: &str, data: ::models::DebPackageUploadRequest) -> Box>>; + fn packages_upload_docker(&self, owner: &str, repo: &str, data: ::models::DockerPackageUploadRequest) -> Box>>; + fn packages_upload_go(&self, owner: &str, repo: &str, data: ::models::GoPackageUploadRequest) -> Box>>; + fn packages_upload_helm(&self, owner: &str, repo: &str, data: ::models::HelmPackageUploadRequest) -> Box>>; + fn packages_upload_hex(&self, owner: &str, repo: &str, data: ::models::HexPackageUploadRequest) -> Box>>; + fn packages_upload_luarocks(&self, owner: &str, repo: &str, data: ::models::LuarocksPackageUploadRequest) -> Box>>; + fn packages_upload_maven(&self, owner: &str, repo: &str, data: ::models::MavenPackageUploadRequest) -> Box>>; + fn packages_upload_npm(&self, owner: &str, repo: &str, data: ::models::NpmPackageUploadRequest) -> Box>>; + fn packages_upload_nuget(&self, owner: &str, repo: &str, data: ::models::NugetPackageUploadRequest) -> Box>>; + fn packages_upload_p2(&self, owner: &str, repo: &str, data: ::models::P2PackageUploadRequest) -> Box>>; + fn packages_upload_python(&self, owner: &str, repo: &str, data: ::models::PythonPackageUploadRequest) -> Box>>; + fn packages_upload_raw(&self, owner: &str, repo: &str, data: ::models::RawPackageUploadRequest) -> Box>>; + fn packages_upload_rpm(&self, owner: &str, repo: &str, data: ::models::RpmPackageUploadRequest) -> Box>>; + fn packages_upload_ruby(&self, owner: &str, repo: &str, data: ::models::RubyPackageUploadRequest) -> Box>>; + fn packages_upload_swift(&self, owner: &str, repo: &str, data: ::models::SwiftPackageUploadRequest) -> Box>>; + fn packages_upload_terraform(&self, owner: &str, repo: &str, data: ::models::TerraformPackageUploadRequest) -> Box>>; + fn packages_upload_vagrant(&self, owner: &str, repo: &str, data: ::models::VagrantPackageUploadRequest) -> Box>>; + fn packages_validate_upload_alpine(&self, owner: &str, repo: &str, data: ::models::AlpinePackageUploadRequest) -> Box>>; + fn packages_validate_upload_cargo(&self, owner: &str, repo: &str, data: ::models::CargoPackageUploadRequest) -> Box>>; + fn packages_validate_upload_cocoapods(&self, owner: &str, repo: &str, data: ::models::CocoapodsPackageUploadRequest) -> Box>>; + fn packages_validate_upload_composer(&self, owner: &str, repo: &str, data: ::models::ComposerPackageUploadRequest) -> Box>>; + fn packages_validate_upload_conan(&self, owner: &str, repo: &str, data: ::models::ConanPackageUploadRequest) -> Box>>; + fn packages_validate_upload_conda(&self, owner: &str, repo: &str, data: ::models::CondaPackageUploadRequest) -> Box>>; + fn packages_validate_upload_cran(&self, owner: &str, repo: &str, data: ::models::CranPackageUploadRequest) -> Box>>; + fn packages_validate_upload_dart(&self, owner: &str, repo: &str, data: ::models::DartPackageUploadRequest) -> Box>>; + fn packages_validate_upload_deb(&self, owner: &str, repo: &str, data: ::models::DebPackageUploadRequest) -> Box>>; + fn packages_validate_upload_docker(&self, owner: &str, repo: &str, data: ::models::DockerPackageUploadRequest) -> Box>>; + fn packages_validate_upload_go(&self, owner: &str, repo: &str, data: ::models::GoPackageUploadRequest) -> Box>>; + fn packages_validate_upload_helm(&self, owner: &str, repo: &str, data: ::models::HelmPackageUploadRequest) -> Box>>; + fn packages_validate_upload_hex(&self, owner: &str, repo: &str, data: ::models::HexPackageUploadRequest) -> Box>>; + fn packages_validate_upload_luarocks(&self, owner: &str, repo: &str, data: ::models::LuarocksPackageUploadRequest) -> Box>>; + fn packages_validate_upload_maven(&self, owner: &str, repo: &str, data: ::models::MavenPackageUploadRequest) -> Box>>; + fn packages_validate_upload_npm(&self, owner: &str, repo: &str, data: ::models::NpmPackageUploadRequest) -> Box>>; + fn packages_validate_upload_nuget(&self, owner: &str, repo: &str, data: ::models::NugetPackageUploadRequest) -> Box>>; + fn packages_validate_upload_p2(&self, owner: &str, repo: &str, data: ::models::P2PackageUploadRequest) -> Box>>; + fn packages_validate_upload_python(&self, owner: &str, repo: &str, data: ::models::PythonPackageUploadRequest) -> Box>>; + fn packages_validate_upload_raw(&self, owner: &str, repo: &str, data: ::models::RawPackageUploadRequest) -> Box>>; + fn packages_validate_upload_rpm(&self, owner: &str, repo: &str, data: ::models::RpmPackageUploadRequest) -> Box>>; + fn packages_validate_upload_ruby(&self, owner: &str, repo: &str, data: ::models::RubyPackageUploadRequest) -> Box>>; + fn packages_validate_upload_swift(&self, owner: &str, repo: &str, data: ::models::SwiftPackageUploadRequest) -> Box>>; + fn packages_validate_upload_terraform(&self, owner: &str, repo: &str, data: ::models::TerraformPackageUploadRequest) -> Box>>; + fn packages_validate_upload_vagrant(&self, owner: &str, repo: &str, data: ::models::VagrantPackageUploadRequest) -> Box>>; +} + + +implPackagesApi for PackagesApiClient { + fn packages_copy(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageCopyRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/copy/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageCopy, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_delete(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_dependencies(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/dependencies/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageDependencies, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_list(&self, owner: &str, repo: &str, page: i32, page_size: i32, query: &str, sort: &str) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + url_query_param.append_pair("query", &query.to_string()); + url_query_param.append_pair("sort", &sort.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_move(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageMoveRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/move/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageMove, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_quarantine(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageQuarantineRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/quarantine/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageQuarantine, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_read(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Package, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_resync(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/resync/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageResync, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_scan(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/scan/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Package, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_status(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/status/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PackageStatus, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_tag(&self, owner: &str, repo: &str, identifier: &str, data: ::models::PackageTagRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/{identifier}/tag/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Package, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_alpine(&self, owner: &str, repo: &str, data: ::models::AlpinePackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/alpine/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::AlpinePackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_cargo(&self, owner: &str, repo: &str, data: ::models::CargoPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/cargo/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CargoPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_cocoapods(&self, owner: &str, repo: &str, data: ::models::CocoapodsPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/cocoapods/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CocoapodsPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_composer(&self, owner: &str, repo: &str, data: ::models::ComposerPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/composer/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ComposerPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_conan(&self, owner: &str, repo: &str, data: ::models::ConanPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/conan/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ConanPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_conda(&self, owner: &str, repo: &str, data: ::models::CondaPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/conda/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CondaPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_cran(&self, owner: &str, repo: &str, data: ::models::CranPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/cran/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CranPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_dart(&self, owner: &str, repo: &str, data: ::models::DartPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/dart/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DartPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_deb(&self, owner: &str, repo: &str, data: ::models::DebPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/deb/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DebPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_docker(&self, owner: &str, repo: &str, data: ::models::DockerPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/docker/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DockerPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_go(&self, owner: &str, repo: &str, data: ::models::GoPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/go/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::GoPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_helm(&self, owner: &str, repo: &str, data: ::models::HelmPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/helm/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HelmPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_hex(&self, owner: &str, repo: &str, data: ::models::HexPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/hex/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HexPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_luarocks(&self, owner: &str, repo: &str, data: ::models::LuarocksPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/luarocks/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::LuarocksPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_maven(&self, owner: &str, repo: &str, data: ::models::MavenPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/maven/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::MavenPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_npm(&self, owner: &str, repo: &str, data: ::models::NpmPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/npm/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NpmPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_nuget(&self, owner: &str, repo: &str, data: ::models::NugetPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/nuget/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NugetPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_p2(&self, owner: &str, repo: &str, data: ::models::P2PackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/p2/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::P2PackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_python(&self, owner: &str, repo: &str, data: ::models::PythonPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/python/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PythonPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_raw(&self, owner: &str, repo: &str, data: ::models::RawPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/raw/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RawPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_rpm(&self, owner: &str, repo: &str, data: ::models::RpmPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/rpm/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RpmPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_ruby(&self, owner: &str, repo: &str, data: ::models::RubyPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/ruby/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RubyPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_swift(&self, owner: &str, repo: &str, data: ::models::SwiftPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/swift/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::SwiftPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_terraform(&self, owner: &str, repo: &str, data: ::models::TerraformPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/terraform/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::TerraformPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_upload_vagrant(&self, owner: &str, repo: &str, data: ::models::VagrantPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/upload/vagrant/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::VagrantPackageUpload, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn packages_validate_upload_alpine(&self, owner: &str, repo: &str, data: ::models::AlpinePackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/alpine/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_cargo(&self, owner: &str, repo: &str, data: ::models::CargoPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/cargo/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_cocoapods(&self, owner: &str, repo: &str, data: ::models::CocoapodsPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/cocoapods/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_composer(&self, owner: &str, repo: &str, data: ::models::ComposerPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/composer/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_conan(&self, owner: &str, repo: &str, data: ::models::ConanPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/conan/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_conda(&self, owner: &str, repo: &str, data: ::models::CondaPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/conda/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_cran(&self, owner: &str, repo: &str, data: ::models::CranPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/cran/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_dart(&self, owner: &str, repo: &str, data: ::models::DartPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/dart/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_deb(&self, owner: &str, repo: &str, data: ::models::DebPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/deb/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_docker(&self, owner: &str, repo: &str, data: ::models::DockerPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/docker/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_go(&self, owner: &str, repo: &str, data: ::models::GoPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/go/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_helm(&self, owner: &str, repo: &str, data: ::models::HelmPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/helm/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_hex(&self, owner: &str, repo: &str, data: ::models::HexPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/hex/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_luarocks(&self, owner: &str, repo: &str, data: ::models::LuarocksPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/luarocks/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_maven(&self, owner: &str, repo: &str, data: ::models::MavenPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/maven/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_npm(&self, owner: &str, repo: &str, data: ::models::NpmPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/npm/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_nuget(&self, owner: &str, repo: &str, data: ::models::NugetPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/nuget/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_p2(&self, owner: &str, repo: &str, data: ::models::P2PackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/p2/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_python(&self, owner: &str, repo: &str, data: ::models::PythonPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/python/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_raw(&self, owner: &str, repo: &str, data: ::models::RawPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/raw/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_rpm(&self, owner: &str, repo: &str, data: ::models::RpmPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/rpm/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_ruby(&self, owner: &str, repo: &str, data: ::models::RubyPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/ruby/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_swift(&self, owner: &str, repo: &str, data: ::models::SwiftPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/swift/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_terraform(&self, owner: &str, repo: &str, data: ::models::TerraformPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/terraform/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn packages_validate_upload_vagrant(&self, owner: &str, repo: &str, data: ::models::VagrantPackageUploadRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/packages/{owner}/{repo}/validate-upload/vagrant/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/quota_api.rs b/bindings/rust/src/src/apis/quota_api.rs new file mode 100644 index 00000000..3f9ea98e --- /dev/null +++ b/bindings/rust/src/src/apis/quota_api.rs @@ -0,0 +1,346 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct QuotaApiClient { + configuration: Rc>, +} + +impl QuotaApiClient { + pub fn new(configuration: Rc>) -> QuotaApiClient { + QuotaApiClient { + configuration: configuration, + } + } +} + +pub trait QuotaApi { + fn quota_history_read(&self, owner: &str) -> Box>>; + fn quota_oss_history_read(&self, owner: &str) -> Box>>; + fn quota_oss_read(&self, owner: &str) -> Box>>; + fn quota_read(&self, owner: &str) -> Box>>; +} + + +implQuotaApi for QuotaApiClient { + fn quota_history_read(&self, owner: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/quota/history/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::QuotaHistory, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn quota_oss_history_read(&self, owner: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/quota/oss/history/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::QuotaHistory, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn quota_oss_read(&self, owner: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/quota/oss/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Quota, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn quota_read(&self, owner: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/quota/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Quota, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/rates_api.rs b/bindings/rust/src/src/apis/rates_api.rs new file mode 100644 index 00000000..4d91548a --- /dev/null +++ b/bindings/rust/src/src/apis/rates_api.rs @@ -0,0 +1,118 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct RatesApiClient { + configuration: Rc>, +} + +impl RatesApiClient { + pub fn new(configuration: Rc>) -> RatesApiClient { + RatesApiClient { + configuration: configuration, + } + } +} + +pub trait RatesApi { + fn rates_limits_list(&self, ) -> Box>>; +} + + +implRatesApi for RatesApiClient { + fn rates_limits_list(&self, ) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/rates/limits/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ResourcesRateCheck, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/repos_api.rs b/bindings/rust/src/src/apis/repos_api.rs new file mode 100644 index 00000000..7d15a649 --- /dev/null +++ b/bindings/rust/src/src/apis/repos_api.rs @@ -0,0 +1,8904 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct ReposApiClient { + configuration: Rc>, +} + +impl ReposApiClient { + pub fn new(configuration: Rc>) -> ReposApiClient { + ReposApiClient { + configuration: configuration, + } + } +} + +pub trait ReposApi { + fn api_repos_geoip_status(&self, owner: &str, identifier: &str) -> Box>>; + fn repo_retention_partial_update(&self, owner: &str, repo: &str, data: ::models::RepositoryRetentionRulesRequestPatch) -> Box>>; + fn repo_retention_read(&self, owner: &str, repo: &str) -> Box>>; + fn repos_create(&self, owner: &str, data: ::models::RepositoryCreateRequest) -> Box>>; + fn repos_delete(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_ecdsa_create(&self, owner: &str, identifier: &str, data: ::models::RepositoryEcdsaKeyCreate) -> Box>>; + fn repos_ecdsa_list(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_ecdsa_regenerate(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_geoip_disable(&self, owner: &str, identifier: &str, data: ::models::RespositoryGeoIpEnableDisableRequest) -> Box>>; + fn repos_geoip_enable(&self, owner: &str, identifier: &str, data: ::models::RespositoryGeoIpEnableDisableRequest) -> Box>>; + fn repos_geoip_partial_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryGeoIpRulesRequestPatch) -> Box>>; + fn repos_geoip_read(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_geoip_test(&self, owner: &str, identifier: &str, data: ::models::RepositoryGeoIpTestAddress) -> Box>>; + fn repos_geoip_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryGeoIpRulesRequest) -> Box>>; + fn repos_gpg_create(&self, owner: &str, identifier: &str, data: ::models::RepositoryGpgKeyCreate) -> Box>>; + fn repos_gpg_list(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_gpg_regenerate(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_namespace_list(&self, owner: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_partial_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryRequestPatch) -> Box>>; + fn repos_privileges_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box>>; + fn repos_privileges_partial_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryPrivilegeInputRequestPatch) -> Box>>; + fn repos_privileges_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryPrivilegeInputRequest) -> Box>>; + fn repos_read(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_rsa_create(&self, owner: &str, identifier: &str, data: ::models::RepositoryRsaKeyCreate) -> Box>>; + fn repos_rsa_list(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_rsa_regenerate(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_transfer_region(&self, owner: &str, repo: &str, data: ::models::RepositoryTransferRegionRequest) -> Box>>; + fn repos_upstream_composer_create(&self, owner: &str, identifier: &str, data: ::models::ComposerUpstreamRequest) -> Box>>; + fn repos_upstream_composer_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_composer_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_composer_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::ComposerUpstreamRequestPatch) -> Box>>; + fn repos_upstream_composer_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_composer_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::ComposerUpstreamRequest) -> Box>>; + fn repos_upstream_cran_create(&self, owner: &str, identifier: &str, data: ::models::CranUpstreamRequest) -> Box>>; + fn repos_upstream_cran_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_cran_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_cran_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::CranUpstreamRequestPatch) -> Box>>; + fn repos_upstream_cran_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_cran_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::CranUpstreamRequest) -> Box>>; + fn repos_upstream_dart_create(&self, owner: &str, identifier: &str, data: ::models::DartUpstreamRequest) -> Box>>; + fn repos_upstream_dart_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_dart_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_dart_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DartUpstreamRequestPatch) -> Box>>; + fn repos_upstream_dart_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_dart_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DartUpstreamRequest) -> Box>>; + fn repos_upstream_deb_create(&self, owner: &str, identifier: &str, data: ::models::DebUpstreamRequest) -> Box>>; + fn repos_upstream_deb_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_deb_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_deb_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DebUpstreamRequestPatch) -> Box>>; + fn repos_upstream_deb_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_deb_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DebUpstreamRequest) -> Box>>; + fn repos_upstream_docker_create(&self, owner: &str, identifier: &str, data: ::models::DockerUpstreamRequest) -> Box>>; + fn repos_upstream_docker_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_docker_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_docker_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DockerUpstreamRequestPatch) -> Box>>; + fn repos_upstream_docker_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_docker_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DockerUpstreamRequest) -> Box>>; + fn repos_upstream_helm_create(&self, owner: &str, identifier: &str, data: ::models::HelmUpstreamRequest) -> Box>>; + fn repos_upstream_helm_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_helm_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_helm_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HelmUpstreamRequestPatch) -> Box>>; + fn repos_upstream_helm_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_helm_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HelmUpstreamRequest) -> Box>>; + fn repos_upstream_hex_create(&self, owner: &str, identifier: &str, data: ::models::HexUpstreamRequest) -> Box>>; + fn repos_upstream_hex_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_hex_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_hex_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HexUpstreamRequestPatch) -> Box>>; + fn repos_upstream_hex_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_hex_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HexUpstreamRequest) -> Box>>; + fn repos_upstream_maven_create(&self, owner: &str, identifier: &str, data: ::models::MavenUpstreamRequest) -> Box>>; + fn repos_upstream_maven_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_maven_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_maven_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::MavenUpstreamRequestPatch) -> Box>>; + fn repos_upstream_maven_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_maven_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::MavenUpstreamRequest) -> Box>>; + fn repos_upstream_npm_create(&self, owner: &str, identifier: &str, data: ::models::NpmUpstreamRequest) -> Box>>; + fn repos_upstream_npm_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_npm_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_npm_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NpmUpstreamRequestPatch) -> Box>>; + fn repos_upstream_npm_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_npm_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NpmUpstreamRequest) -> Box>>; + fn repos_upstream_nuget_create(&self, owner: &str, identifier: &str, data: ::models::NugetUpstreamRequest) -> Box>>; + fn repos_upstream_nuget_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_nuget_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_nuget_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NugetUpstreamRequestPatch) -> Box>>; + fn repos_upstream_nuget_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_nuget_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NugetUpstreamRequest) -> Box>>; + fn repos_upstream_python_create(&self, owner: &str, identifier: &str, data: ::models::PythonUpstreamRequest) -> Box>>; + fn repos_upstream_python_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_python_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_python_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::PythonUpstreamRequestPatch) -> Box>>; + fn repos_upstream_python_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_python_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::PythonUpstreamRequest) -> Box>>; + fn repos_upstream_rpm_create(&self, owner: &str, identifier: &str, data: ::models::RpmUpstreamRequest) -> Box>>; + fn repos_upstream_rpm_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_rpm_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_rpm_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RpmUpstreamRequestPatch) -> Box>>; + fn repos_upstream_rpm_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_rpm_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RpmUpstreamRequest) -> Box>>; + fn repos_upstream_ruby_create(&self, owner: &str, identifier: &str, data: ::models::RubyUpstreamRequest) -> Box>>; + fn repos_upstream_ruby_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_ruby_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_ruby_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RubyUpstreamRequestPatch) -> Box>>; + fn repos_upstream_ruby_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_ruby_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RubyUpstreamRequest) -> Box>>; + fn repos_upstream_swift_create(&self, owner: &str, identifier: &str, data: ::models::SwiftUpstreamRequest) -> Box>>; + fn repos_upstream_swift_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_swift_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_upstream_swift_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::SwiftUpstreamRequestPatch) -> Box>>; + fn repos_upstream_swift_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>>; + fn repos_upstream_swift_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::SwiftUpstreamRequest) -> Box>>; + fn repos_user_list(&self, page: i32, page_size: i32) -> Box, Error = Error>>; + fn repos_x509_ecdsa_list(&self, owner: &str, identifier: &str) -> Box>>; + fn repos_x509_rsa_list(&self, owner: &str, identifier: &str) -> Box>>; +} + + +implReposApi for ReposApiClient { + fn api_repos_geoip_status(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip/status/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGeoIpStatus, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repo_retention_partial_update(&self, owner: &str, repo: &str, data: ::models::RepositoryRetentionRulesRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{repo}/retention/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryRetentionRules, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repo_retention_read(&self, owner: &str, repo: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{repo}/retention/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryRetentionRules, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_create(&self, owner: &str, data: ::models::RepositoryCreateRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryCreate, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_delete(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_ecdsa_create(&self, owner: &str, identifier: &str, data: ::models::RepositoryEcdsaKeyCreate) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/ecdsa/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryEcdsaKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_ecdsa_list(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/ecdsa/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryEcdsaKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_ecdsa_regenerate(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/ecdsa/regenerate/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryEcdsaKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_geoip_disable(&self, owner: &str, identifier: &str, data: ::models::RespositoryGeoIpEnableDisableRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip/disable/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_geoip_enable(&self, owner: &str, identifier: &str, data: ::models::RespositoryGeoIpEnableDisableRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip/enable/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_geoip_partial_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryGeoIpRulesRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGeoIpRules, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_geoip_read(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGeoIpRules, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_geoip_test(&self, owner: &str, identifier: &str, data: ::models::RepositoryGeoIpTestAddress) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip/test/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGeoIpTestAddressResponse, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_geoip_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryGeoIpRulesRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/geoip?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGeoIpRules, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_gpg_create(&self, owner: &str, identifier: &str, data: ::models::RepositoryGpgKeyCreate) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/gpg/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGpgKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_gpg_list(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/gpg/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGpgKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_gpg_regenerate(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/gpg/regenerate/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryGpgKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_namespace_list(&self, owner: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_partial_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Repository, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_privileges_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/privileges?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryPrivilegeInput, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_privileges_partial_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryPrivilegeInputRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/privileges?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_privileges_update(&self, owner: &str, identifier: &str, data: ::models::RepositoryPrivilegeInputRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/privileges?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_read(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::Repository, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_rsa_create(&self, owner: &str, identifier: &str, data: ::models::RepositoryRsaKeyCreate) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/rsa/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryRsaKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_rsa_list(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/rsa/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryRsaKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_rsa_regenerate(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/rsa/regenerate/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryRsaKey, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_transfer_region(&self, owner: &str, repo: &str, data: ::models::RepositoryTransferRegionRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{repo}/transfer-region/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_composer_create(&self, owner: &str, identifier: &str, data: ::models::ComposerUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/composer/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ComposerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_composer_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/composer/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_composer_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/composer/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_composer_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::ComposerUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/composer/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ComposerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_composer_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/composer/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ComposerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_composer_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::ComposerUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/composer/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::ComposerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_cran_create(&self, owner: &str, identifier: &str, data: ::models::CranUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/cran/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CranUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_cran_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/cran/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_cran_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/cran/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_cran_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::CranUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/cran/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CranUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_cran_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/cran/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CranUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_cran_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::CranUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/cran/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::CranUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_dart_create(&self, owner: &str, identifier: &str, data: ::models::DartUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/dart/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DartUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_dart_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/dart/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_dart_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/dart/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_dart_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DartUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/dart/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DartUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_dart_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/dart/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DartUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_dart_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DartUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/dart/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DartUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_deb_create(&self, owner: &str, identifier: &str, data: ::models::DebUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/deb/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DebUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_deb_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/deb/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_deb_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/deb/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_deb_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DebUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/deb/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DebUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_deb_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/deb/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DebUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_deb_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DebUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/deb/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DebUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_docker_create(&self, owner: &str, identifier: &str, data: ::models::DockerUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/docker/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DockerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_docker_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/docker/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_docker_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/docker/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_docker_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DockerUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/docker/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DockerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_docker_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/docker/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DockerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_docker_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::DockerUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/docker/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::DockerUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_helm_create(&self, owner: &str, identifier: &str, data: ::models::HelmUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/helm/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HelmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_helm_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/helm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_helm_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/helm/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_helm_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HelmUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/helm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HelmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_helm_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/helm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HelmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_helm_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HelmUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/helm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HelmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_hex_create(&self, owner: &str, identifier: &str, data: ::models::HexUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/hex/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HexUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_hex_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/hex/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_hex_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/hex/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_hex_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HexUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/hex/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HexUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_hex_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/hex/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HexUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_hex_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::HexUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/hex/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::HexUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_maven_create(&self, owner: &str, identifier: &str, data: ::models::MavenUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/maven/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::MavenUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_maven_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/maven/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_maven_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/maven/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_maven_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::MavenUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/maven/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::MavenUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_maven_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/maven/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::MavenUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_maven_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::MavenUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/maven/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::MavenUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_npm_create(&self, owner: &str, identifier: &str, data: ::models::NpmUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/npm/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_npm_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/npm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_npm_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/npm/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_npm_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NpmUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/npm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_npm_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/npm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_npm_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NpmUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/npm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_nuget_create(&self, owner: &str, identifier: &str, data: ::models::NugetUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/nuget/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NugetUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_nuget_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_nuget_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/nuget/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_nuget_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NugetUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NugetUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_nuget_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NugetUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_nuget_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::NugetUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/nuget/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::NugetUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_python_create(&self, owner: &str, identifier: &str, data: ::models::PythonUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/python/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PythonUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_python_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/python/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_python_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/python/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_python_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::PythonUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/python/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PythonUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_python_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/python/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PythonUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_python_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::PythonUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/python/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::PythonUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_rpm_create(&self, owner: &str, identifier: &str, data: ::models::RpmUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/rpm/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_rpm_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_rpm_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/rpm/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_rpm_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RpmUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_rpm_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_rpm_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RpmUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/rpm/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RpmUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_ruby_create(&self, owner: &str, identifier: &str, data: ::models::RubyUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/ruby/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RubyUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_ruby_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_ruby_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/ruby/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_ruby_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RubyUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RubyUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_ruby_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RubyUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_ruby_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::RubyUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/ruby/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RubyUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_swift_create(&self, owner: &str, identifier: &str, data: ::models::SwiftUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/swift/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::SwiftUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_swift_delete(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/swift/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn repos_upstream_swift_list(&self, owner: &str, identifier: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/swift/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_swift_partial_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::SwiftUpstreamRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/swift/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::SwiftUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_swift_read(&self, owner: &str, identifier: &str, slug_perm: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/swift/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::SwiftUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_upstream_swift_update(&self, owner: &str, identifier: &str, slug_perm: &str, data: ::models::SwiftUpstreamRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Put; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/upstream/swift/{slug_perm}/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier, slug_perm=slug_perm); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::SwiftUpstream, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_user_list(&self, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_x509_ecdsa_list(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/x509-ecdsa/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryX509EcdsaCertificate, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn repos_x509_rsa_list(&self, owner: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/repos/{owner}/{identifier}/x509-rsa/?{}", configuration.base_path, query_string, owner=owner, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryX509RsaCertificate, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/status_api.rs b/bindings/rust/src/src/apis/status_api.rs new file mode 100644 index 00000000..2ea8d1ca --- /dev/null +++ b/bindings/rust/src/src/apis/status_api.rs @@ -0,0 +1,93 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct StatusApiClient { + configuration: Rc>, +} + +impl StatusApiClient { + pub fn new(configuration: Rc>) -> StatusApiClient { + StatusApiClient { + configuration: configuration, + } + } +} + +pub trait StatusApi { + fn status_check_basic(&self, ) -> Box>>; +} + + +implStatusApi for StatusApiClient { + fn status_check_basic(&self, ) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.finish() + }; + let uri_str = format!("{}/status/check/basic/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::StatusBasic, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/storage_regions_api.rs b/bindings/rust/src/src/apis/storage_regions_api.rs new file mode 100644 index 00000000..894b6436 --- /dev/null +++ b/bindings/rust/src/src/apis/storage_regions_api.rs @@ -0,0 +1,194 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct StorageRegionsApiClient { + configuration: Rc>, +} + +impl StorageRegionsApiClient { + pub fn new(configuration: Rc>) -> StorageRegionsApiClient { + StorageRegionsApiClient { + configuration: configuration, + } + } +} + +pub trait StorageRegionsApi { + fn storage_regions_list(&self, ) -> Box, Error = Error>>; + fn storage_regions_read(&self, slug: &str) -> Box>>; +} + + +implStorageRegionsApi for StorageRegionsApiClient { + fn storage_regions_list(&self, ) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/storage-regions/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn storage_regions_read(&self, slug: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/storage-regions/{slug}/?{}", configuration.base_path, query_string, slug=slug); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::StorageRegion, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/user_api.rs b/bindings/rust/src/src/apis/user_api.rs new file mode 100644 index 00000000..75a97663 --- /dev/null +++ b/bindings/rust/src/src/apis/user_api.rs @@ -0,0 +1,190 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct UserApiClient { + configuration: Rc>, +} + +impl UserApiClient { + pub fn new(configuration: Rc>) -> UserApiClient { + UserApiClient { + configuration: configuration, + } + } +} + +pub trait UserApi { + fn user_self(&self, ) -> Box>>; + fn user_token_create(&self, data: ::models::UserAuthTokenRequest) -> Box>>; +} + + +implUserApi for UserApiClient { + fn user_self(&self, ) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/user/self/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::UserBrief, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn user_token_create(&self, data: ::models::UserAuthTokenRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/user/token/?{}", configuration.base_path, query_string); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::UserAuthToken, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/users_api.rs b/bindings/rust/src/src/apis/users_api.rs new file mode 100644 index 00000000..cadeb977 --- /dev/null +++ b/bindings/rust/src/src/apis/users_api.rs @@ -0,0 +1,118 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct UsersApiClient { + configuration: Rc>, +} + +impl UsersApiClient { + pub fn new(configuration: Rc>) -> UsersApiClient { + UsersApiClient { + configuration: configuration, + } + } +} + +pub trait UsersApi { + fn users_profile_read(&self, slug: &str) -> Box>>; +} + + +implUsersApi for UsersApiClient { + fn users_profile_read(&self, slug: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/users/profile/{slug}/?{}", configuration.base_path, query_string, slug=slug); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::UserProfile, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/vulnerabilities_api.rs b/bindings/rust/src/src/apis/vulnerabilities_api.rs new file mode 100644 index 00000000..ec2b6d48 --- /dev/null +++ b/bindings/rust/src/src/apis/vulnerabilities_api.rs @@ -0,0 +1,352 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct VulnerabilitiesApiClient { + configuration: Rc>, +} + +impl VulnerabilitiesApiClient { + pub fn new(configuration: Rc>) -> VulnerabilitiesApiClient { + VulnerabilitiesApiClient { + configuration: configuration, + } + } +} + +pub trait VulnerabilitiesApi { + fn vulnerabilities_namespace_list(&self, owner: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn vulnerabilities_package_list(&self, owner: &str, repo: &str, package: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn vulnerabilities_read(&self, owner: &str, repo: &str, package: &str, identifier: &str) -> Box>>; + fn vulnerabilities_repo_list(&self, owner: &str, repo: &str, page: i32, page_size: i32) -> Box, Error = Error>>; +} + + +implVulnerabilitiesApi for VulnerabilitiesApiClient { + fn vulnerabilities_namespace_list(&self, owner: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/vulnerabilities/{owner}/?{}", configuration.base_path, query_string, owner=owner); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn vulnerabilities_package_list(&self, owner: &str, repo: &str, package: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/vulnerabilities/{owner}/{repo}/{package}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, package=package); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn vulnerabilities_read(&self, owner: &str, repo: &str, package: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/vulnerabilities/{owner}/{repo}/{package}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, package=package, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::VulnerabilityScanResults, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn vulnerabilities_repo_list(&self, owner: &str, repo: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/vulnerabilities/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/apis/webhooks_api.rs b/bindings/rust/src/src/apis/webhooks_api.rs new file mode 100644 index 00000000..9c374c0e --- /dev/null +++ b/bindings/rust/src/src/apis/webhooks_api.rs @@ -0,0 +1,429 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct WebhooksApiClient { + configuration: Rc>, +} + +impl WebhooksApiClient { + pub fn new(configuration: Rc>) -> WebhooksApiClient { + WebhooksApiClient { + configuration: configuration, + } + } +} + +pub trait WebhooksApi { + fn webhooks_create(&self, owner: &str, repo: &str, data: ::models::RepositoryWebhookRequest) -> Box>>; + fn webhooks_delete(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; + fn webhooks_list(&self, owner: &str, repo: &str, page: i32, page_size: i32) -> Box, Error = Error>>; + fn webhooks_partial_update(&self, owner: &str, repo: &str, identifier: &str, data: ::models::RepositoryWebhookRequestPatch) -> Box>>; + fn webhooks_read(&self, owner: &str, repo: &str, identifier: &str) -> Box>>; +} + + +implWebhooksApi for WebhooksApiClient { + fn webhooks_create(&self, owner: &str, repo: &str, data: ::models::RepositoryWebhookRequest) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Post; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/webhooks/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryWebhook, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn webhooks_delete(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Delete; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/webhooks/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|_| futures::future::ok(())) + ) + } + + fn webhooks_list(&self, owner: &str, repo: &str, page: i32, page_size: i32) -> Box, Error = Error>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + url_query_param.append_pair("page", &page.to_string()); + url_query_param.append_pair("page_size", &page_size.to_string()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/webhooks/{owner}/{repo}/?{}", configuration.base_path, query_string, owner=owner, repo=repo); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn webhooks_partial_update(&self, owner: &str, repo: &str, identifier: &str, data: ::models::RepositoryWebhookRequestPatch) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Patch; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/webhooks/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + let serialized = serde_json::to_string(&data).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryWebhook, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + + fn webhooks_read(&self, owner: &str, repo: &str, identifier: &str) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + auth_headers.insert("X-Api-Key".to_owned(), val); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; + let method = hyper::Method::Get; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } + url_query_param.finish() + }; + let uri_str = format!("{}/webhooks/{owner}/{repo}/{identifier}/?{}", configuration.base_path, query_string, owner=owner, repo=repo, identifier=identifier); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + .and_then(|body| { + let parsed: Result<::models::RepositoryWebhook, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + ) + } + +} \ No newline at end of file diff --git a/bindings/rust/src/src/lib.rs b/bindings/rust/src/src/lib.rs new file mode 100644 index 00000000..b51fea81 --- /dev/null +++ b/bindings/rust/src/src/lib.rs @@ -0,0 +1,11 @@ +#[macro_use] +extern crate serde_derive; + +extern crate hyper; +extern crate serde; +extern crate serde_json; +extern crate futures; +extern crate url; + +pub mod apis; +pub mod models; diff --git a/bindings/rust/src/src/models/allocated_limit.rs b/bindings/rust/src/src/models/allocated_limit.rs new file mode 100644 index 00000000..03c2a239 --- /dev/null +++ b/bindings/rust/src/src/models/allocated_limit.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct AllocatedLimit { + #[serde(rename = "configured")] + configured: Option, + #[serde(rename = "percentage_used")] + percentage_used: Option, + #[serde(rename = "plan_limit")] + plan_limit: Option, + #[serde(rename = "used")] + used: Option +} + +impl AllocatedLimit { + pub fn new() -> AllocatedLimit { + AllocatedLimit { + configured: None, + percentage_used: None, + plan_limit: None, + used: None + } + } + + pub fn set_configured(&mut self, configured: String) { + self.configured = Some(configured); + } + + pub fn with_configured(mut self, configured: String) -> AllocatedLimit { + self.configured = Some(configured); + self + } + + pub fn configured(&self) -> Option<&String> { + self.configured.as_ref() + } + + pub fn reset_configured(&mut self) { + self.configured = None; + } + + pub fn set_percentage_used(&mut self, percentage_used: String) { + self.percentage_used = Some(percentage_used); + } + + pub fn with_percentage_used(mut self, percentage_used: String) -> AllocatedLimit { + self.percentage_used = Some(percentage_used); + self + } + + pub fn percentage_used(&self) -> Option<&String> { + self.percentage_used.as_ref() + } + + pub fn reset_percentage_used(&mut self) { + self.percentage_used = None; + } + + pub fn set_plan_limit(&mut self, plan_limit: String) { + self.plan_limit = Some(plan_limit); + } + + pub fn with_plan_limit(mut self, plan_limit: String) -> AllocatedLimit { + self.plan_limit = Some(plan_limit); + self + } + + pub fn plan_limit(&self) -> Option<&String> { + self.plan_limit.as_ref() + } + + pub fn reset_plan_limit(&mut self) { + self.plan_limit = None; + } + + pub fn set_used(&mut self, used: String) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: String) -> AllocatedLimit { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&String> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/allocated_limit_raw.rs b/bindings/rust/src/src/models/allocated_limit_raw.rs new file mode 100644 index 00000000..cf8183cf --- /dev/null +++ b/bindings/rust/src/src/models/allocated_limit_raw.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct AllocatedLimitRaw { + #[serde(rename = "configured")] + configured: Option, + #[serde(rename = "percentage_used")] + percentage_used: Option, + #[serde(rename = "plan_limit")] + plan_limit: Option, + #[serde(rename = "used")] + used: Option +} + +impl AllocatedLimitRaw { + pub fn new() -> AllocatedLimitRaw { + AllocatedLimitRaw { + configured: None, + percentage_used: None, + plan_limit: None, + used: None + } + } + + pub fn set_configured(&mut self, configured: i32) { + self.configured = Some(configured); + } + + pub fn with_configured(mut self, configured: i32) -> AllocatedLimitRaw { + self.configured = Some(configured); + self + } + + pub fn configured(&self) -> Option<&i32> { + self.configured.as_ref() + } + + pub fn reset_configured(&mut self) { + self.configured = None; + } + + pub fn set_percentage_used(&mut self, percentage_used: String) { + self.percentage_used = Some(percentage_used); + } + + pub fn with_percentage_used(mut self, percentage_used: String) -> AllocatedLimitRaw { + self.percentage_used = Some(percentage_used); + self + } + + pub fn percentage_used(&self) -> Option<&String> { + self.percentage_used.as_ref() + } + + pub fn reset_percentage_used(&mut self) { + self.percentage_used = None; + } + + pub fn set_plan_limit(&mut self, plan_limit: i32) { + self.plan_limit = Some(plan_limit); + } + + pub fn with_plan_limit(mut self, plan_limit: i32) -> AllocatedLimitRaw { + self.plan_limit = Some(plan_limit); + self + } + + pub fn plan_limit(&self) -> Option<&i32> { + self.plan_limit.as_ref() + } + + pub fn reset_plan_limit(&mut self) { + self.plan_limit = None; + } + + pub fn set_used(&mut self, used: i32) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: i32) -> AllocatedLimitRaw { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&i32> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/alpine_package_upload.rs b/bindings/rust/src/src/models/alpine_package_upload.rs new file mode 100644 index 00000000..1b02132b --- /dev/null +++ b/bindings/rust/src/src/models/alpine_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct AlpinePackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl AlpinePackageUpload { + pub fn new() -> AlpinePackageUpload { + AlpinePackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> AlpinePackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> AlpinePackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> AlpinePackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> AlpinePackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> AlpinePackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> AlpinePackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> AlpinePackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> AlpinePackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> AlpinePackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> AlpinePackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> AlpinePackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> AlpinePackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> AlpinePackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> AlpinePackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> AlpinePackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> AlpinePackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> AlpinePackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> AlpinePackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> AlpinePackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> AlpinePackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> AlpinePackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> AlpinePackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> AlpinePackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> AlpinePackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> AlpinePackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> AlpinePackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> AlpinePackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> AlpinePackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> AlpinePackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> AlpinePackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> AlpinePackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> AlpinePackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> AlpinePackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> AlpinePackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> AlpinePackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> AlpinePackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> AlpinePackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> AlpinePackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> AlpinePackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> AlpinePackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> AlpinePackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> AlpinePackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> AlpinePackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> AlpinePackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> AlpinePackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> AlpinePackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> AlpinePackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> AlpinePackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> AlpinePackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> AlpinePackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> AlpinePackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> AlpinePackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> AlpinePackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> AlpinePackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> AlpinePackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> AlpinePackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> AlpinePackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> AlpinePackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> AlpinePackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> AlpinePackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> AlpinePackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> AlpinePackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> AlpinePackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> AlpinePackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> AlpinePackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> AlpinePackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> AlpinePackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> AlpinePackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> AlpinePackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> AlpinePackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> AlpinePackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> AlpinePackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> AlpinePackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> AlpinePackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> AlpinePackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> AlpinePackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> AlpinePackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> AlpinePackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> AlpinePackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> AlpinePackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/alpine_package_upload_request.rs b/bindings/rust/src/src/models/alpine_package_upload_request.rs new file mode 100644 index 00000000..fda8b014 --- /dev/null +++ b/bindings/rust/src/src/models/alpine_package_upload_request.rs @@ -0,0 +1,106 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct AlpinePackageUploadRequest { + /// The distribution to store the package for. + #[serde(rename = "distribution")] + distribution: String, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl AlpinePackageUploadRequest { + pub fn new(distribution: String, package_file: String) -> AlpinePackageUploadRequest { + AlpinePackageUploadRequest { + distribution: distribution, + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_distribution(&mut self, distribution: String) { + self.distribution = distribution; + } + + pub fn with_distribution(mut self, distribution: String) -> AlpinePackageUploadRequest { + self.distribution = distribution; + self + } + + pub fn distribution(&self) -> &String { + &self.distribution + } + + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> AlpinePackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> AlpinePackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> AlpinePackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/architecture.rs b/bindings/rust/src/src/models/architecture.rs new file mode 100644 index 00000000..ef0f7524 --- /dev/null +++ b/bindings/rust/src/src/models/architecture.rs @@ -0,0 +1,65 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Architecture { + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: String +} + +impl Architecture { + pub fn new(name: String) -> Architecture { + Architecture { + description: None, + name: name + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> Architecture { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> Architecture { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + +} + + + diff --git a/bindings/rust/src/src/models/cargo_package_upload.rs b/bindings/rust/src/src/models/cargo_package_upload.rs new file mode 100644 index 00000000..6ac29be5 --- /dev/null +++ b/bindings/rust/src/src/models/cargo_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CargoPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl CargoPackageUpload { + pub fn new() -> CargoPackageUpload { + CargoPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> CargoPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> CargoPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> CargoPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> CargoPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> CargoPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> CargoPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> CargoPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> CargoPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> CargoPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> CargoPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> CargoPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> CargoPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> CargoPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> CargoPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> CargoPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> CargoPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> CargoPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> CargoPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> CargoPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> CargoPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> CargoPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> CargoPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> CargoPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> CargoPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> CargoPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> CargoPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> CargoPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> CargoPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> CargoPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> CargoPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> CargoPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> CargoPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> CargoPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> CargoPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> CargoPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> CargoPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> CargoPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> CargoPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> CargoPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> CargoPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> CargoPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> CargoPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> CargoPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> CargoPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> CargoPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> CargoPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> CargoPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> CargoPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> CargoPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> CargoPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> CargoPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> CargoPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> CargoPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> CargoPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> CargoPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> CargoPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> CargoPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> CargoPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> CargoPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> CargoPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> CargoPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> CargoPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> CargoPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> CargoPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> CargoPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> CargoPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> CargoPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> CargoPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> CargoPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> CargoPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> CargoPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> CargoPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> CargoPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> CargoPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> CargoPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> CargoPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> CargoPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> CargoPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> CargoPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> CargoPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cargo_package_upload_request.rs b/bindings/rust/src/src/models/cargo_package_upload_request.rs new file mode 100644 index 00000000..d42a6a27 --- /dev/null +++ b/bindings/rust/src/src/models/cargo_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CargoPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl CargoPackageUploadRequest { + pub fn new(package_file: String) -> CargoPackageUploadRequest { + CargoPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> CargoPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> CargoPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> CargoPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cocoapods_package_upload.rs b/bindings/rust/src/src/models/cocoapods_package_upload.rs new file mode 100644 index 00000000..62da6f4e --- /dev/null +++ b/bindings/rust/src/src/models/cocoapods_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CocoapodsPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl CocoapodsPackageUpload { + pub fn new() -> CocoapodsPackageUpload { + CocoapodsPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> CocoapodsPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> CocoapodsPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> CocoapodsPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> CocoapodsPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> CocoapodsPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> CocoapodsPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> CocoapodsPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> CocoapodsPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> CocoapodsPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> CocoapodsPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> CocoapodsPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> CocoapodsPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> CocoapodsPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> CocoapodsPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> CocoapodsPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> CocoapodsPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> CocoapodsPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> CocoapodsPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> CocoapodsPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> CocoapodsPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> CocoapodsPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> CocoapodsPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> CocoapodsPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> CocoapodsPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> CocoapodsPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> CocoapodsPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> CocoapodsPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> CocoapodsPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> CocoapodsPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> CocoapodsPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> CocoapodsPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> CocoapodsPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> CocoapodsPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> CocoapodsPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> CocoapodsPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> CocoapodsPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> CocoapodsPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> CocoapodsPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> CocoapodsPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> CocoapodsPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> CocoapodsPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> CocoapodsPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> CocoapodsPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> CocoapodsPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> CocoapodsPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> CocoapodsPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> CocoapodsPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> CocoapodsPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> CocoapodsPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> CocoapodsPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> CocoapodsPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> CocoapodsPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> CocoapodsPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> CocoapodsPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> CocoapodsPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> CocoapodsPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> CocoapodsPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> CocoapodsPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> CocoapodsPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> CocoapodsPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> CocoapodsPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> CocoapodsPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> CocoapodsPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> CocoapodsPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> CocoapodsPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> CocoapodsPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> CocoapodsPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> CocoapodsPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> CocoapodsPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> CocoapodsPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> CocoapodsPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> CocoapodsPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> CocoapodsPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> CocoapodsPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> CocoapodsPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> CocoapodsPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> CocoapodsPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> CocoapodsPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> CocoapodsPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> CocoapodsPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cocoapods_package_upload_request.rs b/bindings/rust/src/src/models/cocoapods_package_upload_request.rs new file mode 100644 index 00000000..3ab3e5e1 --- /dev/null +++ b/bindings/rust/src/src/models/cocoapods_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CocoapodsPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl CocoapodsPackageUploadRequest { + pub fn new(package_file: String) -> CocoapodsPackageUploadRequest { + CocoapodsPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> CocoapodsPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> CocoapodsPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> CocoapodsPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/common_bandwidth_metrics.rs b/bindings/rust/src/src/models/common_bandwidth_metrics.rs new file mode 100644 index 00000000..55b12bce --- /dev/null +++ b/bindings/rust/src/src/models/common_bandwidth_metrics.rs @@ -0,0 +1,96 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CommonBandwidthMetrics { + #[serde(rename = "average")] + average: ::models::CommonBandwidthMetricsValue, + #[serde(rename = "highest")] + highest: ::models::CommonBandwidthMetricsValue, + #[serde(rename = "lowest")] + lowest: ::models::CommonBandwidthMetricsValue, + #[serde(rename = "total")] + total: ::models::CommonBandwidthMetricsValue +} + +impl CommonBandwidthMetrics { + pub fn new(average: ::models::CommonBandwidthMetricsValue, highest: ::models::CommonBandwidthMetricsValue, lowest: ::models::CommonBandwidthMetricsValue, total: ::models::CommonBandwidthMetricsValue) -> CommonBandwidthMetrics { + CommonBandwidthMetrics { + average: average, + highest: highest, + lowest: lowest, + total: total + } + } + + pub fn set_average(&mut self, average: ::models::CommonBandwidthMetricsValue) { + self.average = average; + } + + pub fn with_average(mut self, average: ::models::CommonBandwidthMetricsValue) -> CommonBandwidthMetrics { + self.average = average; + self + } + + pub fn average(&self) -> &::models::CommonBandwidthMetricsValue { + &self.average + } + + + pub fn set_highest(&mut self, highest: ::models::CommonBandwidthMetricsValue) { + self.highest = highest; + } + + pub fn with_highest(mut self, highest: ::models::CommonBandwidthMetricsValue) -> CommonBandwidthMetrics { + self.highest = highest; + self + } + + pub fn highest(&self) -> &::models::CommonBandwidthMetricsValue { + &self.highest + } + + + pub fn set_lowest(&mut self, lowest: ::models::CommonBandwidthMetricsValue) { + self.lowest = lowest; + } + + pub fn with_lowest(mut self, lowest: ::models::CommonBandwidthMetricsValue) -> CommonBandwidthMetrics { + self.lowest = lowest; + self + } + + pub fn lowest(&self) -> &::models::CommonBandwidthMetricsValue { + &self.lowest + } + + + pub fn set_total(&mut self, total: ::models::CommonBandwidthMetricsValue) { + self.total = total; + } + + pub fn with_total(mut self, total: ::models::CommonBandwidthMetricsValue) -> CommonBandwidthMetrics { + self.total = total; + self + } + + pub fn total(&self) -> &::models::CommonBandwidthMetricsValue { + &self.total + } + + +} + + + diff --git a/bindings/rust/src/src/models/common_bandwidth_metrics_value.rs b/bindings/rust/src/src/models/common_bandwidth_metrics_value.rs new file mode 100644 index 00000000..28c0694d --- /dev/null +++ b/bindings/rust/src/src/models/common_bandwidth_metrics_value.rs @@ -0,0 +1,87 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// CommonBandwidthMetricsValue : Average bandwidth usage in the specified period, e.g. a day + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CommonBandwidthMetricsValue { + /// Bandwidth usage value + #[serde(rename = "display")] + display: String, + /// Unit of measurement e.g. bytes + #[serde(rename = "units")] + units: Option, + /// Human readable version of display value + #[serde(rename = "value")] + value: i32 +} + +impl CommonBandwidthMetricsValue { + /// Average bandwidth usage in the specified period, e.g. a day + pub fn new(display: String, value: i32) -> CommonBandwidthMetricsValue { + CommonBandwidthMetricsValue { + display: display, + units: None, + value: value + } + } + + pub fn set_display(&mut self, display: String) { + self.display = display; + } + + pub fn with_display(mut self, display: String) -> CommonBandwidthMetricsValue { + self.display = display; + self + } + + pub fn display(&self) -> &String { + &self.display + } + + + pub fn set_units(&mut self, units: String) { + self.units = Some(units); + } + + pub fn with_units(mut self, units: String) -> CommonBandwidthMetricsValue { + self.units = Some(units); + self + } + + pub fn units(&self) -> Option<&String> { + self.units.as_ref() + } + + pub fn reset_units(&mut self) { + self.units = None; + } + + pub fn set_value(&mut self, value: i32) { + self.value = value; + } + + pub fn with_value(mut self, value: i32) -> CommonBandwidthMetricsValue { + self.value = value; + self + } + + pub fn value(&self) -> &i32 { + &self.value + } + + +} + + + diff --git a/bindings/rust/src/src/models/common_downloads_metrics.rs b/bindings/rust/src/src/models/common_downloads_metrics.rs new file mode 100644 index 00000000..2a0391c9 --- /dev/null +++ b/bindings/rust/src/src/models/common_downloads_metrics.rs @@ -0,0 +1,96 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CommonDownloadsMetrics { + #[serde(rename = "average")] + average: ::models::CommonDownloadsMetricsValue, + #[serde(rename = "highest")] + highest: ::models::CommonDownloadsMetricsValue, + #[serde(rename = "lowest")] + lowest: ::models::CommonDownloadsMetricsValue, + #[serde(rename = "total")] + total: ::models::CommonDownloadsMetricsValue +} + +impl CommonDownloadsMetrics { + pub fn new(average: ::models::CommonDownloadsMetricsValue, highest: ::models::CommonDownloadsMetricsValue, lowest: ::models::CommonDownloadsMetricsValue, total: ::models::CommonDownloadsMetricsValue) -> CommonDownloadsMetrics { + CommonDownloadsMetrics { + average: average, + highest: highest, + lowest: lowest, + total: total + } + } + + pub fn set_average(&mut self, average: ::models::CommonDownloadsMetricsValue) { + self.average = average; + } + + pub fn with_average(mut self, average: ::models::CommonDownloadsMetricsValue) -> CommonDownloadsMetrics { + self.average = average; + self + } + + pub fn average(&self) -> &::models::CommonDownloadsMetricsValue { + &self.average + } + + + pub fn set_highest(&mut self, highest: ::models::CommonDownloadsMetricsValue) { + self.highest = highest; + } + + pub fn with_highest(mut self, highest: ::models::CommonDownloadsMetricsValue) -> CommonDownloadsMetrics { + self.highest = highest; + self + } + + pub fn highest(&self) -> &::models::CommonDownloadsMetricsValue { + &self.highest + } + + + pub fn set_lowest(&mut self, lowest: ::models::CommonDownloadsMetricsValue) { + self.lowest = lowest; + } + + pub fn with_lowest(mut self, lowest: ::models::CommonDownloadsMetricsValue) -> CommonDownloadsMetrics { + self.lowest = lowest; + self + } + + pub fn lowest(&self) -> &::models::CommonDownloadsMetricsValue { + &self.lowest + } + + + pub fn set_total(&mut self, total: ::models::CommonDownloadsMetricsValue) { + self.total = total; + } + + pub fn with_total(mut self, total: ::models::CommonDownloadsMetricsValue) -> CommonDownloadsMetrics { + self.total = total; + self + } + + pub fn total(&self) -> &::models::CommonDownloadsMetricsValue { + &self.total + } + + +} + + + diff --git a/bindings/rust/src/src/models/common_downloads_metrics_value.rs b/bindings/rust/src/src/models/common_downloads_metrics_value.rs new file mode 100644 index 00000000..58d07b7f --- /dev/null +++ b/bindings/rust/src/src/models/common_downloads_metrics_value.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CommonDownloadsMetricsValue { + #[serde(rename = "value")] + value: i32 +} + +impl CommonDownloadsMetricsValue { + pub fn new(value: i32) -> CommonDownloadsMetricsValue { + CommonDownloadsMetricsValue { + value: value + } + } + + pub fn set_value(&mut self, value: i32) { + self.value = value; + } + + pub fn with_value(mut self, value: i32) -> CommonDownloadsMetricsValue { + self.value = value; + self + } + + pub fn value(&self) -> &i32 { + &self.value + } + + +} + + + diff --git a/bindings/rust/src/src/models/common_metrics.rs b/bindings/rust/src/src/models/common_metrics.rs new file mode 100644 index 00000000..67255c2a --- /dev/null +++ b/bindings/rust/src/src/models/common_metrics.rs @@ -0,0 +1,125 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CommonMetrics { + /// Number of packages with at least 1 download + #[serde(rename = "active")] + active: Option, + #[serde(rename = "bandwidth")] + bandwidth: ::models::CommonBandwidthMetrics, + #[serde(rename = "downloads")] + downloads: ::models::CommonDownloadsMetrics, + /// Packages with zero downloads + #[serde(rename = "inactive")] + inactive: Option, + /// Total number of packages in repo + #[serde(rename = "total")] + total: Option +} + +impl CommonMetrics { + pub fn new(bandwidth: ::models::CommonBandwidthMetrics, downloads: ::models::CommonDownloadsMetrics) -> CommonMetrics { + CommonMetrics { + active: None, + bandwidth: bandwidth, + downloads: downloads, + inactive: None, + total: None + } + } + + pub fn set_active(&mut self, active: i32) { + self.active = Some(active); + } + + pub fn with_active(mut self, active: i32) -> CommonMetrics { + self.active = Some(active); + self + } + + pub fn active(&self) -> Option<&i32> { + self.active.as_ref() + } + + pub fn reset_active(&mut self) { + self.active = None; + } + + pub fn set_bandwidth(&mut self, bandwidth: ::models::CommonBandwidthMetrics) { + self.bandwidth = bandwidth; + } + + pub fn with_bandwidth(mut self, bandwidth: ::models::CommonBandwidthMetrics) -> CommonMetrics { + self.bandwidth = bandwidth; + self + } + + pub fn bandwidth(&self) -> &::models::CommonBandwidthMetrics { + &self.bandwidth + } + + + pub fn set_downloads(&mut self, downloads: ::models::CommonDownloadsMetrics) { + self.downloads = downloads; + } + + pub fn with_downloads(mut self, downloads: ::models::CommonDownloadsMetrics) -> CommonMetrics { + self.downloads = downloads; + self + } + + pub fn downloads(&self) -> &::models::CommonDownloadsMetrics { + &self.downloads + } + + + pub fn set_inactive(&mut self, inactive: i32) { + self.inactive = Some(inactive); + } + + pub fn with_inactive(mut self, inactive: i32) -> CommonMetrics { + self.inactive = Some(inactive); + self + } + + pub fn inactive(&self) -> Option<&i32> { + self.inactive.as_ref() + } + + pub fn reset_inactive(&mut self) { + self.inactive = None; + } + + pub fn set_total(&mut self, total: i32) { + self.total = Some(total); + } + + pub fn with_total(mut self, total: i32) -> CommonMetrics { + self.total = Some(total); + self + } + + pub fn total(&self) -> Option<&i32> { + self.total.as_ref() + } + + pub fn reset_total(&mut self) { + self.total = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/composer_package_upload.rs b/bindings/rust/src/src/models/composer_package_upload.rs new file mode 100644 index 00000000..0240a52c --- /dev/null +++ b/bindings/rust/src/src/models/composer_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ComposerPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl ComposerPackageUpload { + pub fn new() -> ComposerPackageUpload { + ComposerPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> ComposerPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> ComposerPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> ComposerPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> ComposerPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> ComposerPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> ComposerPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> ComposerPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> ComposerPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> ComposerPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> ComposerPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> ComposerPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> ComposerPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> ComposerPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> ComposerPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> ComposerPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> ComposerPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> ComposerPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> ComposerPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> ComposerPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> ComposerPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> ComposerPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> ComposerPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> ComposerPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> ComposerPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> ComposerPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> ComposerPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> ComposerPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> ComposerPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> ComposerPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> ComposerPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> ComposerPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> ComposerPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> ComposerPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> ComposerPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> ComposerPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> ComposerPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> ComposerPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> ComposerPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> ComposerPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> ComposerPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> ComposerPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> ComposerPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> ComposerPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> ComposerPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> ComposerPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> ComposerPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> ComposerPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> ComposerPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> ComposerPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> ComposerPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> ComposerPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> ComposerPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> ComposerPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> ComposerPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> ComposerPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> ComposerPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> ComposerPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> ComposerPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> ComposerPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> ComposerPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> ComposerPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> ComposerPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> ComposerPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> ComposerPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> ComposerPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> ComposerPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> ComposerPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> ComposerPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> ComposerPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> ComposerPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> ComposerPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> ComposerPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> ComposerPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> ComposerPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> ComposerPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> ComposerPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> ComposerPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> ComposerPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> ComposerPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> ComposerPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/composer_package_upload_request.rs b/bindings/rust/src/src/models/composer_package_upload_request.rs new file mode 100644 index 00000000..35bf6d5a --- /dev/null +++ b/bindings/rust/src/src/models/composer_package_upload_request.rs @@ -0,0 +1,109 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ComposerPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option +} + +impl ComposerPackageUploadRequest { + pub fn new(package_file: String) -> ComposerPackageUploadRequest { + ComposerPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None, + version: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> ComposerPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> ComposerPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> ComposerPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> ComposerPackageUploadRequest { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/composer_upstream.rs b/bindings/rust/src/src/models/composer_upstream.rs new file mode 100644 index 00000000..4a293f14 --- /dev/null +++ b/bindings/rust/src/src/models/composer_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ComposerUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl ComposerUpstream { + pub fn new(name: String, upstream_url: String) -> ComposerUpstream { + ComposerUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> ComposerUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> ComposerUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> ComposerUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> ComposerUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> ComposerUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> ComposerUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> ComposerUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> ComposerUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> ComposerUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> ComposerUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> ComposerUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> ComposerUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> ComposerUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> ComposerUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> ComposerUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> ComposerUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> ComposerUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> ComposerUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/composer_upstream_request.rs b/bindings/rust/src/src/models/composer_upstream_request.rs new file mode 100644 index 00000000..be56459e --- /dev/null +++ b/bindings/rust/src/src/models/composer_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ComposerUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl ComposerUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> ComposerUpstreamRequest { + ComposerUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> ComposerUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> ComposerUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> ComposerUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> ComposerUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> ComposerUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> ComposerUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> ComposerUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> ComposerUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> ComposerUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> ComposerUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> ComposerUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> ComposerUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> ComposerUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/composer_upstream_request_patch.rs b/bindings/rust/src/src/models/composer_upstream_request_patch.rs new file mode 100644 index 00000000..ddcc55c9 --- /dev/null +++ b/bindings/rust/src/src/models/composer_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ComposerUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl ComposerUpstreamRequestPatch { + pub fn new() -> ComposerUpstreamRequestPatch { + ComposerUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> ComposerUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> ComposerUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> ComposerUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> ComposerUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> ComposerUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> ComposerUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> ComposerUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> ComposerUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> ComposerUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> ComposerUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> ComposerUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> ComposerUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> ComposerUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/conan_package_upload.rs b/bindings/rust/src/src/models/conan_package_upload.rs new file mode 100644 index 00000000..41c9288b --- /dev/null +++ b/bindings/rust/src/src/models/conan_package_upload.rs @@ -0,0 +1,1696 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ConanPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// Conan channel. + #[serde(rename = "conan_channel")] + conan_channel: Option, + /// Conan prefix (User). + #[serde(rename = "conan_prefix")] + conan_prefix: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl ConanPackageUpload { + pub fn new() -> ConanPackageUpload { + ConanPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + conan_channel: None, + conan_prefix: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> ConanPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> ConanPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> ConanPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> ConanPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> ConanPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> ConanPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_conan_channel(&mut self, conan_channel: String) { + self.conan_channel = Some(conan_channel); + } + + pub fn with_conan_channel(mut self, conan_channel: String) -> ConanPackageUpload { + self.conan_channel = Some(conan_channel); + self + } + + pub fn conan_channel(&self) -> Option<&String> { + self.conan_channel.as_ref() + } + + pub fn reset_conan_channel(&mut self) { + self.conan_channel = None; + } + + pub fn set_conan_prefix(&mut self, conan_prefix: String) { + self.conan_prefix = Some(conan_prefix); + } + + pub fn with_conan_prefix(mut self, conan_prefix: String) -> ConanPackageUpload { + self.conan_prefix = Some(conan_prefix); + self + } + + pub fn conan_prefix(&self) -> Option<&String> { + self.conan_prefix.as_ref() + } + + pub fn reset_conan_prefix(&mut self) { + self.conan_prefix = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> ConanPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> ConanPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> ConanPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> ConanPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> ConanPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> ConanPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> ConanPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> ConanPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> ConanPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> ConanPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> ConanPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> ConanPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> ConanPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> ConanPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> ConanPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> ConanPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> ConanPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> ConanPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> ConanPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> ConanPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> ConanPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> ConanPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> ConanPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> ConanPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> ConanPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> ConanPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> ConanPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> ConanPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> ConanPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> ConanPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> ConanPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> ConanPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> ConanPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> ConanPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> ConanPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> ConanPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> ConanPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> ConanPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> ConanPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> ConanPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> ConanPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> ConanPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> ConanPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> ConanPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> ConanPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> ConanPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> ConanPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> ConanPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> ConanPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> ConanPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> ConanPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> ConanPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> ConanPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> ConanPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> ConanPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> ConanPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> ConanPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> ConanPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> ConanPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> ConanPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> ConanPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> ConanPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> ConanPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> ConanPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> ConanPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> ConanPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> ConanPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> ConanPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> ConanPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> ConanPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> ConanPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> ConanPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> ConanPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> ConanPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/conan_package_upload_request.rs b/bindings/rust/src/src/models/conan_package_upload_request.rs new file mode 100644 index 00000000..4792957d --- /dev/null +++ b/bindings/rust/src/src/models/conan_package_upload_request.rs @@ -0,0 +1,226 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ConanPackageUploadRequest { + /// Conan channel. + #[serde(rename = "conan_channel")] + conan_channel: Option, + /// Conan prefix (User). + #[serde(rename = "conan_prefix")] + conan_prefix: Option, + /// The info file is an python file containing the package metadata. + #[serde(rename = "info_file")] + info_file: String, + /// The info file is an python file containing the package metadata. + #[serde(rename = "manifest_file")] + manifest_file: String, + /// The conan file is an python file containing the package metadata. + #[serde(rename = "metadata_file")] + metadata_file: String, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option +} + +impl ConanPackageUploadRequest { + pub fn new(info_file: String, manifest_file: String, metadata_file: String, package_file: String) -> ConanPackageUploadRequest { + ConanPackageUploadRequest { + conan_channel: None, + conan_prefix: None, + info_file: info_file, + manifest_file: manifest_file, + metadata_file: metadata_file, + name: None, + package_file: package_file, + republish: None, + tags: None, + version: None + } + } + + pub fn set_conan_channel(&mut self, conan_channel: String) { + self.conan_channel = Some(conan_channel); + } + + pub fn with_conan_channel(mut self, conan_channel: String) -> ConanPackageUploadRequest { + self.conan_channel = Some(conan_channel); + self + } + + pub fn conan_channel(&self) -> Option<&String> { + self.conan_channel.as_ref() + } + + pub fn reset_conan_channel(&mut self) { + self.conan_channel = None; + } + + pub fn set_conan_prefix(&mut self, conan_prefix: String) { + self.conan_prefix = Some(conan_prefix); + } + + pub fn with_conan_prefix(mut self, conan_prefix: String) -> ConanPackageUploadRequest { + self.conan_prefix = Some(conan_prefix); + self + } + + pub fn conan_prefix(&self) -> Option<&String> { + self.conan_prefix.as_ref() + } + + pub fn reset_conan_prefix(&mut self) { + self.conan_prefix = None; + } + + pub fn set_info_file(&mut self, info_file: String) { + self.info_file = info_file; + } + + pub fn with_info_file(mut self, info_file: String) -> ConanPackageUploadRequest { + self.info_file = info_file; + self + } + + pub fn info_file(&self) -> &String { + &self.info_file + } + + + pub fn set_manifest_file(&mut self, manifest_file: String) { + self.manifest_file = manifest_file; + } + + pub fn with_manifest_file(mut self, manifest_file: String) -> ConanPackageUploadRequest { + self.manifest_file = manifest_file; + self + } + + pub fn manifest_file(&self) -> &String { + &self.manifest_file + } + + + pub fn set_metadata_file(&mut self, metadata_file: String) { + self.metadata_file = metadata_file; + } + + pub fn with_metadata_file(mut self, metadata_file: String) -> ConanPackageUploadRequest { + self.metadata_file = metadata_file; + self + } + + pub fn metadata_file(&self) -> &String { + &self.metadata_file + } + + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> ConanPackageUploadRequest { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> ConanPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> ConanPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> ConanPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> ConanPackageUploadRequest { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/conda_package_upload.rs b/bindings/rust/src/src/models/conda_package_upload.rs new file mode 100644 index 00000000..000f79d9 --- /dev/null +++ b/bindings/rust/src/src/models/conda_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CondaPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl CondaPackageUpload { + pub fn new() -> CondaPackageUpload { + CondaPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> CondaPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> CondaPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> CondaPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> CondaPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> CondaPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> CondaPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> CondaPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> CondaPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> CondaPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> CondaPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> CondaPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> CondaPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> CondaPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> CondaPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> CondaPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> CondaPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> CondaPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> CondaPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> CondaPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> CondaPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> CondaPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> CondaPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> CondaPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> CondaPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> CondaPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> CondaPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> CondaPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> CondaPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> CondaPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> CondaPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> CondaPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> CondaPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> CondaPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> CondaPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> CondaPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> CondaPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> CondaPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> CondaPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> CondaPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> CondaPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> CondaPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> CondaPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> CondaPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> CondaPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> CondaPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> CondaPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> CondaPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> CondaPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> CondaPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> CondaPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> CondaPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> CondaPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> CondaPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> CondaPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> CondaPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> CondaPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> CondaPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> CondaPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> CondaPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> CondaPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> CondaPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> CondaPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> CondaPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> CondaPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> CondaPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> CondaPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> CondaPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> CondaPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> CondaPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> CondaPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> CondaPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> CondaPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> CondaPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> CondaPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> CondaPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> CondaPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> CondaPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> CondaPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> CondaPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> CondaPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/conda_package_upload_request.rs b/bindings/rust/src/src/models/conda_package_upload_request.rs new file mode 100644 index 00000000..64b3a1da --- /dev/null +++ b/bindings/rust/src/src/models/conda_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CondaPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl CondaPackageUploadRequest { + pub fn new(package_file: String) -> CondaPackageUploadRequest { + CondaPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> CondaPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> CondaPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> CondaPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cran_package_upload.rs b/bindings/rust/src/src/models/cran_package_upload.rs new file mode 100644 index 00000000..8ced6c62 --- /dev/null +++ b/bindings/rust/src/src/models/cran_package_upload.rs @@ -0,0 +1,1675 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CranPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// Binary package uploads should specify the version of R they were built for. + #[serde(rename = "r_version")] + r_version: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl CranPackageUpload { + pub fn new() -> CranPackageUpload { + CranPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + r_version: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> CranPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> CranPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> CranPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> CranPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> CranPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> CranPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> CranPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> CranPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> CranPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> CranPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> CranPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> CranPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> CranPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> CranPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> CranPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> CranPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> CranPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> CranPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> CranPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> CranPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> CranPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> CranPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> CranPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> CranPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> CranPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> CranPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> CranPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> CranPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> CranPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> CranPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> CranPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> CranPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> CranPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> CranPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> CranPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> CranPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> CranPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> CranPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> CranPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> CranPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> CranPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> CranPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> CranPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> CranPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> CranPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> CranPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> CranPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_r_version(&mut self, r_version: String) { + self.r_version = Some(r_version); + } + + pub fn with_r_version(mut self, r_version: String) -> CranPackageUpload { + self.r_version = Some(r_version); + self + } + + pub fn r_version(&self) -> Option<&String> { + self.r_version.as_ref() + } + + pub fn reset_r_version(&mut self) { + self.r_version = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> CranPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> CranPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> CranPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> CranPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> CranPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> CranPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> CranPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> CranPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> CranPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> CranPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> CranPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> CranPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> CranPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> CranPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> CranPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> CranPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> CranPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> CranPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> CranPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> CranPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> CranPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> CranPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> CranPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> CranPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> CranPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> CranPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> CranPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> CranPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> CranPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> CranPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> CranPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> CranPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> CranPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cran_package_upload_request.rs b/bindings/rust/src/src/models/cran_package_upload_request.rs new file mode 100644 index 00000000..bacb5f42 --- /dev/null +++ b/bindings/rust/src/src/models/cran_package_upload_request.rs @@ -0,0 +1,130 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CranPackageUploadRequest { + /// Binary package uploads for macOS should specify the architecture they were built for. + #[serde(rename = "architecture")] + architecture: Option, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// Binary package uploads should specify the version of R they were built for. + #[serde(rename = "r_version")] + r_version: Option, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl CranPackageUploadRequest { + pub fn new(package_file: String) -> CranPackageUploadRequest { + CranPackageUploadRequest { + architecture: None, + package_file: package_file, + r_version: None, + republish: None, + tags: None + } + } + + pub fn set_architecture(&mut self, architecture: String) { + self.architecture = Some(architecture); + } + + pub fn with_architecture(mut self, architecture: String) -> CranPackageUploadRequest { + self.architecture = Some(architecture); + self + } + + pub fn architecture(&self) -> Option<&String> { + self.architecture.as_ref() + } + + pub fn reset_architecture(&mut self) { + self.architecture = None; + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> CranPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_r_version(&mut self, r_version: String) { + self.r_version = Some(r_version); + } + + pub fn with_r_version(mut self, r_version: String) -> CranPackageUploadRequest { + self.r_version = Some(r_version); + self + } + + pub fn r_version(&self) -> Option<&String> { + self.r_version.as_ref() + } + + pub fn reset_r_version(&mut self) { + self.r_version = None; + } + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> CranPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> CranPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cran_upstream.rs b/bindings/rust/src/src/models/cran_upstream.rs new file mode 100644 index 00000000..771697eb --- /dev/null +++ b/bindings/rust/src/src/models/cran_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CranUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl CranUpstream { + pub fn new(name: String, upstream_url: String) -> CranUpstream { + CranUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> CranUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> CranUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> CranUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> CranUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> CranUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> CranUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> CranUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> CranUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> CranUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> CranUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> CranUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> CranUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> CranUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> CranUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> CranUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> CranUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> CranUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> CranUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cran_upstream_request.rs b/bindings/rust/src/src/models/cran_upstream_request.rs new file mode 100644 index 00000000..d9f130d0 --- /dev/null +++ b/bindings/rust/src/src/models/cran_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CranUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl CranUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> CranUpstreamRequest { + CranUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> CranUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> CranUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> CranUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> CranUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> CranUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> CranUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> CranUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> CranUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> CranUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> CranUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> CranUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> CranUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> CranUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/cran_upstream_request_patch.rs b/bindings/rust/src/src/models/cran_upstream_request_patch.rs new file mode 100644 index 00000000..fd8f4d67 --- /dev/null +++ b/bindings/rust/src/src/models/cran_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct CranUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl CranUpstreamRequestPatch { + pub fn new() -> CranUpstreamRequestPatch { + CranUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> CranUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> CranUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> CranUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> CranUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> CranUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> CranUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> CranUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> CranUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> CranUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> CranUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> CranUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> CranUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> CranUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/dart_package_upload.rs b/bindings/rust/src/src/models/dart_package_upload.rs new file mode 100644 index 00000000..d445b482 --- /dev/null +++ b/bindings/rust/src/src/models/dart_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DartPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl DartPackageUpload { + pub fn new() -> DartPackageUpload { + DartPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> DartPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> DartPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> DartPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> DartPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> DartPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> DartPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> DartPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> DartPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> DartPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> DartPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> DartPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> DartPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> DartPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> DartPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> DartPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> DartPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> DartPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> DartPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> DartPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> DartPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> DartPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> DartPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> DartPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> DartPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> DartPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> DartPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> DartPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> DartPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> DartPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> DartPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> DartPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> DartPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> DartPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> DartPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> DartPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> DartPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> DartPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> DartPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> DartPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DartPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> DartPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> DartPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> DartPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> DartPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> DartPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> DartPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> DartPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> DartPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> DartPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> DartPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> DartPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> DartPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> DartPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> DartPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> DartPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> DartPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> DartPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> DartPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> DartPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> DartPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> DartPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> DartPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> DartPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> DartPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> DartPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> DartPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> DartPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> DartPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> DartPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> DartPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> DartPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> DartPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> DartPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> DartPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> DartPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> DartPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> DartPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> DartPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> DartPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> DartPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/dart_package_upload_request.rs b/bindings/rust/src/src/models/dart_package_upload_request.rs new file mode 100644 index 00000000..7bfc674b --- /dev/null +++ b/bindings/rust/src/src/models/dart_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DartPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl DartPackageUploadRequest { + pub fn new(package_file: String) -> DartPackageUploadRequest { + DartPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> DartPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> DartPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> DartPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/dart_upstream.rs b/bindings/rust/src/src/models/dart_upstream.rs new file mode 100644 index 00000000..1594f090 --- /dev/null +++ b/bindings/rust/src/src/models/dart_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DartUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DartUpstream { + pub fn new(name: String, upstream_url: String) -> DartUpstream { + DartUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DartUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DartUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DartUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> DartUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> DartUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DartUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DartUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DartUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DartUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DartUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DartUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DartUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> DartUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DartUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> DartUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> DartUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DartUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DartUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/dart_upstream_request.rs b/bindings/rust/src/src/models/dart_upstream_request.rs new file mode 100644 index 00000000..b8a45027 --- /dev/null +++ b/bindings/rust/src/src/models/dart_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DartUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DartUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> DartUpstreamRequest { + DartUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DartUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DartUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DartUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DartUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DartUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DartUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DartUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DartUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DartUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DartUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DartUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DartUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DartUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/dart_upstream_request_patch.rs b/bindings/rust/src/src/models/dart_upstream_request_patch.rs new file mode 100644 index 00000000..d47c1af7 --- /dev/null +++ b/bindings/rust/src/src/models/dart_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DartUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DartUpstreamRequestPatch { + pub fn new() -> DartUpstreamRequestPatch { + DartUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DartUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DartUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DartUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DartUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DartUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DartUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DartUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DartUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DartUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DartUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DartUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DartUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DartUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/deb_package_upload.rs b/bindings/rust/src/src/models/deb_package_upload.rs new file mode 100644 index 00000000..2e96aa66 --- /dev/null +++ b/bindings/rust/src/src/models/deb_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DebPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl DebPackageUpload { + pub fn new() -> DebPackageUpload { + DebPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> DebPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> DebPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> DebPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> DebPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> DebPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> DebPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> DebPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> DebPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> DebPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> DebPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> DebPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> DebPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> DebPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> DebPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> DebPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> DebPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> DebPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> DebPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> DebPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> DebPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> DebPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> DebPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> DebPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> DebPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> DebPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> DebPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> DebPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> DebPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> DebPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> DebPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> DebPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> DebPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> DebPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> DebPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> DebPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> DebPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> DebPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> DebPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> DebPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DebPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> DebPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> DebPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> DebPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> DebPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> DebPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> DebPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> DebPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> DebPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> DebPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> DebPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> DebPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> DebPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> DebPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> DebPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> DebPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> DebPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> DebPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> DebPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> DebPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> DebPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> DebPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> DebPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> DebPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> DebPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> DebPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> DebPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> DebPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> DebPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> DebPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> DebPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> DebPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> DebPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> DebPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> DebPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> DebPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> DebPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> DebPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> DebPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> DebPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> DebPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/deb_package_upload_request.rs b/bindings/rust/src/src/models/deb_package_upload_request.rs new file mode 100644 index 00000000..56bdcd9a --- /dev/null +++ b/bindings/rust/src/src/models/deb_package_upload_request.rs @@ -0,0 +1,169 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DebPackageUploadRequest { + /// The changes archive containing the changes made to the source and debian packaging files + #[serde(rename = "changes_file")] + changes_file: Option, + /// The component (channel) for the package (e.g. 'main', 'unstable', etc.) + #[serde(rename = "component")] + component: Option, + /// The distribution to store the package for. + #[serde(rename = "distribution")] + distribution: String, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// The sources archive containing the source code for the binary + #[serde(rename = "sources_file")] + sources_file: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl DebPackageUploadRequest { + pub fn new(distribution: String, package_file: String) -> DebPackageUploadRequest { + DebPackageUploadRequest { + changes_file: None, + component: None, + distribution: distribution, + package_file: package_file, + republish: None, + sources_file: None, + tags: None + } + } + + pub fn set_changes_file(&mut self, changes_file: String) { + self.changes_file = Some(changes_file); + } + + pub fn with_changes_file(mut self, changes_file: String) -> DebPackageUploadRequest { + self.changes_file = Some(changes_file); + self + } + + pub fn changes_file(&self) -> Option<&String> { + self.changes_file.as_ref() + } + + pub fn reset_changes_file(&mut self) { + self.changes_file = None; + } + + pub fn set_component(&mut self, component: String) { + self.component = Some(component); + } + + pub fn with_component(mut self, component: String) -> DebPackageUploadRequest { + self.component = Some(component); + self + } + + pub fn component(&self) -> Option<&String> { + self.component.as_ref() + } + + pub fn reset_component(&mut self) { + self.component = None; + } + + pub fn set_distribution(&mut self, distribution: String) { + self.distribution = distribution; + } + + pub fn with_distribution(mut self, distribution: String) -> DebPackageUploadRequest { + self.distribution = distribution; + self + } + + pub fn distribution(&self) -> &String { + &self.distribution + } + + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> DebPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> DebPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_sources_file(&mut self, sources_file: String) { + self.sources_file = Some(sources_file); + } + + pub fn with_sources_file(mut self, sources_file: String) -> DebPackageUploadRequest { + self.sources_file = Some(sources_file); + self + } + + pub fn sources_file(&self) -> Option<&String> { + self.sources_file.as_ref() + } + + pub fn reset_sources_file(&mut self) { + self.sources_file = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> DebPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/deb_upstream.rs b/bindings/rust/src/src/models/deb_upstream.rs new file mode 100644 index 00000000..6ac9d635 --- /dev/null +++ b/bindings/rust/src/src/models/deb_upstream.rs @@ -0,0 +1,562 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DebUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The component to fetch from the upstream + #[serde(rename = "component")] + component: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The distribution version that packages found on this upstream could be associated with. + #[serde(rename = "distro_versions")] + distro_versions: Vec, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// When true, source packages will be available from this upstream. + #[serde(rename = "include_sources")] + include_sources: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The distribution to fetch from the upstream + #[serde(rename = "upstream_distribution")] + upstream_distribution: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// The signature verification status for this upstream. + #[serde(rename = "verification_status")] + verification_status: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DebUpstream { + pub fn new(distro_versions: Vec, name: String, upstream_url: String) -> DebUpstream { + DebUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + component: None, + created_at: None, + disable_reason: None, + distro_versions: distro_versions, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + include_sources: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_distribution: None, + upstream_url: upstream_url, + verification_status: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DebUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DebUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DebUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_component(&mut self, component: String) { + self.component = Some(component); + } + + pub fn with_component(mut self, component: String) -> DebUpstream { + self.component = Some(component); + self + } + + pub fn component(&self) -> Option<&String> { + self.component.as_ref() + } + + pub fn reset_component(&mut self) { + self.component = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> DebUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> DebUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_distro_versions(&mut self, distro_versions: Vec) { + self.distro_versions = distro_versions; + } + + pub fn with_distro_versions(mut self, distro_versions: Vec) -> DebUpstream { + self.distro_versions = distro_versions; + self + } + + pub fn distro_versions(&self) -> &Vec { + &self.distro_versions + } + + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DebUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DebUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DebUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DebUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> DebUpstream { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> DebUpstream { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> DebUpstream { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_include_sources(&mut self, include_sources: bool) { + self.include_sources = Some(include_sources); + } + + pub fn with_include_sources(mut self, include_sources: bool) -> DebUpstream { + self.include_sources = Some(include_sources); + self + } + + pub fn include_sources(&self) -> Option<&bool> { + self.include_sources.as_ref() + } + + pub fn reset_include_sources(&mut self) { + self.include_sources = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DebUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DebUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DebUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> DebUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DebUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> DebUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> DebUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_distribution(&mut self, upstream_distribution: String) { + self.upstream_distribution = Some(upstream_distribution); + } + + pub fn with_upstream_distribution(mut self, upstream_distribution: String) -> DebUpstream { + self.upstream_distribution = Some(upstream_distribution); + self + } + + pub fn upstream_distribution(&self) -> Option<&String> { + self.upstream_distribution.as_ref() + } + + pub fn reset_upstream_distribution(&mut self) { + self.upstream_distribution = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DebUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verification_status(&mut self, verification_status: String) { + self.verification_status = Some(verification_status); + } + + pub fn with_verification_status(mut self, verification_status: String) -> DebUpstream { + self.verification_status = Some(verification_status); + self + } + + pub fn verification_status(&self) -> Option<&String> { + self.verification_status.as_ref() + } + + pub fn reset_verification_status(&mut self) { + self.verification_status = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DebUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/deb_upstream_request.rs b/bindings/rust/src/src/models/deb_upstream_request.rs new file mode 100644 index 00000000..67d9ee25 --- /dev/null +++ b/bindings/rust/src/src/models/deb_upstream_request.rs @@ -0,0 +1,439 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DebUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The component to fetch from the upstream + #[serde(rename = "component")] + component: Option, + /// The distribution version that packages found on this upstream could be associated with. + #[serde(rename = "distro_versions")] + distro_versions: Vec, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// When true, source packages will be available from this upstream. + #[serde(rename = "include_sources")] + include_sources: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The distribution to fetch from the upstream + #[serde(rename = "upstream_distribution")] + upstream_distribution: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DebUpstreamRequest { + pub fn new(distro_versions: Vec, name: String, upstream_url: String) -> DebUpstreamRequest { + DebUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + component: None, + distro_versions: distro_versions, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + include_sources: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_distribution: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DebUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DebUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DebUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_component(&mut self, component: String) { + self.component = Some(component); + } + + pub fn with_component(mut self, component: String) -> DebUpstreamRequest { + self.component = Some(component); + self + } + + pub fn component(&self) -> Option<&String> { + self.component.as_ref() + } + + pub fn reset_component(&mut self) { + self.component = None; + } + + pub fn set_distro_versions(&mut self, distro_versions: Vec) { + self.distro_versions = distro_versions; + } + + pub fn with_distro_versions(mut self, distro_versions: Vec) -> DebUpstreamRequest { + self.distro_versions = distro_versions; + self + } + + pub fn distro_versions(&self) -> &Vec { + &self.distro_versions + } + + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DebUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DebUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DebUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DebUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> DebUpstreamRequest { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> DebUpstreamRequest { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> DebUpstreamRequest { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_include_sources(&mut self, include_sources: bool) { + self.include_sources = Some(include_sources); + } + + pub fn with_include_sources(mut self, include_sources: bool) -> DebUpstreamRequest { + self.include_sources = Some(include_sources); + self + } + + pub fn include_sources(&self) -> Option<&bool> { + self.include_sources.as_ref() + } + + pub fn reset_include_sources(&mut self) { + self.include_sources = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DebUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DebUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DebUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DebUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_distribution(&mut self, upstream_distribution: String) { + self.upstream_distribution = Some(upstream_distribution); + } + + pub fn with_upstream_distribution(mut self, upstream_distribution: String) -> DebUpstreamRequest { + self.upstream_distribution = Some(upstream_distribution); + self + } + + pub fn upstream_distribution(&self) -> Option<&String> { + self.upstream_distribution.as_ref() + } + + pub fn reset_upstream_distribution(&mut self) { + self.upstream_distribution = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DebUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DebUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/deb_upstream_request_patch.rs b/bindings/rust/src/src/models/deb_upstream_request_patch.rs new file mode 100644 index 00000000..e98d7abf --- /dev/null +++ b/bindings/rust/src/src/models/deb_upstream_request_patch.rs @@ -0,0 +1,448 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DebUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The component to fetch from the upstream + #[serde(rename = "component")] + component: Option, + /// The distribution version that packages found on this upstream could be associated with. + #[serde(rename = "distro_versions")] + distro_versions: Option>, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// When true, source packages will be available from this upstream. + #[serde(rename = "include_sources")] + include_sources: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The distribution to fetch from the upstream + #[serde(rename = "upstream_distribution")] + upstream_distribution: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DebUpstreamRequestPatch { + pub fn new() -> DebUpstreamRequestPatch { + DebUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + component: None, + distro_versions: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + include_sources: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_distribution: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DebUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DebUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DebUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_component(&mut self, component: String) { + self.component = Some(component); + } + + pub fn with_component(mut self, component: String) -> DebUpstreamRequestPatch { + self.component = Some(component); + self + } + + pub fn component(&self) -> Option<&String> { + self.component.as_ref() + } + + pub fn reset_component(&mut self) { + self.component = None; + } + + pub fn set_distro_versions(&mut self, distro_versions: Vec) { + self.distro_versions = Some(distro_versions); + } + + pub fn with_distro_versions(mut self, distro_versions: Vec) -> DebUpstreamRequestPatch { + self.distro_versions = Some(distro_versions); + self + } + + pub fn distro_versions(&self) -> Option<&Vec> { + self.distro_versions.as_ref() + } + + pub fn reset_distro_versions(&mut self) { + self.distro_versions = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DebUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DebUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DebUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DebUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> DebUpstreamRequestPatch { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> DebUpstreamRequestPatch { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> DebUpstreamRequestPatch { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_include_sources(&mut self, include_sources: bool) { + self.include_sources = Some(include_sources); + } + + pub fn with_include_sources(mut self, include_sources: bool) -> DebUpstreamRequestPatch { + self.include_sources = Some(include_sources); + self + } + + pub fn include_sources(&self) -> Option<&bool> { + self.include_sources.as_ref() + } + + pub fn reset_include_sources(&mut self) { + self.include_sources = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DebUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DebUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DebUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DebUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_distribution(&mut self, upstream_distribution: String) { + self.upstream_distribution = Some(upstream_distribution); + } + + pub fn with_upstream_distribution(mut self, upstream_distribution: String) -> DebUpstreamRequestPatch { + self.upstream_distribution = Some(upstream_distribution); + self + } + + pub fn upstream_distribution(&self) -> Option<&String> { + self.upstream_distribution.as_ref() + } + + pub fn reset_upstream_distribution(&mut self) { + self.upstream_distribution = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DebUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DebUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/distribution.rs b/bindings/rust/src/src/models/distribution.rs new file mode 100644 index 00000000..de13cf16 --- /dev/null +++ b/bindings/rust/src/src/models/distribution.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// Distribution : The distributions supported by this package format + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Distribution { + #[serde(rename = "name")] + name: String, + #[serde(rename = "self_url")] + self_url: Option, + /// The slug identifier for this distribution + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "variants")] + variants: Option +} + +impl Distribution { + /// The distributions supported by this package format + pub fn new(name: String) -> Distribution { + Distribution { + name: name, + self_url: None, + slug: None, + variants: None + } + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> Distribution { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> Distribution { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> Distribution { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_variants(&mut self, variants: String) { + self.variants = Some(variants); + } + + pub fn with_variants(mut self, variants: String) -> Distribution { + self.variants = Some(variants); + self + } + + pub fn variants(&self) -> Option<&String> { + self.variants.as_ref() + } + + pub fn reset_variants(&mut self) { + self.variants = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/distribution_full.rs b/bindings/rust/src/src/models/distribution_full.rs new file mode 100644 index 00000000..1ed322f6 --- /dev/null +++ b/bindings/rust/src/src/models/distribution_full.rs @@ -0,0 +1,167 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DistributionFull { + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "self_url")] + self_url: Option, + /// The slug identifier for this distribution + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "variants")] + variants: Option, + /// A list of the versions for this distribution + #[serde(rename = "versions")] + versions: Option> +} + +impl DistributionFull { + pub fn new(name: String) -> DistributionFull { + DistributionFull { + format: None, + format_url: None, + name: name, + self_url: None, + slug: None, + variants: None, + versions: None + } + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> DistributionFull { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> DistributionFull { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DistributionFull { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> DistributionFull { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> DistributionFull { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_variants(&mut self, variants: String) { + self.variants = Some(variants); + } + + pub fn with_variants(mut self, variants: String) -> DistributionFull { + self.variants = Some(variants); + self + } + + pub fn variants(&self) -> Option<&String> { + self.variants.as_ref() + } + + pub fn reset_variants(&mut self) { + self.variants = None; + } + + pub fn set_versions(&mut self, versions: Vec<::models::DistributionVersion>) { + self.versions = Some(versions); + } + + pub fn with_versions(mut self, versions: Vec<::models::DistributionVersion>) -> DistributionFull { + self.versions = Some(versions); + self + } + + pub fn versions(&self) -> Option<&Vec<::models::DistributionVersion>> { + self.versions.as_ref() + } + + pub fn reset_versions(&mut self) { + self.versions = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/distribution_version.rs b/bindings/rust/src/src/models/distribution_version.rs new file mode 100644 index 00000000..97e276ef --- /dev/null +++ b/bindings/rust/src/src/models/distribution_version.rs @@ -0,0 +1,72 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// DistributionVersion : A list of the versions for this distribution + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DistributionVersion { + /// The textual name for this version. + #[serde(rename = "name")] + name: Option, + /// The slug identifier for this version + #[serde(rename = "slug")] + slug: Option +} + +impl DistributionVersion { + /// A list of the versions for this distribution + pub fn new() -> DistributionVersion { + DistributionVersion { + name: None, + slug: None + } + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DistributionVersion { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> DistributionVersion { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/docker_package_upload.rs b/bindings/rust/src/src/models/docker_package_upload.rs new file mode 100644 index 00000000..6a372352 --- /dev/null +++ b/bindings/rust/src/src/models/docker_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DockerPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl DockerPackageUpload { + pub fn new() -> DockerPackageUpload { + DockerPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> DockerPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> DockerPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> DockerPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> DockerPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> DockerPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> DockerPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> DockerPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> DockerPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> DockerPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> DockerPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> DockerPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> DockerPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> DockerPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> DockerPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> DockerPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> DockerPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> DockerPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> DockerPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> DockerPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> DockerPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> DockerPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> DockerPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> DockerPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> DockerPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> DockerPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> DockerPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> DockerPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> DockerPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> DockerPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> DockerPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> DockerPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> DockerPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> DockerPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> DockerPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> DockerPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> DockerPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> DockerPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> DockerPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> DockerPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DockerPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> DockerPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> DockerPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> DockerPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> DockerPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> DockerPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> DockerPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> DockerPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> DockerPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> DockerPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> DockerPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> DockerPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> DockerPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> DockerPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> DockerPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> DockerPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> DockerPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> DockerPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> DockerPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> DockerPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> DockerPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> DockerPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> DockerPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> DockerPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> DockerPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> DockerPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> DockerPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> DockerPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> DockerPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> DockerPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> DockerPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> DockerPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> DockerPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> DockerPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> DockerPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> DockerPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> DockerPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> DockerPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> DockerPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> DockerPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> DockerPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/docker_package_upload_request.rs b/bindings/rust/src/src/models/docker_package_upload_request.rs new file mode 100644 index 00000000..3b619ccc --- /dev/null +++ b/bindings/rust/src/src/models/docker_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DockerPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl DockerPackageUploadRequest { + pub fn new(package_file: String) -> DockerPackageUploadRequest { + DockerPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> DockerPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> DockerPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> DockerPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/docker_upstream.rs b/bindings/rust/src/src/models/docker_upstream.rs new file mode 100644 index 00000000..287cd45a --- /dev/null +++ b/bindings/rust/src/src/models/docker_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DockerUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DockerUpstream { + pub fn new(name: String, upstream_url: String) -> DockerUpstream { + DockerUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DockerUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DockerUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DockerUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> DockerUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> DockerUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DockerUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DockerUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DockerUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DockerUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DockerUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DockerUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DockerUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> DockerUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DockerUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> DockerUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> DockerUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DockerUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DockerUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/docker_upstream_request.rs b/bindings/rust/src/src/models/docker_upstream_request.rs new file mode 100644 index 00000000..af1c2b5b --- /dev/null +++ b/bindings/rust/src/src/models/docker_upstream_request.rs @@ -0,0 +1,337 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DockerUpstreamRequest { + /// X.509 Certificate to use for mTLS authentication against the upstream + #[serde(rename = "auth_certificate")] + auth_certificate: Option, + /// Certificate key to use for mTLS authentication against the upstream + #[serde(rename = "auth_certificate_key")] + auth_certificate_key: Option, + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DockerUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> DockerUpstreamRequest { + DockerUpstreamRequest { + auth_certificate: None, + auth_certificate_key: None, + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_certificate(&mut self, auth_certificate: String) { + self.auth_certificate = Some(auth_certificate); + } + + pub fn with_auth_certificate(mut self, auth_certificate: String) -> DockerUpstreamRequest { + self.auth_certificate = Some(auth_certificate); + self + } + + pub fn auth_certificate(&self) -> Option<&String> { + self.auth_certificate.as_ref() + } + + pub fn reset_auth_certificate(&mut self) { + self.auth_certificate = None; + } + + pub fn set_auth_certificate_key(&mut self, auth_certificate_key: String) { + self.auth_certificate_key = Some(auth_certificate_key); + } + + pub fn with_auth_certificate_key(mut self, auth_certificate_key: String) -> DockerUpstreamRequest { + self.auth_certificate_key = Some(auth_certificate_key); + self + } + + pub fn auth_certificate_key(&self) -> Option<&String> { + self.auth_certificate_key.as_ref() + } + + pub fn reset_auth_certificate_key(&mut self) { + self.auth_certificate_key = None; + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DockerUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DockerUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DockerUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DockerUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DockerUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DockerUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DockerUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DockerUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DockerUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> DockerUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DockerUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DockerUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DockerUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/docker_upstream_request_patch.rs b/bindings/rust/src/src/models/docker_upstream_request_patch.rs new file mode 100644 index 00000000..87d1fde7 --- /dev/null +++ b/bindings/rust/src/src/models/docker_upstream_request_patch.rs @@ -0,0 +1,343 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct DockerUpstreamRequestPatch { + /// X.509 Certificate to use for mTLS authentication against the upstream + #[serde(rename = "auth_certificate")] + auth_certificate: Option, + /// Certificate key to use for mTLS authentication against the upstream + #[serde(rename = "auth_certificate_key")] + auth_certificate_key: Option, + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl DockerUpstreamRequestPatch { + pub fn new() -> DockerUpstreamRequestPatch { + DockerUpstreamRequestPatch { + auth_certificate: None, + auth_certificate_key: None, + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_certificate(&mut self, auth_certificate: String) { + self.auth_certificate = Some(auth_certificate); + } + + pub fn with_auth_certificate(mut self, auth_certificate: String) -> DockerUpstreamRequestPatch { + self.auth_certificate = Some(auth_certificate); + self + } + + pub fn auth_certificate(&self) -> Option<&String> { + self.auth_certificate.as_ref() + } + + pub fn reset_auth_certificate(&mut self) { + self.auth_certificate = None; + } + + pub fn set_auth_certificate_key(&mut self, auth_certificate_key: String) { + self.auth_certificate_key = Some(auth_certificate_key); + } + + pub fn with_auth_certificate_key(mut self, auth_certificate_key: String) -> DockerUpstreamRequestPatch { + self.auth_certificate_key = Some(auth_certificate_key); + self + } + + pub fn auth_certificate_key(&self) -> Option<&String> { + self.auth_certificate_key.as_ref() + } + + pub fn reset_auth_certificate_key(&mut self) { + self.auth_certificate_key = None; + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> DockerUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> DockerUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> DockerUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> DockerUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> DockerUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> DockerUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> DockerUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> DockerUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> DockerUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> DockerUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> DockerUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> DockerUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> DockerUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/entitlement_usage_metrics.rs b/bindings/rust/src/src/models/entitlement_usage_metrics.rs new file mode 100644 index 00000000..44d9eb5d --- /dev/null +++ b/bindings/rust/src/src/models/entitlement_usage_metrics.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct EntitlementUsageMetrics { + #[serde(rename = "tokens")] + tokens: ::models::CommonMetrics +} + +impl EntitlementUsageMetrics { + pub fn new(tokens: ::models::CommonMetrics) -> EntitlementUsageMetrics { + EntitlementUsageMetrics { + tokens: tokens + } + } + + pub fn set_tokens(&mut self, tokens: ::models::CommonMetrics) { + self.tokens = tokens; + } + + pub fn with_tokens(mut self, tokens: ::models::CommonMetrics) -> EntitlementUsageMetrics { + self.tokens = tokens; + self + } + + pub fn tokens(&self) -> &::models::CommonMetrics { + &self.tokens + } + + +} + + + diff --git a/bindings/rust/src/src/models/error_detail.rs b/bindings/rust/src/src/models/error_detail.rs new file mode 100644 index 00000000..42199564 --- /dev/null +++ b/bindings/rust/src/src/models/error_detail.rs @@ -0,0 +1,67 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ErrorDetail { + /// An extended message for the response. + #[serde(rename = "detail")] + detail: String, + /// A Dictionary of related errors where key: Field and value: Array of Errors related to that field + #[serde(rename = "fields")] + fields: Option<::std::collections::HashMap>> +} + +impl ErrorDetail { + pub fn new(detail: String) -> ErrorDetail { + ErrorDetail { + detail: detail, + fields: None + } + } + + pub fn set_detail(&mut self, detail: String) { + self.detail = detail; + } + + pub fn with_detail(mut self, detail: String) -> ErrorDetail { + self.detail = detail; + self + } + + pub fn detail(&self) -> &String { + &self.detail + } + + + pub fn set_fields(&mut self, fields: ::std::collections::HashMap>) { + self.fields = Some(fields); + } + + pub fn with_fields(mut self, fields: ::std::collections::HashMap>) -> ErrorDetail { + self.fields = Some(fields); + self + } + + pub fn fields(&self) -> Option<&::std::collections::HashMap>> { + self.fields.as_ref() + } + + pub fn reset_fields(&mut self) { + self.fields = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/eula.rs b/bindings/rust/src/src/models/eula.rs new file mode 100644 index 00000000..77c86635 --- /dev/null +++ b/bindings/rust/src/src/models/eula.rs @@ -0,0 +1,70 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Eula { + /// A unique identifier that you can use for your own EULA tracking purposes. This might be a date, or a semantic version, etc. The only requirement is that it is unique across multiple EULAs. + #[serde(rename = "identifier")] + identifier: Option, + /// A sequential identifier that increments by one for each new commit in a repository. + #[serde(rename = "number")] + number: Option +} + +impl Eula { + pub fn new() -> Eula { + Eula { + identifier: None, + number: None + } + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = Some(identifier); + } + + pub fn with_identifier(mut self, identifier: String) -> Eula { + self.identifier = Some(identifier); + self + } + + pub fn identifier(&self) -> Option<&String> { + self.identifier.as_ref() + } + + pub fn reset_identifier(&mut self) { + self.identifier = None; + } + + pub fn set_number(&mut self, number: i32) { + self.number = Some(number); + } + + pub fn with_number(mut self, number: i32) -> Eula { + self.number = Some(number); + self + } + + pub fn number(&self) -> Option<&i32> { + self.number.as_ref() + } + + pub fn reset_number(&mut self) { + self.number = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/format.rs b/bindings/rust/src/src/models/format.rs new file mode 100644 index 00000000..35fe2740 --- /dev/null +++ b/bindings/rust/src/src/models/format.rs @@ -0,0 +1,198 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Format { + /// Description of the package format + #[serde(rename = "description")] + description: String, + /// The distributions supported by this package format + #[serde(rename = "distributions")] + distributions: Option>, + /// A non-exhaustive list of extensions supported + #[serde(rename = "extensions")] + extensions: Vec, + /// Name for the package format + #[serde(rename = "name")] + name: String, + /// If true the package format is a premium-only feature + #[serde(rename = "premium")] + premium: bool, + /// The minimum plan id required for this package format + #[serde(rename = "premium_plan_id")] + premium_plan_id: Option, + /// The minimum plan name required for this package format + #[serde(rename = "premium_plan_name")] + premium_plan_name: Option, + /// Slug for the package format + #[serde(rename = "slug")] + slug: String, + #[serde(rename = "supports")] + supports: ::models::FormatSupport +} + +impl Format { + pub fn new(description: String, extensions: Vec, name: String, premium: bool, slug: String, supports: ::models::FormatSupport) -> Format { + Format { + description: description, + distributions: None, + extensions: extensions, + name: name, + premium: premium, + premium_plan_id: None, + premium_plan_name: None, + slug: slug, + supports: supports + } + } + + pub fn set_description(&mut self, description: String) { + self.description = description; + } + + pub fn with_description(mut self, description: String) -> Format { + self.description = description; + self + } + + pub fn description(&self) -> &String { + &self.description + } + + + pub fn set_distributions(&mut self, distributions: Vec<::models::Distribution>) { + self.distributions = Some(distributions); + } + + pub fn with_distributions(mut self, distributions: Vec<::models::Distribution>) -> Format { + self.distributions = Some(distributions); + self + } + + pub fn distributions(&self) -> Option<&Vec<::models::Distribution>> { + self.distributions.as_ref() + } + + pub fn reset_distributions(&mut self) { + self.distributions = None; + } + + pub fn set_extensions(&mut self, extensions: Vec) { + self.extensions = extensions; + } + + pub fn with_extensions(mut self, extensions: Vec) -> Format { + self.extensions = extensions; + self + } + + pub fn extensions(&self) -> &Vec { + &self.extensions + } + + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> Format { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_premium(&mut self, premium: bool) { + self.premium = premium; + } + + pub fn with_premium(mut self, premium: bool) -> Format { + self.premium = premium; + self + } + + pub fn premium(&self) -> &bool { + &self.premium + } + + + pub fn set_premium_plan_id(&mut self, premium_plan_id: String) { + self.premium_plan_id = Some(premium_plan_id); + } + + pub fn with_premium_plan_id(mut self, premium_plan_id: String) -> Format { + self.premium_plan_id = Some(premium_plan_id); + self + } + + pub fn premium_plan_id(&self) -> Option<&String> { + self.premium_plan_id.as_ref() + } + + pub fn reset_premium_plan_id(&mut self) { + self.premium_plan_id = None; + } + + pub fn set_premium_plan_name(&mut self, premium_plan_name: String) { + self.premium_plan_name = Some(premium_plan_name); + } + + pub fn with_premium_plan_name(mut self, premium_plan_name: String) -> Format { + self.premium_plan_name = Some(premium_plan_name); + self + } + + pub fn premium_plan_name(&self) -> Option<&String> { + self.premium_plan_name.as_ref() + } + + pub fn reset_premium_plan_name(&mut self) { + self.premium_plan_name = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = slug; + } + + pub fn with_slug(mut self, slug: String) -> Format { + self.slug = slug; + self + } + + pub fn slug(&self) -> &String { + &self.slug + } + + + pub fn set_supports(&mut self, supports: ::models::FormatSupport) { + self.supports = supports; + } + + pub fn with_supports(mut self, supports: ::models::FormatSupport) -> Format { + self.supports = supports; + self + } + + pub fn supports(&self) -> &::models::FormatSupport { + &self.supports + } + + +} + + + diff --git a/bindings/rust/src/src/models/format_support.rs b/bindings/rust/src/src/models/format_support.rs new file mode 100644 index 00000000..fdd04cb9 --- /dev/null +++ b/bindings/rust/src/src/models/format_support.rs @@ -0,0 +1,137 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// FormatSupport : A set of what the package format supports + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct FormatSupport { + /// If true the package format supports dependencies + #[serde(rename = "dependencies")] + dependencies: bool, + /// If true the package format supports distributions + #[serde(rename = "distributions")] + distributions: bool, + /// If true the package format supports file lists + #[serde(rename = "file_lists")] + file_lists: bool, + /// If true the package format supports metadata + #[serde(rename = "metadata")] + metadata: bool, + #[serde(rename = "upstreams")] + upstreams: ::models::FormatSupportUpstream, + /// If true the package format supports versioning + #[serde(rename = "versioning")] + versioning: bool +} + +impl FormatSupport { + /// A set of what the package format supports + pub fn new(dependencies: bool, distributions: bool, file_lists: bool, metadata: bool, upstreams: ::models::FormatSupportUpstream, versioning: bool) -> FormatSupport { + FormatSupport { + dependencies: dependencies, + distributions: distributions, + file_lists: file_lists, + metadata: metadata, + upstreams: upstreams, + versioning: versioning + } + } + + pub fn set_dependencies(&mut self, dependencies: bool) { + self.dependencies = dependencies; + } + + pub fn with_dependencies(mut self, dependencies: bool) -> FormatSupport { + self.dependencies = dependencies; + self + } + + pub fn dependencies(&self) -> &bool { + &self.dependencies + } + + + pub fn set_distributions(&mut self, distributions: bool) { + self.distributions = distributions; + } + + pub fn with_distributions(mut self, distributions: bool) -> FormatSupport { + self.distributions = distributions; + self + } + + pub fn distributions(&self) -> &bool { + &self.distributions + } + + + pub fn set_file_lists(&mut self, file_lists: bool) { + self.file_lists = file_lists; + } + + pub fn with_file_lists(mut self, file_lists: bool) -> FormatSupport { + self.file_lists = file_lists; + self + } + + pub fn file_lists(&self) -> &bool { + &self.file_lists + } + + + pub fn set_metadata(&mut self, metadata: bool) { + self.metadata = metadata; + } + + pub fn with_metadata(mut self, metadata: bool) -> FormatSupport { + self.metadata = metadata; + self + } + + pub fn metadata(&self) -> &bool { + &self.metadata + } + + + pub fn set_upstreams(&mut self, upstreams: ::models::FormatSupportUpstream) { + self.upstreams = upstreams; + } + + pub fn with_upstreams(mut self, upstreams: ::models::FormatSupportUpstream) -> FormatSupport { + self.upstreams = upstreams; + self + } + + pub fn upstreams(&self) -> &::models::FormatSupportUpstream { + &self.upstreams + } + + + pub fn set_versioning(&mut self, versioning: bool) { + self.versioning = versioning; + } + + pub fn with_versioning(mut self, versioning: bool) -> FormatSupport { + self.versioning = versioning; + self + } + + pub fn versioning(&self) -> &bool { + &self.versioning + } + + +} + + + diff --git a/bindings/rust/src/src/models/format_support_upstream.rs b/bindings/rust/src/src/models/format_support_upstream.rs new file mode 100644 index 00000000..54dffce3 --- /dev/null +++ b/bindings/rust/src/src/models/format_support_upstream.rs @@ -0,0 +1,144 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// FormatSupportUpstream : The upstream support for the package format + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct FormatSupportUpstream { + /// The authentication modes supported by the upstream format + #[serde(rename = "auth_modes")] + auth_modes: Vec, + /// If true the upstream format supports caching + #[serde(rename = "caching")] + caching: bool, + /// If true the upstream format supports indexing + #[serde(rename = "indexing")] + indexing: bool, + /// The behavior of the upstream when indexing + #[serde(rename = "indexing_behavior")] + indexing_behavior: Option, + /// If true the upstream format supports proxying + #[serde(rename = "proxying")] + proxying: bool, + /// The signature verification supported by the upstream format + #[serde(rename = "signature_verification")] + signature_verification: Option +} + +impl FormatSupportUpstream { + /// The upstream support for the package format + pub fn new(auth_modes: Vec, caching: bool, indexing: bool, proxying: bool) -> FormatSupportUpstream { + FormatSupportUpstream { + auth_modes: auth_modes, + caching: caching, + indexing: indexing, + indexing_behavior: None, + proxying: proxying, + signature_verification: None + } + } + + pub fn set_auth_modes(&mut self, auth_modes: Vec) { + self.auth_modes = auth_modes; + } + + pub fn with_auth_modes(mut self, auth_modes: Vec) -> FormatSupportUpstream { + self.auth_modes = auth_modes; + self + } + + pub fn auth_modes(&self) -> &Vec { + &self.auth_modes + } + + + pub fn set_caching(&mut self, caching: bool) { + self.caching = caching; + } + + pub fn with_caching(mut self, caching: bool) -> FormatSupportUpstream { + self.caching = caching; + self + } + + pub fn caching(&self) -> &bool { + &self.caching + } + + + pub fn set_indexing(&mut self, indexing: bool) { + self.indexing = indexing; + } + + pub fn with_indexing(mut self, indexing: bool) -> FormatSupportUpstream { + self.indexing = indexing; + self + } + + pub fn indexing(&self) -> &bool { + &self.indexing + } + + + pub fn set_indexing_behavior(&mut self, indexing_behavior: String) { + self.indexing_behavior = Some(indexing_behavior); + } + + pub fn with_indexing_behavior(mut self, indexing_behavior: String) -> FormatSupportUpstream { + self.indexing_behavior = Some(indexing_behavior); + self + } + + pub fn indexing_behavior(&self) -> Option<&String> { + self.indexing_behavior.as_ref() + } + + pub fn reset_indexing_behavior(&mut self) { + self.indexing_behavior = None; + } + + pub fn set_proxying(&mut self, proxying: bool) { + self.proxying = proxying; + } + + pub fn with_proxying(mut self, proxying: bool) -> FormatSupportUpstream { + self.proxying = proxying; + self + } + + pub fn proxying(&self) -> &bool { + &self.proxying + } + + + pub fn set_signature_verification(&mut self, signature_verification: String) { + self.signature_verification = Some(signature_verification); + } + + pub fn with_signature_verification(mut self, signature_verification: String) -> FormatSupportUpstream { + self.signature_verification = Some(signature_verification); + self + } + + pub fn signature_verification(&self) -> Option<&String> { + self.signature_verification.as_ref() + } + + pub fn reset_signature_verification(&mut self) { + self.signature_verification = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/geo_ip_location.rs b/bindings/rust/src/src/models/geo_ip_location.rs new file mode 100644 index 00000000..d54c8efb --- /dev/null +++ b/bindings/rust/src/src/models/geo_ip_location.rs @@ -0,0 +1,156 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct GeoIpLocation { + #[serde(rename = "city")] + city: String, + #[serde(rename = "continent")] + continent: String, + #[serde(rename = "country")] + country: String, + #[serde(rename = "country_code")] + country_code: Option, + #[serde(rename = "latitude")] + latitude: Option, + #[serde(rename = "longitude")] + longitude: Option, + #[serde(rename = "postal_code")] + postal_code: String +} + +impl GeoIpLocation { + pub fn new(city: String, continent: String, country: String, postal_code: String) -> GeoIpLocation { + GeoIpLocation { + city: city, + continent: continent, + country: country, + country_code: None, + latitude: None, + longitude: None, + postal_code: postal_code + } + } + + pub fn set_city(&mut self, city: String) { + self.city = city; + } + + pub fn with_city(mut self, city: String) -> GeoIpLocation { + self.city = city; + self + } + + pub fn city(&self) -> &String { + &self.city + } + + + pub fn set_continent(&mut self, continent: String) { + self.continent = continent; + } + + pub fn with_continent(mut self, continent: String) -> GeoIpLocation { + self.continent = continent; + self + } + + pub fn continent(&self) -> &String { + &self.continent + } + + + pub fn set_country(&mut self, country: String) { + self.country = country; + } + + pub fn with_country(mut self, country: String) -> GeoIpLocation { + self.country = country; + self + } + + pub fn country(&self) -> &String { + &self.country + } + + + pub fn set_country_code(&mut self, country_code: String) { + self.country_code = Some(country_code); + } + + pub fn with_country_code(mut self, country_code: String) -> GeoIpLocation { + self.country_code = Some(country_code); + self + } + + pub fn country_code(&self) -> Option<&String> { + self.country_code.as_ref() + } + + pub fn reset_country_code(&mut self) { + self.country_code = None; + } + + pub fn set_latitude(&mut self, latitude: String) { + self.latitude = Some(latitude); + } + + pub fn with_latitude(mut self, latitude: String) -> GeoIpLocation { + self.latitude = Some(latitude); + self + } + + pub fn latitude(&self) -> Option<&String> { + self.latitude.as_ref() + } + + pub fn reset_latitude(&mut self) { + self.latitude = None; + } + + pub fn set_longitude(&mut self, longitude: String) { + self.longitude = Some(longitude); + } + + pub fn with_longitude(mut self, longitude: String) -> GeoIpLocation { + self.longitude = Some(longitude); + self + } + + pub fn longitude(&self) -> Option<&String> { + self.longitude.as_ref() + } + + pub fn reset_longitude(&mut self) { + self.longitude = None; + } + + pub fn set_postal_code(&mut self, postal_code: String) { + self.postal_code = postal_code; + } + + pub fn with_postal_code(mut self, postal_code: String) -> GeoIpLocation { + self.postal_code = postal_code; + self + } + + pub fn postal_code(&self) -> &String { + &self.postal_code + } + + +} + + + diff --git a/bindings/rust/src/src/models/go_package_upload.rs b/bindings/rust/src/src/models/go_package_upload.rs new file mode 100644 index 00000000..50cc5a92 --- /dev/null +++ b/bindings/rust/src/src/models/go_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct GoPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl GoPackageUpload { + pub fn new() -> GoPackageUpload { + GoPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> GoPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> GoPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> GoPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> GoPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> GoPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> GoPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> GoPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> GoPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> GoPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> GoPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> GoPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> GoPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> GoPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> GoPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> GoPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> GoPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> GoPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> GoPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> GoPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> GoPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> GoPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> GoPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> GoPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> GoPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> GoPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> GoPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> GoPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> GoPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> GoPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> GoPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> GoPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> GoPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> GoPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> GoPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> GoPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> GoPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> GoPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> GoPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> GoPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> GoPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> GoPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> GoPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> GoPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> GoPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> GoPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> GoPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> GoPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> GoPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> GoPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> GoPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> GoPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> GoPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> GoPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> GoPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> GoPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> GoPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> GoPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> GoPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> GoPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> GoPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> GoPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> GoPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> GoPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> GoPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> GoPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> GoPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> GoPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> GoPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> GoPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> GoPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> GoPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> GoPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> GoPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> GoPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> GoPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> GoPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> GoPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> GoPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> GoPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> GoPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/go_package_upload_request.rs b/bindings/rust/src/src/models/go_package_upload_request.rs new file mode 100644 index 00000000..e3ce5a8b --- /dev/null +++ b/bindings/rust/src/src/models/go_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct GoPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl GoPackageUploadRequest { + pub fn new(package_file: String) -> GoPackageUploadRequest { + GoPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> GoPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> GoPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> GoPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/helm_package_upload.rs b/bindings/rust/src/src/models/helm_package_upload.rs new file mode 100644 index 00000000..a8729ebe --- /dev/null +++ b/bindings/rust/src/src/models/helm_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HelmPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl HelmPackageUpload { + pub fn new() -> HelmPackageUpload { + HelmPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> HelmPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> HelmPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> HelmPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> HelmPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> HelmPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> HelmPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> HelmPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> HelmPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> HelmPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> HelmPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> HelmPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> HelmPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> HelmPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> HelmPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> HelmPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> HelmPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> HelmPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> HelmPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> HelmPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> HelmPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> HelmPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> HelmPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> HelmPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> HelmPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> HelmPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> HelmPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> HelmPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> HelmPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> HelmPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> HelmPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> HelmPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> HelmPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> HelmPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> HelmPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> HelmPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> HelmPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> HelmPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> HelmPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> HelmPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> HelmPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> HelmPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> HelmPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> HelmPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> HelmPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> HelmPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> HelmPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> HelmPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> HelmPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> HelmPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> HelmPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> HelmPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> HelmPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> HelmPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> HelmPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> HelmPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> HelmPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> HelmPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> HelmPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> HelmPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> HelmPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> HelmPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> HelmPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> HelmPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> HelmPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> HelmPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> HelmPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> HelmPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> HelmPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> HelmPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> HelmPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> HelmPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> HelmPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> HelmPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> HelmPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> HelmPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> HelmPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> HelmPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> HelmPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> HelmPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> HelmPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/helm_package_upload_request.rs b/bindings/rust/src/src/models/helm_package_upload_request.rs new file mode 100644 index 00000000..488dd171 --- /dev/null +++ b/bindings/rust/src/src/models/helm_package_upload_request.rs @@ -0,0 +1,109 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HelmPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// The provenance file containing the signature for the chart. If one is not provided, it will be generated automatically. + #[serde(rename = "provenance_file")] + provenance_file: Option, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl HelmPackageUploadRequest { + pub fn new(package_file: String) -> HelmPackageUploadRequest { + HelmPackageUploadRequest { + package_file: package_file, + provenance_file: None, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> HelmPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_provenance_file(&mut self, provenance_file: String) { + self.provenance_file = Some(provenance_file); + } + + pub fn with_provenance_file(mut self, provenance_file: String) -> HelmPackageUploadRequest { + self.provenance_file = Some(provenance_file); + self + } + + pub fn provenance_file(&self) -> Option<&String> { + self.provenance_file.as_ref() + } + + pub fn reset_provenance_file(&mut self) { + self.provenance_file = None; + } + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> HelmPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> HelmPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/helm_upstream.rs b/bindings/rust/src/src/models/helm_upstream.rs new file mode 100644 index 00000000..324d4291 --- /dev/null +++ b/bindings/rust/src/src/models/helm_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HelmUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl HelmUpstream { + pub fn new(name: String, upstream_url: String) -> HelmUpstream { + HelmUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> HelmUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> HelmUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> HelmUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> HelmUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> HelmUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> HelmUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> HelmUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> HelmUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> HelmUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> HelmUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> HelmUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> HelmUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> HelmUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> HelmUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> HelmUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> HelmUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> HelmUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> HelmUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/helm_upstream_request.rs b/bindings/rust/src/src/models/helm_upstream_request.rs new file mode 100644 index 00000000..8a8b98cf --- /dev/null +++ b/bindings/rust/src/src/models/helm_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HelmUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl HelmUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> HelmUpstreamRequest { + HelmUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> HelmUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> HelmUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> HelmUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> HelmUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> HelmUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> HelmUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> HelmUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> HelmUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> HelmUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> HelmUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> HelmUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> HelmUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> HelmUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/helm_upstream_request_patch.rs b/bindings/rust/src/src/models/helm_upstream_request_patch.rs new file mode 100644 index 00000000..3ac1dd8b --- /dev/null +++ b/bindings/rust/src/src/models/helm_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HelmUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl HelmUpstreamRequestPatch { + pub fn new() -> HelmUpstreamRequestPatch { + HelmUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> HelmUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> HelmUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> HelmUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> HelmUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> HelmUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> HelmUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> HelmUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> HelmUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> HelmUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> HelmUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> HelmUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> HelmUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> HelmUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/hex_package_upload.rs b/bindings/rust/src/src/models/hex_package_upload.rs new file mode 100644 index 00000000..8ad727a1 --- /dev/null +++ b/bindings/rust/src/src/models/hex_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HexPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl HexPackageUpload { + pub fn new() -> HexPackageUpload { + HexPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> HexPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> HexPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> HexPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> HexPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> HexPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> HexPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> HexPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> HexPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> HexPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> HexPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> HexPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> HexPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> HexPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> HexPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> HexPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> HexPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> HexPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> HexPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> HexPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> HexPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> HexPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> HexPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> HexPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> HexPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> HexPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> HexPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> HexPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> HexPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> HexPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> HexPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> HexPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> HexPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> HexPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> HexPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> HexPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> HexPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> HexPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> HexPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> HexPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> HexPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> HexPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> HexPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> HexPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> HexPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> HexPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> HexPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> HexPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> HexPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> HexPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> HexPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> HexPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> HexPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> HexPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> HexPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> HexPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> HexPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> HexPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> HexPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> HexPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> HexPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> HexPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> HexPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> HexPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> HexPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> HexPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> HexPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> HexPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> HexPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> HexPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> HexPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> HexPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> HexPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> HexPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> HexPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> HexPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> HexPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> HexPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> HexPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> HexPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> HexPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/hex_package_upload_request.rs b/bindings/rust/src/src/models/hex_package_upload_request.rs new file mode 100644 index 00000000..0af87b0c --- /dev/null +++ b/bindings/rust/src/src/models/hex_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HexPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl HexPackageUploadRequest { + pub fn new(package_file: String) -> HexPackageUploadRequest { + HexPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> HexPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> HexPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> HexPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/hex_upstream.rs b/bindings/rust/src/src/models/hex_upstream.rs new file mode 100644 index 00000000..f312ca1f --- /dev/null +++ b/bindings/rust/src/src/models/hex_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HexUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl HexUpstream { + pub fn new(name: String, upstream_url: String) -> HexUpstream { + HexUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> HexUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> HexUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> HexUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> HexUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> HexUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> HexUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> HexUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> HexUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> HexUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> HexUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> HexUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> HexUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> HexUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> HexUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> HexUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> HexUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> HexUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> HexUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/hex_upstream_request.rs b/bindings/rust/src/src/models/hex_upstream_request.rs new file mode 100644 index 00000000..38fead32 --- /dev/null +++ b/bindings/rust/src/src/models/hex_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HexUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl HexUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> HexUpstreamRequest { + HexUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> HexUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> HexUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> HexUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> HexUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> HexUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> HexUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> HexUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> HexUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> HexUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> HexUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> HexUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> HexUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> HexUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/hex_upstream_request_patch.rs b/bindings/rust/src/src/models/hex_upstream_request_patch.rs new file mode 100644 index 00000000..91284343 --- /dev/null +++ b/bindings/rust/src/src/models/hex_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HexUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl HexUpstreamRequestPatch { + pub fn new() -> HexUpstreamRequestPatch { + HexUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> HexUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> HexUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> HexUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> HexUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> HexUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> HexUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> HexUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> HexUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> HexUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> HexUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> HexUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> HexUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> HexUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/history.rs b/bindings/rust/src/src/models/history.rs new file mode 100644 index 00000000..b56c11f1 --- /dev/null +++ b/bindings/rust/src/src/models/history.rs @@ -0,0 +1,133 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct History { + #[serde(rename = "days")] + days: Option, + #[serde(rename = "display")] + display: ::models::HistoryFieldset, + #[serde(rename = "end")] + end: String, + #[serde(rename = "plan")] + plan: String, + #[serde(rename = "raw")] + raw: ::models::HistoryFieldsetRaw, + #[serde(rename = "start")] + start: String +} + +impl History { + pub fn new(display: ::models::HistoryFieldset, end: String, plan: String, raw: ::models::HistoryFieldsetRaw, start: String) -> History { + History { + days: None, + display: display, + end: end, + plan: plan, + raw: raw, + start: start + } + } + + pub fn set_days(&mut self, days: i32) { + self.days = Some(days); + } + + pub fn with_days(mut self, days: i32) -> History { + self.days = Some(days); + self + } + + pub fn days(&self) -> Option<&i32> { + self.days.as_ref() + } + + pub fn reset_days(&mut self) { + self.days = None; + } + + pub fn set_display(&mut self, display: ::models::HistoryFieldset) { + self.display = display; + } + + pub fn with_display(mut self, display: ::models::HistoryFieldset) -> History { + self.display = display; + self + } + + pub fn display(&self) -> &::models::HistoryFieldset { + &self.display + } + + + pub fn set_end(&mut self, end: String) { + self.end = end; + } + + pub fn with_end(mut self, end: String) -> History { + self.end = end; + self + } + + pub fn end(&self) -> &String { + &self.end + } + + + pub fn set_plan(&mut self, plan: String) { + self.plan = plan; + } + + pub fn with_plan(mut self, plan: String) -> History { + self.plan = plan; + self + } + + pub fn plan(&self) -> &String { + &self.plan + } + + + pub fn set_raw(&mut self, raw: ::models::HistoryFieldsetRaw) { + self.raw = raw; + } + + pub fn with_raw(mut self, raw: ::models::HistoryFieldsetRaw) -> History { + self.raw = raw; + self + } + + pub fn raw(&self) -> &::models::HistoryFieldsetRaw { + &self.raw + } + + + pub fn set_start(&mut self, start: String) { + self.start = start; + } + + pub fn with_start(mut self, start: String) -> History { + self.start = start; + self + } + + pub fn start(&self) -> &String { + &self.start + } + + +} + + + diff --git a/bindings/rust/src/src/models/history_fieldset.rs b/bindings/rust/src/src/models/history_fieldset.rs new file mode 100644 index 00000000..eb3303b5 --- /dev/null +++ b/bindings/rust/src/src/models/history_fieldset.rs @@ -0,0 +1,79 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HistoryFieldset { + #[serde(rename = "downloaded")] + downloaded: ::models::Usage, + #[serde(rename = "storage_used")] + storage_used: ::models::StorageUsage, + #[serde(rename = "uploaded")] + uploaded: ::models::Usage +} + +impl HistoryFieldset { + pub fn new(downloaded: ::models::Usage, storage_used: ::models::StorageUsage, uploaded: ::models::Usage) -> HistoryFieldset { + HistoryFieldset { + downloaded: downloaded, + storage_used: storage_used, + uploaded: uploaded + } + } + + pub fn set_downloaded(&mut self, downloaded: ::models::Usage) { + self.downloaded = downloaded; + } + + pub fn with_downloaded(mut self, downloaded: ::models::Usage) -> HistoryFieldset { + self.downloaded = downloaded; + self + } + + pub fn downloaded(&self) -> &::models::Usage { + &self.downloaded + } + + + pub fn set_storage_used(&mut self, storage_used: ::models::StorageUsage) { + self.storage_used = storage_used; + } + + pub fn with_storage_used(mut self, storage_used: ::models::StorageUsage) -> HistoryFieldset { + self.storage_used = storage_used; + self + } + + pub fn storage_used(&self) -> &::models::StorageUsage { + &self.storage_used + } + + + pub fn set_uploaded(&mut self, uploaded: ::models::Usage) { + self.uploaded = uploaded; + } + + pub fn with_uploaded(mut self, uploaded: ::models::Usage) -> HistoryFieldset { + self.uploaded = uploaded; + self + } + + pub fn uploaded(&self) -> &::models::Usage { + &self.uploaded + } + + +} + + + diff --git a/bindings/rust/src/src/models/history_fieldset_raw.rs b/bindings/rust/src/src/models/history_fieldset_raw.rs new file mode 100644 index 00000000..970da6d4 --- /dev/null +++ b/bindings/rust/src/src/models/history_fieldset_raw.rs @@ -0,0 +1,79 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HistoryFieldsetRaw { + #[serde(rename = "downloaded")] + downloaded: ::models::UsageRaw, + #[serde(rename = "storage_used")] + storage_used: ::models::StorageUsageRaw, + #[serde(rename = "uploaded")] + uploaded: ::models::UsageRaw +} + +impl HistoryFieldsetRaw { + pub fn new(downloaded: ::models::UsageRaw, storage_used: ::models::StorageUsageRaw, uploaded: ::models::UsageRaw) -> HistoryFieldsetRaw { + HistoryFieldsetRaw { + downloaded: downloaded, + storage_used: storage_used, + uploaded: uploaded + } + } + + pub fn set_downloaded(&mut self, downloaded: ::models::UsageRaw) { + self.downloaded = downloaded; + } + + pub fn with_downloaded(mut self, downloaded: ::models::UsageRaw) -> HistoryFieldsetRaw { + self.downloaded = downloaded; + self + } + + pub fn downloaded(&self) -> &::models::UsageRaw { + &self.downloaded + } + + + pub fn set_storage_used(&mut self, storage_used: ::models::StorageUsageRaw) { + self.storage_used = storage_used; + } + + pub fn with_storage_used(mut self, storage_used: ::models::StorageUsageRaw) -> HistoryFieldsetRaw { + self.storage_used = storage_used; + self + } + + pub fn storage_used(&self) -> &::models::StorageUsageRaw { + &self.storage_used + } + + + pub fn set_uploaded(&mut self, uploaded: ::models::UsageRaw) { + self.uploaded = uploaded; + } + + pub fn with_uploaded(mut self, uploaded: ::models::UsageRaw) -> HistoryFieldsetRaw { + self.uploaded = uploaded; + self + } + + pub fn uploaded(&self) -> &::models::UsageRaw { + &self.uploaded + } + + +} + + + diff --git a/bindings/rust/src/src/models/luarocks_package_upload.rs b/bindings/rust/src/src/models/luarocks_package_upload.rs new file mode 100644 index 00000000..93020d51 --- /dev/null +++ b/bindings/rust/src/src/models/luarocks_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct LuarocksPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl LuarocksPackageUpload { + pub fn new() -> LuarocksPackageUpload { + LuarocksPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> LuarocksPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> LuarocksPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> LuarocksPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> LuarocksPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> LuarocksPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> LuarocksPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> LuarocksPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> LuarocksPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> LuarocksPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> LuarocksPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> LuarocksPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> LuarocksPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> LuarocksPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> LuarocksPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> LuarocksPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> LuarocksPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> LuarocksPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> LuarocksPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> LuarocksPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> LuarocksPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> LuarocksPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> LuarocksPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> LuarocksPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> LuarocksPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> LuarocksPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> LuarocksPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> LuarocksPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> LuarocksPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> LuarocksPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> LuarocksPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> LuarocksPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> LuarocksPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> LuarocksPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> LuarocksPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> LuarocksPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> LuarocksPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> LuarocksPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> LuarocksPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> LuarocksPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> LuarocksPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> LuarocksPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> LuarocksPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> LuarocksPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> LuarocksPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> LuarocksPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> LuarocksPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> LuarocksPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> LuarocksPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> LuarocksPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> LuarocksPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> LuarocksPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> LuarocksPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> LuarocksPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> LuarocksPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> LuarocksPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> LuarocksPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> LuarocksPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> LuarocksPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> LuarocksPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> LuarocksPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> LuarocksPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> LuarocksPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> LuarocksPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> LuarocksPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> LuarocksPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> LuarocksPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> LuarocksPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> LuarocksPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> LuarocksPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> LuarocksPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> LuarocksPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> LuarocksPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> LuarocksPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> LuarocksPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> LuarocksPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> LuarocksPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> LuarocksPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> LuarocksPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> LuarocksPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> LuarocksPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/luarocks_package_upload_request.rs b/bindings/rust/src/src/models/luarocks_package_upload_request.rs new file mode 100644 index 00000000..3074869a --- /dev/null +++ b/bindings/rust/src/src/models/luarocks_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct LuarocksPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl LuarocksPackageUploadRequest { + pub fn new(package_file: String) -> LuarocksPackageUploadRequest { + LuarocksPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> LuarocksPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> LuarocksPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> LuarocksPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/maven_package_upload.rs b/bindings/rust/src/src/models/maven_package_upload.rs new file mode 100644 index 00000000..5c01081a --- /dev/null +++ b/bindings/rust/src/src/models/maven_package_upload.rs @@ -0,0 +1,1757 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct MavenPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + /// The ID of the artifact. + #[serde(rename = "artifact_id")] + artifact_id: Option, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Artifact's group ID. + #[serde(rename = "group_id")] + group_id: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Artifact's Maven packaging type. + #[serde(rename = "packaging")] + packaging: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + #[serde(rename = "sbt_version")] + sbt_version: Option, + #[serde(rename = "scala_version")] + scala_version: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl MavenPackageUpload { + pub fn new() -> MavenPackageUpload { + MavenPackageUpload { + architectures: None, + artifact_id: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + group_id: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + packaging: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + sbt_version: None, + scala_version: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> MavenPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_artifact_id(&mut self, artifact_id: String) { + self.artifact_id = Some(artifact_id); + } + + pub fn with_artifact_id(mut self, artifact_id: String) -> MavenPackageUpload { + self.artifact_id = Some(artifact_id); + self + } + + pub fn artifact_id(&self) -> Option<&String> { + self.artifact_id.as_ref() + } + + pub fn reset_artifact_id(&mut self) { + self.artifact_id = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> MavenPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> MavenPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> MavenPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> MavenPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> MavenPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> MavenPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> MavenPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> MavenPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> MavenPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> MavenPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> MavenPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> MavenPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> MavenPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> MavenPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> MavenPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> MavenPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> MavenPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> MavenPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> MavenPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> MavenPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_group_id(&mut self, group_id: String) { + self.group_id = Some(group_id); + } + + pub fn with_group_id(mut self, group_id: String) -> MavenPackageUpload { + self.group_id = Some(group_id); + self + } + + pub fn group_id(&self) -> Option<&String> { + self.group_id.as_ref() + } + + pub fn reset_group_id(&mut self) { + self.group_id = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> MavenPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> MavenPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> MavenPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> MavenPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> MavenPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> MavenPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> MavenPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> MavenPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> MavenPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> MavenPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> MavenPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> MavenPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> MavenPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> MavenPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> MavenPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> MavenPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> MavenPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> MavenPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> MavenPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> MavenPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> MavenPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> MavenPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> MavenPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> MavenPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> MavenPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_packaging(&mut self, packaging: String) { + self.packaging = Some(packaging); + } + + pub fn with_packaging(mut self, packaging: String) -> MavenPackageUpload { + self.packaging = Some(packaging); + self + } + + pub fn packaging(&self) -> Option<&String> { + self.packaging.as_ref() + } + + pub fn reset_packaging(&mut self) { + self.packaging = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> MavenPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> MavenPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> MavenPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> MavenPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_sbt_version(&mut self, sbt_version: String) { + self.sbt_version = Some(sbt_version); + } + + pub fn with_sbt_version(mut self, sbt_version: String) -> MavenPackageUpload { + self.sbt_version = Some(sbt_version); + self + } + + pub fn sbt_version(&self) -> Option<&String> { + self.sbt_version.as_ref() + } + + pub fn reset_sbt_version(&mut self) { + self.sbt_version = None; + } + + pub fn set_scala_version(&mut self, scala_version: String) { + self.scala_version = Some(scala_version); + } + + pub fn with_scala_version(mut self, scala_version: String) -> MavenPackageUpload { + self.scala_version = Some(scala_version); + self + } + + pub fn scala_version(&self) -> Option<&String> { + self.scala_version.as_ref() + } + + pub fn reset_scala_version(&mut self) { + self.scala_version = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> MavenPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> MavenPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> MavenPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> MavenPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> MavenPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> MavenPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> MavenPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> MavenPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> MavenPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> MavenPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> MavenPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> MavenPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> MavenPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> MavenPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> MavenPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> MavenPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> MavenPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> MavenPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> MavenPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> MavenPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> MavenPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> MavenPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> MavenPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> MavenPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> MavenPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> MavenPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> MavenPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> MavenPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> MavenPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> MavenPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/maven_package_upload_request.rs b/bindings/rust/src/src/models/maven_package_upload_request.rs new file mode 100644 index 00000000..68916608 --- /dev/null +++ b/bindings/rust/src/src/models/maven_package_upload_request.rs @@ -0,0 +1,317 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct MavenPackageUploadRequest { + /// The ID of the artifact. + #[serde(rename = "artifact_id")] + artifact_id: Option, + /// Artifact's group ID. + #[serde(rename = "group_id")] + group_id: Option, + /// The ivy file is an XML file describing the dependencies of the project. + #[serde(rename = "ivy_file")] + ivy_file: Option, + /// Adds bundled Java documentation to the Maven package + #[serde(rename = "javadoc_file")] + javadoc_file: Option, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// Artifact's Maven packaging type. + #[serde(rename = "packaging")] + packaging: Option, + /// The POM file is an XML file containing the Maven coordinates. + #[serde(rename = "pom_file")] + pom_file: Option, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + #[serde(rename = "sbt_version")] + sbt_version: Option, + #[serde(rename = "scala_version")] + scala_version: Option, + /// Adds bundled Java source code to the Maven package. + #[serde(rename = "sources_file")] + sources_file: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option, + /// Adds bundled Java tests to the Maven package. + #[serde(rename = "tests_file")] + tests_file: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option +} + +impl MavenPackageUploadRequest { + pub fn new(package_file: String) -> MavenPackageUploadRequest { + MavenPackageUploadRequest { + artifact_id: None, + group_id: None, + ivy_file: None, + javadoc_file: None, + package_file: package_file, + packaging: None, + pom_file: None, + republish: None, + sbt_version: None, + scala_version: None, + sources_file: None, + tags: None, + tests_file: None, + version: None + } + } + + pub fn set_artifact_id(&mut self, artifact_id: String) { + self.artifact_id = Some(artifact_id); + } + + pub fn with_artifact_id(mut self, artifact_id: String) -> MavenPackageUploadRequest { + self.artifact_id = Some(artifact_id); + self + } + + pub fn artifact_id(&self) -> Option<&String> { + self.artifact_id.as_ref() + } + + pub fn reset_artifact_id(&mut self) { + self.artifact_id = None; + } + + pub fn set_group_id(&mut self, group_id: String) { + self.group_id = Some(group_id); + } + + pub fn with_group_id(mut self, group_id: String) -> MavenPackageUploadRequest { + self.group_id = Some(group_id); + self + } + + pub fn group_id(&self) -> Option<&String> { + self.group_id.as_ref() + } + + pub fn reset_group_id(&mut self) { + self.group_id = None; + } + + pub fn set_ivy_file(&mut self, ivy_file: String) { + self.ivy_file = Some(ivy_file); + } + + pub fn with_ivy_file(mut self, ivy_file: String) -> MavenPackageUploadRequest { + self.ivy_file = Some(ivy_file); + self + } + + pub fn ivy_file(&self) -> Option<&String> { + self.ivy_file.as_ref() + } + + pub fn reset_ivy_file(&mut self) { + self.ivy_file = None; + } + + pub fn set_javadoc_file(&mut self, javadoc_file: String) { + self.javadoc_file = Some(javadoc_file); + } + + pub fn with_javadoc_file(mut self, javadoc_file: String) -> MavenPackageUploadRequest { + self.javadoc_file = Some(javadoc_file); + self + } + + pub fn javadoc_file(&self) -> Option<&String> { + self.javadoc_file.as_ref() + } + + pub fn reset_javadoc_file(&mut self) { + self.javadoc_file = None; + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> MavenPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_packaging(&mut self, packaging: String) { + self.packaging = Some(packaging); + } + + pub fn with_packaging(mut self, packaging: String) -> MavenPackageUploadRequest { + self.packaging = Some(packaging); + self + } + + pub fn packaging(&self) -> Option<&String> { + self.packaging.as_ref() + } + + pub fn reset_packaging(&mut self) { + self.packaging = None; + } + + pub fn set_pom_file(&mut self, pom_file: String) { + self.pom_file = Some(pom_file); + } + + pub fn with_pom_file(mut self, pom_file: String) -> MavenPackageUploadRequest { + self.pom_file = Some(pom_file); + self + } + + pub fn pom_file(&self) -> Option<&String> { + self.pom_file.as_ref() + } + + pub fn reset_pom_file(&mut self) { + self.pom_file = None; + } + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> MavenPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_sbt_version(&mut self, sbt_version: String) { + self.sbt_version = Some(sbt_version); + } + + pub fn with_sbt_version(mut self, sbt_version: String) -> MavenPackageUploadRequest { + self.sbt_version = Some(sbt_version); + self + } + + pub fn sbt_version(&self) -> Option<&String> { + self.sbt_version.as_ref() + } + + pub fn reset_sbt_version(&mut self) { + self.sbt_version = None; + } + + pub fn set_scala_version(&mut self, scala_version: String) { + self.scala_version = Some(scala_version); + } + + pub fn with_scala_version(mut self, scala_version: String) -> MavenPackageUploadRequest { + self.scala_version = Some(scala_version); + self + } + + pub fn scala_version(&self) -> Option<&String> { + self.scala_version.as_ref() + } + + pub fn reset_scala_version(&mut self) { + self.scala_version = None; + } + + pub fn set_sources_file(&mut self, sources_file: String) { + self.sources_file = Some(sources_file); + } + + pub fn with_sources_file(mut self, sources_file: String) -> MavenPackageUploadRequest { + self.sources_file = Some(sources_file); + self + } + + pub fn sources_file(&self) -> Option<&String> { + self.sources_file.as_ref() + } + + pub fn reset_sources_file(&mut self) { + self.sources_file = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> MavenPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_tests_file(&mut self, tests_file: String) { + self.tests_file = Some(tests_file); + } + + pub fn with_tests_file(mut self, tests_file: String) -> MavenPackageUploadRequest { + self.tests_file = Some(tests_file); + self + } + + pub fn tests_file(&self) -> Option<&String> { + self.tests_file.as_ref() + } + + pub fn reset_tests_file(&mut self) { + self.tests_file = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> MavenPackageUploadRequest { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/maven_upstream.rs b/bindings/rust/src/src/models/maven_upstream.rs new file mode 100644 index 00000000..0a68d938 --- /dev/null +++ b/bindings/rust/src/src/models/maven_upstream.rs @@ -0,0 +1,481 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct MavenUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// The signature verification status for this upstream. + #[serde(rename = "verification_status")] + verification_status: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl MavenUpstream { + pub fn new(name: String, upstream_url: String) -> MavenUpstream { + MavenUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verification_status: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> MavenUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> MavenUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> MavenUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> MavenUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> MavenUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> MavenUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> MavenUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> MavenUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> MavenUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> MavenUpstream { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> MavenUpstream { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> MavenUpstream { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> MavenUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> MavenUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> MavenUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> MavenUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> MavenUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> MavenUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> MavenUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> MavenUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verification_status(&mut self, verification_status: String) { + self.verification_status = Some(verification_status); + } + + pub fn with_verification_status(mut self, verification_status: String) -> MavenUpstream { + self.verification_status = Some(verification_status); + self + } + + pub fn verification_status(&self) -> Option<&String> { + self.verification_status.as_ref() + } + + pub fn reset_verification_status(&mut self) { + self.verification_status = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> MavenUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/maven_upstream_request.rs b/bindings/rust/src/src/models/maven_upstream_request.rs new file mode 100644 index 00000000..79902f58 --- /dev/null +++ b/bindings/rust/src/src/models/maven_upstream_request.rs @@ -0,0 +1,358 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct MavenUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl MavenUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> MavenUpstreamRequest { + MavenUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> MavenUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> MavenUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> MavenUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> MavenUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> MavenUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> MavenUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> MavenUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> MavenUpstreamRequest { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> MavenUpstreamRequest { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> MavenUpstreamRequest { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> MavenUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> MavenUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> MavenUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> MavenUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> MavenUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> MavenUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/maven_upstream_request_patch.rs b/bindings/rust/src/src/models/maven_upstream_request_patch.rs new file mode 100644 index 00000000..ddd01ab9 --- /dev/null +++ b/bindings/rust/src/src/models/maven_upstream_request_patch.rs @@ -0,0 +1,364 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct MavenUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl MavenUpstreamRequestPatch { + pub fn new() -> MavenUpstreamRequestPatch { + MavenUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> MavenUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> MavenUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> MavenUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> MavenUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> MavenUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> MavenUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> MavenUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> MavenUpstreamRequestPatch { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> MavenUpstreamRequestPatch { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> MavenUpstreamRequestPatch { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> MavenUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> MavenUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> MavenUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> MavenUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> MavenUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> MavenUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/mod.rs b/bindings/rust/src/src/models/mod.rs new file mode 100644 index 00000000..1f6548e5 --- /dev/null +++ b/bindings/rust/src/src/models/mod.rs @@ -0,0 +1,511 @@ +mod allocated_limit; +pub use self::allocated_limit::AllocatedLimit; +mod allocated_limit_raw; +pub use self::allocated_limit_raw::AllocatedLimitRaw; +mod alpine_package_upload; +pub use self::alpine_package_upload::AlpinePackageUpload; +mod alpine_package_upload_request; +pub use self::alpine_package_upload_request::AlpinePackageUploadRequest; +mod architecture; +pub use self::architecture::Architecture; +mod cargo_package_upload; +pub use self::cargo_package_upload::CargoPackageUpload; +mod cargo_package_upload_request; +pub use self::cargo_package_upload_request::CargoPackageUploadRequest; +mod cocoapods_package_upload; +pub use self::cocoapods_package_upload::CocoapodsPackageUpload; +mod cocoapods_package_upload_request; +pub use self::cocoapods_package_upload_request::CocoapodsPackageUploadRequest; +mod common_bandwidth_metrics; +pub use self::common_bandwidth_metrics::CommonBandwidthMetrics; +mod common_bandwidth_metrics_value; +pub use self::common_bandwidth_metrics_value::CommonBandwidthMetricsValue; +mod common_downloads_metrics; +pub use self::common_downloads_metrics::CommonDownloadsMetrics; +mod common_downloads_metrics_value; +pub use self::common_downloads_metrics_value::CommonDownloadsMetricsValue; +mod common_metrics; +pub use self::common_metrics::CommonMetrics; +mod composer_package_upload; +pub use self::composer_package_upload::ComposerPackageUpload; +mod composer_package_upload_request; +pub use self::composer_package_upload_request::ComposerPackageUploadRequest; +mod composer_upstream; +pub use self::composer_upstream::ComposerUpstream; +mod composer_upstream_request; +pub use self::composer_upstream_request::ComposerUpstreamRequest; +mod composer_upstream_request_patch; +pub use self::composer_upstream_request_patch::ComposerUpstreamRequestPatch; +mod conan_package_upload; +pub use self::conan_package_upload::ConanPackageUpload; +mod conan_package_upload_request; +pub use self::conan_package_upload_request::ConanPackageUploadRequest; +mod conda_package_upload; +pub use self::conda_package_upload::CondaPackageUpload; +mod conda_package_upload_request; +pub use self::conda_package_upload_request::CondaPackageUploadRequest; +mod cran_package_upload; +pub use self::cran_package_upload::CranPackageUpload; +mod cran_package_upload_request; +pub use self::cran_package_upload_request::CranPackageUploadRequest; +mod cran_upstream; +pub use self::cran_upstream::CranUpstream; +mod cran_upstream_request; +pub use self::cran_upstream_request::CranUpstreamRequest; +mod cran_upstream_request_patch; +pub use self::cran_upstream_request_patch::CranUpstreamRequestPatch; +mod dart_package_upload; +pub use self::dart_package_upload::DartPackageUpload; +mod dart_package_upload_request; +pub use self::dart_package_upload_request::DartPackageUploadRequest; +mod dart_upstream; +pub use self::dart_upstream::DartUpstream; +mod dart_upstream_request; +pub use self::dart_upstream_request::DartUpstreamRequest; +mod dart_upstream_request_patch; +pub use self::dart_upstream_request_patch::DartUpstreamRequestPatch; +mod deb_package_upload; +pub use self::deb_package_upload::DebPackageUpload; +mod deb_package_upload_request; +pub use self::deb_package_upload_request::DebPackageUploadRequest; +mod deb_upstream; +pub use self::deb_upstream::DebUpstream; +mod deb_upstream_request; +pub use self::deb_upstream_request::DebUpstreamRequest; +mod deb_upstream_request_patch; +pub use self::deb_upstream_request_patch::DebUpstreamRequestPatch; +mod distribution; +pub use self::distribution::Distribution; +mod distribution_full; +pub use self::distribution_full::DistributionFull; +mod distribution_version; +pub use self::distribution_version::DistributionVersion; +mod docker_package_upload; +pub use self::docker_package_upload::DockerPackageUpload; +mod docker_package_upload_request; +pub use self::docker_package_upload_request::DockerPackageUploadRequest; +mod docker_upstream; +pub use self::docker_upstream::DockerUpstream; +mod docker_upstream_request; +pub use self::docker_upstream_request::DockerUpstreamRequest; +mod docker_upstream_request_patch; +pub use self::docker_upstream_request_patch::DockerUpstreamRequestPatch; +mod entitlement_usage_metrics; +pub use self::entitlement_usage_metrics::EntitlementUsageMetrics; +mod error_detail; +pub use self::error_detail::ErrorDetail; +mod eula; +pub use self::eula::Eula; +mod format; +pub use self::format::Format; +mod format_support; +pub use self::format_support::FormatSupport; +mod format_support_upstream; +pub use self::format_support_upstream::FormatSupportUpstream; +mod geo_ip_location; +pub use self::geo_ip_location::GeoIpLocation; +mod go_package_upload; +pub use self::go_package_upload::GoPackageUpload; +mod go_package_upload_request; +pub use self::go_package_upload_request::GoPackageUploadRequest; +mod helm_package_upload; +pub use self::helm_package_upload::HelmPackageUpload; +mod helm_package_upload_request; +pub use self::helm_package_upload_request::HelmPackageUploadRequest; +mod helm_upstream; +pub use self::helm_upstream::HelmUpstream; +mod helm_upstream_request; +pub use self::helm_upstream_request::HelmUpstreamRequest; +mod helm_upstream_request_patch; +pub use self::helm_upstream_request_patch::HelmUpstreamRequestPatch; +mod hex_package_upload; +pub use self::hex_package_upload::HexPackageUpload; +mod hex_package_upload_request; +pub use self::hex_package_upload_request::HexPackageUploadRequest; +mod hex_upstream; +pub use self::hex_upstream::HexUpstream; +mod hex_upstream_request; +pub use self::hex_upstream_request::HexUpstreamRequest; +mod hex_upstream_request_patch; +pub use self::hex_upstream_request_patch::HexUpstreamRequestPatch; +mod history; +pub use self::history::History; +mod history_fieldset; +pub use self::history_fieldset::HistoryFieldset; +mod history_fieldset_raw; +pub use self::history_fieldset_raw::HistoryFieldsetRaw; +mod luarocks_package_upload; +pub use self::luarocks_package_upload::LuarocksPackageUpload; +mod luarocks_package_upload_request; +pub use self::luarocks_package_upload_request::LuarocksPackageUploadRequest; +mod maven_package_upload; +pub use self::maven_package_upload::MavenPackageUpload; +mod maven_package_upload_request; +pub use self::maven_package_upload_request::MavenPackageUploadRequest; +mod maven_upstream; +pub use self::maven_upstream::MavenUpstream; +mod maven_upstream_request; +pub use self::maven_upstream_request::MavenUpstreamRequest; +mod maven_upstream_request_patch; +pub use self::maven_upstream_request_patch::MavenUpstreamRequestPatch; +mod namespace; +pub use self::namespace::Namespace; +mod namespace_audit_log; +pub use self::namespace_audit_log::NamespaceAuditLog; +mod nested_license_policy; +pub use self::nested_license_policy::NestedLicensePolicy; +mod nested_vulnerability_policy; +pub use self::nested_vulnerability_policy::NestedVulnerabilityPolicy; +mod nested_vulnerability_scan_results; +pub use self::nested_vulnerability_scan_results::NestedVulnerabilityScanResults; +mod npm_package_upload; +pub use self::npm_package_upload::NpmPackageUpload; +mod npm_package_upload_request; +pub use self::npm_package_upload_request::NpmPackageUploadRequest; +mod npm_upstream; +pub use self::npm_upstream::NpmUpstream; +mod npm_upstream_request; +pub use self::npm_upstream_request::NpmUpstreamRequest; +mod npm_upstream_request_patch; +pub use self::npm_upstream_request_patch::NpmUpstreamRequestPatch; +mod nuget_package_upload; +pub use self::nuget_package_upload::NugetPackageUpload; +mod nuget_package_upload_request; +pub use self::nuget_package_upload_request::NugetPackageUploadRequest; +mod nuget_upstream; +pub use self::nuget_upstream::NugetUpstream; +mod nuget_upstream_request; +pub use self::nuget_upstream_request::NugetUpstreamRequest; +mod nuget_upstream_request_patch; +pub use self::nuget_upstream_request_patch::NugetUpstreamRequestPatch; +mod organization; +pub use self::organization::Organization; +mod organization_group_sync; +pub use self::organization_group_sync::OrganizationGroupSync; +mod organization_group_sync_request; +pub use self::organization_group_sync_request::OrganizationGroupSyncRequest; +mod organization_group_sync_status; +pub use self::organization_group_sync_status::OrganizationGroupSyncStatus; +mod organization_invite; +pub use self::organization_invite::OrganizationInvite; +mod organization_invite_extend; +pub use self::organization_invite_extend::OrganizationInviteExtend; +mod organization_invite_request; +pub use self::organization_invite_request::OrganizationInviteRequest; +mod organization_invite_update; +pub use self::organization_invite_update::OrganizationInviteUpdate; +mod organization_invite_update_request_patch; +pub use self::organization_invite_update_request_patch::OrganizationInviteUpdateRequestPatch; +mod organization_membership; +pub use self::organization_membership::OrganizationMembership; +mod organization_membership_request_patch; +pub use self::organization_membership_request_patch::OrganizationMembershipRequestPatch; +mod organization_membership_role_update; +pub use self::organization_membership_role_update::OrganizationMembershipRoleUpdate; +mod organization_membership_role_update_request_patch; +pub use self::organization_membership_role_update_request_patch::OrganizationMembershipRoleUpdateRequestPatch; +mod organization_membership_visibility_update; +pub use self::organization_membership_visibility_update::OrganizationMembershipVisibilityUpdate; +mod organization_membership_visibility_update_request_patch; +pub use self::organization_membership_visibility_update_request_patch::OrganizationMembershipVisibilityUpdateRequestPatch; +mod organization_package_license_policy; +pub use self::organization_package_license_policy::OrganizationPackageLicensePolicy; +mod organization_package_license_policy_request; +pub use self::organization_package_license_policy_request::OrganizationPackageLicensePolicyRequest; +mod organization_package_license_policy_request_patch; +pub use self::organization_package_license_policy_request_patch::OrganizationPackageLicensePolicyRequestPatch; +mod organization_package_vulnerability_policy; +pub use self::organization_package_vulnerability_policy::OrganizationPackageVulnerabilityPolicy; +mod organization_package_vulnerability_policy_request; +pub use self::organization_package_vulnerability_policy_request::OrganizationPackageVulnerabilityPolicyRequest; +mod organization_package_vulnerability_policy_request_patch; +pub use self::organization_package_vulnerability_policy_request_patch::OrganizationPackageVulnerabilityPolicyRequestPatch; +mod organization_saml_auth; +pub use self::organization_saml_auth::OrganizationSamlAuth; +mod organization_saml_auth_request_patch; +pub use self::organization_saml_auth_request_patch::OrganizationSamlAuthRequestPatch; +mod organization_team; +pub use self::organization_team::OrganizationTeam; +mod organization_team_invite; +pub use self::organization_team_invite::OrganizationTeamInvite; +mod organization_team_members; +pub use self::organization_team_members::OrganizationTeamMembers; +mod organization_team_membership; +pub use self::organization_team_membership::OrganizationTeamMembership; +mod organization_team_request; +pub use self::organization_team_request::OrganizationTeamRequest; +mod organization_team_request_patch; +pub use self::organization_team_request_patch::OrganizationTeamRequestPatch; +mod p2_package_upload; +pub use self::p2_package_upload::P2PackageUpload; +mod p2_package_upload_request; +pub use self::p2_package_upload_request::P2PackageUploadRequest; +mod package; +pub use self::package::Package; +mod package_copy; +pub use self::package_copy::PackageCopy; +mod package_copy_request; +pub use self::package_copy_request::PackageCopyRequest; +mod package_deny_policy; +pub use self::package_deny_policy::PackageDenyPolicy; +mod package_deny_policy_request; +pub use self::package_deny_policy_request::PackageDenyPolicyRequest; +mod package_deny_policy_request_patch; +pub use self::package_deny_policy_request_patch::PackageDenyPolicyRequestPatch; +mod package_dependencies; +pub use self::package_dependencies::PackageDependencies; +mod package_dependency; +pub use self::package_dependency::PackageDependency; +mod package_file; +pub use self::package_file::PackageFile; +mod package_file_parts_upload; +pub use self::package_file_parts_upload::PackageFilePartsUpload; +mod package_file_upload; +pub use self::package_file_upload::PackageFileUpload; +mod package_file_upload_request; +pub use self::package_file_upload_request::PackageFileUploadRequest; +mod package_license_policy_evaluation_request; +pub use self::package_license_policy_evaluation_request::PackageLicensePolicyEvaluationRequest; +mod package_license_policy_evaluation_request_request; +pub use self::package_license_policy_evaluation_request_request::PackageLicensePolicyEvaluationRequestRequest; +mod package_license_policy_violation_log; +pub use self::package_license_policy_violation_log::PackageLicensePolicyViolationLog; +mod package_license_policy_violation_log_cursor_page; +pub use self::package_license_policy_violation_log_cursor_page::PackageLicensePolicyViolationLogCursorPage; +mod package_move; +pub use self::package_move::PackageMove; +mod package_move_request; +pub use self::package_move_request::PackageMoveRequest; +mod package_quarantine; +pub use self::package_quarantine::PackageQuarantine; +mod package_quarantine_request; +pub use self::package_quarantine_request::PackageQuarantineRequest; +mod package_resync; +pub use self::package_resync::PackageResync; +mod package_status; +pub use self::package_status::PackageStatus; +mod package_tag; +pub use self::package_tag::PackageTag; +mod package_tag_request; +pub use self::package_tag_request::PackageTagRequest; +mod package_usage_metrics; +pub use self::package_usage_metrics::PackageUsageMetrics; +mod package_version_badge; +pub use self::package_version_badge::PackageVersionBadge; +mod package_vulnerability; +pub use self::package_vulnerability::PackageVulnerability; +mod package_vulnerability_policy_evaluation_request; +pub use self::package_vulnerability_policy_evaluation_request::PackageVulnerabilityPolicyEvaluationRequest; +mod package_vulnerability_policy_evaluation_request_request; +pub use self::package_vulnerability_policy_evaluation_request_request::PackageVulnerabilityPolicyEvaluationRequestRequest; +mod package_vulnerability_policy_violation_log; +pub use self::package_vulnerability_policy_violation_log::PackageVulnerabilityPolicyViolationLog; +mod package_vulnerability_policy_violation_log_cursor_page; +pub use self::package_vulnerability_policy_violation_log_cursor_page::PackageVulnerabilityPolicyViolationLogCursorPage; +mod provider_settings; +pub use self::provider_settings::ProviderSettings; +mod provider_settings_request; +pub use self::provider_settings_request::ProviderSettingsRequest; +mod provider_settings_request_patch; +pub use self::provider_settings_request_patch::ProviderSettingsRequestPatch; +mod python_package_upload; +pub use self::python_package_upload::PythonPackageUpload; +mod python_package_upload_request; +pub use self::python_package_upload_request::PythonPackageUploadRequest; +mod python_upstream; +pub use self::python_upstream::PythonUpstream; +mod python_upstream_request; +pub use self::python_upstream_request::PythonUpstreamRequest; +mod python_upstream_request_patch; +pub use self::python_upstream_request_patch::PythonUpstreamRequestPatch; +mod quota; +pub use self::quota::Quota; +mod quota_history; +pub use self::quota_history::QuotaHistory; +mod rate_check; +pub use self::rate_check::RateCheck; +mod raw_package_upload; +pub use self::raw_package_upload::RawPackageUpload; +mod raw_package_upload_request; +pub use self::raw_package_upload_request::RawPackageUploadRequest; +mod repository; +pub use self::repository::Repository; +mod repository_audit_log; +pub use self::repository_audit_log::RepositoryAuditLog; +mod repository_create; +pub use self::repository_create::RepositoryCreate; +mod repository_create_request; +pub use self::repository_create_request::RepositoryCreateRequest; +mod repository_ecdsa_key; +pub use self::repository_ecdsa_key::RepositoryEcdsaKey; +mod repository_ecdsa_key_create; +pub use self::repository_ecdsa_key_create::RepositoryEcdsaKeyCreate; +mod repository_geo_ip_cidr; +pub use self::repository_geo_ip_cidr::RepositoryGeoIpCidr; +mod repository_geo_ip_country_code; +pub use self::repository_geo_ip_country_code::RepositoryGeoIpCountryCode; +mod repository_geo_ip_rules; +pub use self::repository_geo_ip_rules::RepositoryGeoIpRules; +mod repository_geo_ip_rules_request; +pub use self::repository_geo_ip_rules_request::RepositoryGeoIpRulesRequest; +mod repository_geo_ip_rules_request_patch; +pub use self::repository_geo_ip_rules_request_patch::RepositoryGeoIpRulesRequestPatch; +mod repository_geo_ip_status; +pub use self::repository_geo_ip_status::RepositoryGeoIpStatus; +mod repository_geo_ip_test_address; +pub use self::repository_geo_ip_test_address::RepositoryGeoIpTestAddress; +mod repository_geo_ip_test_address_response; +pub use self::repository_geo_ip_test_address_response::RepositoryGeoIpTestAddressResponse; +mod repository_geo_ip_test_address_response_dict; +pub use self::repository_geo_ip_test_address_response_dict::RepositoryGeoIpTestAddressResponseDict; +mod repository_gpg_key; +pub use self::repository_gpg_key::RepositoryGpgKey; +mod repository_gpg_key_create; +pub use self::repository_gpg_key_create::RepositoryGpgKeyCreate; +mod repository_privilege_dict; +pub use self::repository_privilege_dict::RepositoryPrivilegeDict; +mod repository_privilege_input; +pub use self::repository_privilege_input::RepositoryPrivilegeInput; +mod repository_privilege_input_request; +pub use self::repository_privilege_input_request::RepositoryPrivilegeInputRequest; +mod repository_privilege_input_request_patch; +pub use self::repository_privilege_input_request_patch::RepositoryPrivilegeInputRequestPatch; +mod repository_request_patch; +pub use self::repository_request_patch::RepositoryRequestPatch; +mod repository_retention_rules; +pub use self::repository_retention_rules::RepositoryRetentionRules; +mod repository_retention_rules_request_patch; +pub use self::repository_retention_rules_request_patch::RepositoryRetentionRulesRequestPatch; +mod repository_rsa_key; +pub use self::repository_rsa_key::RepositoryRsaKey; +mod repository_rsa_key_create; +pub use self::repository_rsa_key_create::RepositoryRsaKeyCreate; +mod repository_token; +pub use self::repository_token::RepositoryToken; +mod repository_token_action; +pub use self::repository_token_action::RepositoryTokenAction; +mod repository_token_refresh; +pub use self::repository_token_refresh::RepositoryTokenRefresh; +mod repository_token_refresh_request; +pub use self::repository_token_refresh_request::RepositoryTokenRefreshRequest; +mod repository_token_request; +pub use self::repository_token_request::RepositoryTokenRequest; +mod repository_token_request_patch; +pub use self::repository_token_request_patch::RepositoryTokenRequestPatch; +mod repository_token_sync; +pub use self::repository_token_sync::RepositoryTokenSync; +mod repository_token_sync_request; +pub use self::repository_token_sync_request::RepositoryTokenSyncRequest; +mod repository_transfer_region; +pub use self::repository_transfer_region::RepositoryTransferRegion; +mod repository_transfer_region_request; +pub use self::repository_transfer_region_request::RepositoryTransferRegionRequest; +mod repository_webhook; +pub use self::repository_webhook::RepositoryWebhook; +mod repository_webhook_request; +pub use self::repository_webhook_request::RepositoryWebhookRequest; +mod repository_webhook_request_patch; +pub use self::repository_webhook_request_patch::RepositoryWebhookRequestPatch; +mod repository_x509_ecdsa_certificate; +pub use self::repository_x509_ecdsa_certificate::RepositoryX509EcdsaCertificate; +mod repository_x509_rsa_certificate; +pub use self::repository_x509_rsa_certificate::RepositoryX509RsaCertificate; +mod resources_rate_check; +pub use self::resources_rate_check::ResourcesRateCheck; +mod respository_geo_ip_enable_disable; +pub use self::respository_geo_ip_enable_disable::RespositoryGeoIpEnableDisable; +mod respository_geo_ip_enable_disable_request; +pub use self::respository_geo_ip_enable_disable_request::RespositoryGeoIpEnableDisableRequest; +mod rpm_package_upload; +pub use self::rpm_package_upload::RpmPackageUpload; +mod rpm_package_upload_request; +pub use self::rpm_package_upload_request::RpmPackageUploadRequest; +mod rpm_upstream; +pub use self::rpm_upstream::RpmUpstream; +mod rpm_upstream_request; +pub use self::rpm_upstream_request::RpmUpstreamRequest; +mod rpm_upstream_request_patch; +pub use self::rpm_upstream_request_patch::RpmUpstreamRequestPatch; +mod ruby_package_upload; +pub use self::ruby_package_upload::RubyPackageUpload; +mod ruby_package_upload_request; +pub use self::ruby_package_upload_request::RubyPackageUploadRequest; +mod ruby_upstream; +pub use self::ruby_upstream::RubyUpstream; +mod ruby_upstream_request; +pub use self::ruby_upstream_request::RubyUpstreamRequest; +mod ruby_upstream_request_patch; +pub use self::ruby_upstream_request_patch::RubyUpstreamRequestPatch; +mod service; +pub use self::service::Service; +mod service_request; +pub use self::service_request::ServiceRequest; +mod service_request_patch; +pub use self::service_request_patch::ServiceRequestPatch; +mod service_teams; +pub use self::service_teams::ServiceTeams; +mod status_basic; +pub use self::status_basic::StatusBasic; +mod storage_allocated_limit; +pub use self::storage_allocated_limit::StorageAllocatedLimit; +mod storage_allocated_limit_raw; +pub use self::storage_allocated_limit_raw::StorageAllocatedLimitRaw; +mod storage_region; +pub use self::storage_region::StorageRegion; +mod storage_usage; +pub use self::storage_usage::StorageUsage; +mod storage_usage_raw; +pub use self::storage_usage_raw::StorageUsageRaw; +mod swift_package_upload; +pub use self::swift_package_upload::SwiftPackageUpload; +mod swift_package_upload_request; +pub use self::swift_package_upload_request::SwiftPackageUploadRequest; +mod swift_upstream; +pub use self::swift_upstream::SwiftUpstream; +mod swift_upstream_request; +pub use self::swift_upstream_request::SwiftUpstreamRequest; +mod swift_upstream_request_patch; +pub use self::swift_upstream_request_patch::SwiftUpstreamRequestPatch; +mod tags; +pub use self::tags::Tags; +mod terraform_package_upload; +pub use self::terraform_package_upload::TerraformPackageUpload; +mod terraform_package_upload_request; +pub use self::terraform_package_upload_request::TerraformPackageUploadRequest; +mod usage; +pub use self::usage::Usage; +mod usage_fieldset; +pub use self::usage_fieldset::UsageFieldset; +mod usage_limits; +pub use self::usage_limits::UsageLimits; +mod usage_limits_raw; +pub use self::usage_limits_raw::UsageLimitsRaw; +mod usage_raw; +pub use self::usage_raw::UsageRaw; +mod user_auth_token; +pub use self::user_auth_token::UserAuthToken; +mod user_auth_token_request; +pub use self::user_auth_token_request::UserAuthTokenRequest; +mod user_brief; +pub use self::user_brief::UserBrief; +mod user_profile; +pub use self::user_profile::UserProfile; +mod vagrant_package_upload; +pub use self::vagrant_package_upload::VagrantPackageUpload; +mod vagrant_package_upload_request; +pub use self::vagrant_package_upload_request::VagrantPackageUploadRequest; +mod vulnerability; +pub use self::vulnerability::Vulnerability; +mod vulnerability_scan; +pub use self::vulnerability_scan::VulnerabilityScan; +mod vulnerability_scan_results; +pub use self::vulnerability_scan_results::VulnerabilityScanResults; +mod vulnerability_scan_results_list; +pub use self::vulnerability_scan_results_list::VulnerabilityScanResultsList; +mod vulnerability_scan_version; +pub use self::vulnerability_scan_version::VulnerabilityScanVersion; +mod webhook_template; +pub use self::webhook_template::WebhookTemplate; + +// TODO(farcaller): sort out files +pub struct File; diff --git a/bindings/rust/src/src/models/namespace.rs b/bindings/rust/src/src/models/namespace.rs new file mode 100644 index 00000000..7a3630ea --- /dev/null +++ b/bindings/rust/src/src/models/namespace.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Namespace { + #[serde(rename = "name")] + name: Option, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "type_name")] + type_name: Option +} + +impl Namespace { + pub fn new() -> Namespace { + Namespace { + name: None, + slug: None, + slug_perm: None, + type_name: None + } + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> Namespace { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> Namespace { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> Namespace { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_type_name(&mut self, type_name: String) { + self.type_name = Some(type_name); + } + + pub fn with_type_name(mut self, type_name: String) -> Namespace { + self.type_name = Some(type_name); + self + } + + pub fn type_name(&self) -> Option<&String> { + self.type_name.as_ref() + } + + pub fn reset_type_name(&mut self) { + self.type_name = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/namespace_audit_log.rs b/bindings/rust/src/src/models/namespace_audit_log.rs new file mode 100644 index 00000000..c1796f21 --- /dev/null +++ b/bindings/rust/src/src/models/namespace_audit_log.rs @@ -0,0 +1,312 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NamespaceAuditLog { + #[serde(rename = "actor")] + actor: String, + #[serde(rename = "actor_ip_address")] + actor_ip_address: String, + #[serde(rename = "actor_kind")] + actor_kind: Option, + #[serde(rename = "actor_location")] + actor_location: ::models::GeoIpLocation, + #[serde(rename = "actor_slug_perm")] + actor_slug_perm: String, + #[serde(rename = "actor_url")] + actor_url: Option, + #[serde(rename = "context")] + context: String, + #[serde(rename = "event")] + event: String, + #[serde(rename = "event_at")] + event_at: String, + #[serde(rename = "object")] + object: String, + #[serde(rename = "object_kind")] + object_kind: String, + #[serde(rename = "object_slug_perm")] + object_slug_perm: String, + #[serde(rename = "target")] + target: String, + #[serde(rename = "target_kind")] + target_kind: String, + #[serde(rename = "target_slug_perm")] + target_slug_perm: Option, + #[serde(rename = "uuid")] + uuid: Option +} + +impl NamespaceAuditLog { + pub fn new(actor: String, actor_ip_address: String, actor_location: ::models::GeoIpLocation, actor_slug_perm: String, context: String, event: String, event_at: String, object: String, object_kind: String, object_slug_perm: String, target: String, target_kind: String) -> NamespaceAuditLog { + NamespaceAuditLog { + actor: actor, + actor_ip_address: actor_ip_address, + actor_kind: None, + actor_location: actor_location, + actor_slug_perm: actor_slug_perm, + actor_url: None, + context: context, + event: event, + event_at: event_at, + object: object, + object_kind: object_kind, + object_slug_perm: object_slug_perm, + target: target, + target_kind: target_kind, + target_slug_perm: None, + uuid: None + } + } + + pub fn set_actor(&mut self, actor: String) { + self.actor = actor; + } + + pub fn with_actor(mut self, actor: String) -> NamespaceAuditLog { + self.actor = actor; + self + } + + pub fn actor(&self) -> &String { + &self.actor + } + + + pub fn set_actor_ip_address(&mut self, actor_ip_address: String) { + self.actor_ip_address = actor_ip_address; + } + + pub fn with_actor_ip_address(mut self, actor_ip_address: String) -> NamespaceAuditLog { + self.actor_ip_address = actor_ip_address; + self + } + + pub fn actor_ip_address(&self) -> &String { + &self.actor_ip_address + } + + + pub fn set_actor_kind(&mut self, actor_kind: String) { + self.actor_kind = Some(actor_kind); + } + + pub fn with_actor_kind(mut self, actor_kind: String) -> NamespaceAuditLog { + self.actor_kind = Some(actor_kind); + self + } + + pub fn actor_kind(&self) -> Option<&String> { + self.actor_kind.as_ref() + } + + pub fn reset_actor_kind(&mut self) { + self.actor_kind = None; + } + + pub fn set_actor_location(&mut self, actor_location: ::models::GeoIpLocation) { + self.actor_location = actor_location; + } + + pub fn with_actor_location(mut self, actor_location: ::models::GeoIpLocation) -> NamespaceAuditLog { + self.actor_location = actor_location; + self + } + + pub fn actor_location(&self) -> &::models::GeoIpLocation { + &self.actor_location + } + + + pub fn set_actor_slug_perm(&mut self, actor_slug_perm: String) { + self.actor_slug_perm = actor_slug_perm; + } + + pub fn with_actor_slug_perm(mut self, actor_slug_perm: String) -> NamespaceAuditLog { + self.actor_slug_perm = actor_slug_perm; + self + } + + pub fn actor_slug_perm(&self) -> &String { + &self.actor_slug_perm + } + + + pub fn set_actor_url(&mut self, actor_url: String) { + self.actor_url = Some(actor_url); + } + + pub fn with_actor_url(mut self, actor_url: String) -> NamespaceAuditLog { + self.actor_url = Some(actor_url); + self + } + + pub fn actor_url(&self) -> Option<&String> { + self.actor_url.as_ref() + } + + pub fn reset_actor_url(&mut self) { + self.actor_url = None; + } + + pub fn set_context(&mut self, context: String) { + self.context = context; + } + + pub fn with_context(mut self, context: String) -> NamespaceAuditLog { + self.context = context; + self + } + + pub fn context(&self) -> &String { + &self.context + } + + + pub fn set_event(&mut self, event: String) { + self.event = event; + } + + pub fn with_event(mut self, event: String) -> NamespaceAuditLog { + self.event = event; + self + } + + pub fn event(&self) -> &String { + &self.event + } + + + pub fn set_event_at(&mut self, event_at: String) { + self.event_at = event_at; + } + + pub fn with_event_at(mut self, event_at: String) -> NamespaceAuditLog { + self.event_at = event_at; + self + } + + pub fn event_at(&self) -> &String { + &self.event_at + } + + + pub fn set_object(&mut self, object: String) { + self.object = object; + } + + pub fn with_object(mut self, object: String) -> NamespaceAuditLog { + self.object = object; + self + } + + pub fn object(&self) -> &String { + &self.object + } + + + pub fn set_object_kind(&mut self, object_kind: String) { + self.object_kind = object_kind; + } + + pub fn with_object_kind(mut self, object_kind: String) -> NamespaceAuditLog { + self.object_kind = object_kind; + self + } + + pub fn object_kind(&self) -> &String { + &self.object_kind + } + + + pub fn set_object_slug_perm(&mut self, object_slug_perm: String) { + self.object_slug_perm = object_slug_perm; + } + + pub fn with_object_slug_perm(mut self, object_slug_perm: String) -> NamespaceAuditLog { + self.object_slug_perm = object_slug_perm; + self + } + + pub fn object_slug_perm(&self) -> &String { + &self.object_slug_perm + } + + + pub fn set_target(&mut self, target: String) { + self.target = target; + } + + pub fn with_target(mut self, target: String) -> NamespaceAuditLog { + self.target = target; + self + } + + pub fn target(&self) -> &String { + &self.target + } + + + pub fn set_target_kind(&mut self, target_kind: String) { + self.target_kind = target_kind; + } + + pub fn with_target_kind(mut self, target_kind: String) -> NamespaceAuditLog { + self.target_kind = target_kind; + self + } + + pub fn target_kind(&self) -> &String { + &self.target_kind + } + + + pub fn set_target_slug_perm(&mut self, target_slug_perm: String) { + self.target_slug_perm = Some(target_slug_perm); + } + + pub fn with_target_slug_perm(mut self, target_slug_perm: String) -> NamespaceAuditLog { + self.target_slug_perm = Some(target_slug_perm); + self + } + + pub fn target_slug_perm(&self) -> Option<&String> { + self.target_slug_perm.as_ref() + } + + pub fn reset_target_slug_perm(&mut self) { + self.target_slug_perm = None; + } + + pub fn set_uuid(&mut self, uuid: String) { + self.uuid = Some(uuid); + } + + pub fn with_uuid(mut self, uuid: String) -> NamespaceAuditLog { + self.uuid = Some(uuid); + self + } + + pub fn uuid(&self) -> Option<&String> { + self.uuid.as_ref() + } + + pub fn reset_uuid(&mut self) { + self.uuid = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nested_license_policy.rs b/bindings/rust/src/src/models/nested_license_policy.rs new file mode 100644 index 00000000..b971bcc6 --- /dev/null +++ b/bindings/rust/src/src/models/nested_license_policy.rs @@ -0,0 +1,225 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NestedLicensePolicy { + #[serde(rename = "allow_unknown_licenses")] + allow_unknown_licenses: Option, + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "spdx_identifiers")] + spdx_identifiers: Vec, + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "url")] + url: Option +} + +impl NestedLicensePolicy { + pub fn new(spdx_identifiers: Vec) -> NestedLicensePolicy { + NestedLicensePolicy { + allow_unknown_licenses: None, + created_at: None, + description: None, + name: None, + on_violation_quarantine: None, + package_query_string: None, + slug_perm: None, + spdx_identifiers: spdx_identifiers, + updated_at: None, + url: None + } + } + + pub fn set_allow_unknown_licenses(&mut self, allow_unknown_licenses: bool) { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + } + + pub fn with_allow_unknown_licenses(mut self, allow_unknown_licenses: bool) -> NestedLicensePolicy { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + self + } + + pub fn allow_unknown_licenses(&self) -> Option<&bool> { + self.allow_unknown_licenses.as_ref() + } + + pub fn reset_allow_unknown_licenses(&mut self) { + self.allow_unknown_licenses = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> NestedLicensePolicy { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> NestedLicensePolicy { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> NestedLicensePolicy { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> NestedLicensePolicy { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> NestedLicensePolicy { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> NestedLicensePolicy { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_spdx_identifiers(&mut self, spdx_identifiers: Vec) { + self.spdx_identifiers = spdx_identifiers; + } + + pub fn with_spdx_identifiers(mut self, spdx_identifiers: Vec) -> NestedLicensePolicy { + self.spdx_identifiers = spdx_identifiers; + self + } + + pub fn spdx_identifiers(&self) -> &Vec { + &self.spdx_identifiers + } + + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> NestedLicensePolicy { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_url(&mut self, url: String) { + self.url = Some(url); + } + + pub fn with_url(mut self, url: String) -> NestedLicensePolicy { + self.url = Some(url); + self + } + + pub fn url(&self) -> Option<&String> { + self.url.as_ref() + } + + pub fn reset_url(&mut self) { + self.url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nested_vulnerability_policy.rs b/bindings/rust/src/src/models/nested_vulnerability_policy.rs new file mode 100644 index 00000000..8cbfaeac --- /dev/null +++ b/bindings/rust/src/src/models/nested_vulnerability_policy.rs @@ -0,0 +1,229 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NestedVulnerabilityPolicy { + /// Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. + #[serde(rename = "allow_unknown_severity")] + allow_unknown_severity: Option, + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "min_severity")] + min_severity: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "url")] + url: Option +} + +impl NestedVulnerabilityPolicy { + pub fn new() -> NestedVulnerabilityPolicy { + NestedVulnerabilityPolicy { + allow_unknown_severity: None, + created_at: None, + description: None, + min_severity: None, + name: None, + on_violation_quarantine: None, + package_query_string: None, + slug_perm: None, + updated_at: None, + url: None + } + } + + pub fn set_allow_unknown_severity(&mut self, allow_unknown_severity: bool) { + self.allow_unknown_severity = Some(allow_unknown_severity); + } + + pub fn with_allow_unknown_severity(mut self, allow_unknown_severity: bool) -> NestedVulnerabilityPolicy { + self.allow_unknown_severity = Some(allow_unknown_severity); + self + } + + pub fn allow_unknown_severity(&self) -> Option<&bool> { + self.allow_unknown_severity.as_ref() + } + + pub fn reset_allow_unknown_severity(&mut self) { + self.allow_unknown_severity = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> NestedVulnerabilityPolicy { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> NestedVulnerabilityPolicy { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_min_severity(&mut self, min_severity: String) { + self.min_severity = Some(min_severity); + } + + pub fn with_min_severity(mut self, min_severity: String) -> NestedVulnerabilityPolicy { + self.min_severity = Some(min_severity); + self + } + + pub fn min_severity(&self) -> Option<&String> { + self.min_severity.as_ref() + } + + pub fn reset_min_severity(&mut self) { + self.min_severity = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> NestedVulnerabilityPolicy { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> NestedVulnerabilityPolicy { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> NestedVulnerabilityPolicy { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> NestedVulnerabilityPolicy { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> NestedVulnerabilityPolicy { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_url(&mut self, url: String) { + self.url = Some(url); + } + + pub fn with_url(mut self, url: String) -> NestedVulnerabilityPolicy { + self.url = Some(url); + self + } + + pub fn url(&self) -> Option<&String> { + self.url.as_ref() + } + + pub fn reset_url(&mut self) { + self.url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nested_vulnerability_scan_results.rs b/bindings/rust/src/src/models/nested_vulnerability_scan_results.rs new file mode 100644 index 00000000..0b4f05ed --- /dev/null +++ b/bindings/rust/src/src/models/nested_vulnerability_scan_results.rs @@ -0,0 +1,165 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NestedVulnerabilityScanResults { + /// The time this scan result was stored. + #[serde(rename = "created_at")] + created_at: Option, + /// Do the results contain any known vulnerabilities? + #[serde(rename = "has_vulnerabilities")] + has_vulnerabilities: Option, + #[serde(rename = "identifier")] + identifier: String, + #[serde(rename = "max_severity")] + max_severity: Option, + #[serde(rename = "num_vulnerabilities")] + num_vulnerabilities: Option, + /// Deprecated (23-05-15): Please use 'identifier' instead. Previously: A monotonically increasing number that identified a scan within a repository. + #[serde(rename = "scan_id")] + scan_id: i32, + #[serde(rename = "url")] + url: Option +} + +impl NestedVulnerabilityScanResults { + pub fn new(identifier: String, scan_id: i32) -> NestedVulnerabilityScanResults { + NestedVulnerabilityScanResults { + created_at: None, + has_vulnerabilities: None, + identifier: identifier, + max_severity: None, + num_vulnerabilities: None, + scan_id: scan_id, + url: None + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> NestedVulnerabilityScanResults { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_has_vulnerabilities(&mut self, has_vulnerabilities: bool) { + self.has_vulnerabilities = Some(has_vulnerabilities); + } + + pub fn with_has_vulnerabilities(mut self, has_vulnerabilities: bool) -> NestedVulnerabilityScanResults { + self.has_vulnerabilities = Some(has_vulnerabilities); + self + } + + pub fn has_vulnerabilities(&self) -> Option<&bool> { + self.has_vulnerabilities.as_ref() + } + + pub fn reset_has_vulnerabilities(&mut self) { + self.has_vulnerabilities = None; + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = identifier; + } + + pub fn with_identifier(mut self, identifier: String) -> NestedVulnerabilityScanResults { + self.identifier = identifier; + self + } + + pub fn identifier(&self) -> &String { + &self.identifier + } + + + pub fn set_max_severity(&mut self, max_severity: String) { + self.max_severity = Some(max_severity); + } + + pub fn with_max_severity(mut self, max_severity: String) -> NestedVulnerabilityScanResults { + self.max_severity = Some(max_severity); + self + } + + pub fn max_severity(&self) -> Option<&String> { + self.max_severity.as_ref() + } + + pub fn reset_max_severity(&mut self) { + self.max_severity = None; + } + + pub fn set_num_vulnerabilities(&mut self, num_vulnerabilities: i32) { + self.num_vulnerabilities = Some(num_vulnerabilities); + } + + pub fn with_num_vulnerabilities(mut self, num_vulnerabilities: i32) -> NestedVulnerabilityScanResults { + self.num_vulnerabilities = Some(num_vulnerabilities); + self + } + + pub fn num_vulnerabilities(&self) -> Option<&i32> { + self.num_vulnerabilities.as_ref() + } + + pub fn reset_num_vulnerabilities(&mut self) { + self.num_vulnerabilities = None; + } + + pub fn set_scan_id(&mut self, scan_id: i32) { + self.scan_id = scan_id; + } + + pub fn with_scan_id(mut self, scan_id: i32) -> NestedVulnerabilityScanResults { + self.scan_id = scan_id; + self + } + + pub fn scan_id(&self) -> &i32 { + &self.scan_id + } + + + pub fn set_url(&mut self, url: String) { + self.url = Some(url); + } + + pub fn with_url(mut self, url: String) -> NestedVulnerabilityScanResults { + self.url = Some(url); + self + } + + pub fn url(&self) -> Option<&String> { + self.url.as_ref() + } + + pub fn reset_url(&mut self) { + self.url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/npm_package_upload.rs b/bindings/rust/src/src/models/npm_package_upload.rs new file mode 100644 index 00000000..24c04c58 --- /dev/null +++ b/bindings/rust/src/src/models/npm_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NpmPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl NpmPackageUpload { + pub fn new() -> NpmPackageUpload { + NpmPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> NpmPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> NpmPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> NpmPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> NpmPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> NpmPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> NpmPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> NpmPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> NpmPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> NpmPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> NpmPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> NpmPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> NpmPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> NpmPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> NpmPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> NpmPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> NpmPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> NpmPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> NpmPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> NpmPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> NpmPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> NpmPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> NpmPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> NpmPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> NpmPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> NpmPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> NpmPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> NpmPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> NpmPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> NpmPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> NpmPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> NpmPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> NpmPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> NpmPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> NpmPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> NpmPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> NpmPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> NpmPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> NpmPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> NpmPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> NpmPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> NpmPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> NpmPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> NpmPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> NpmPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> NpmPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> NpmPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> NpmPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> NpmPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> NpmPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> NpmPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> NpmPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> NpmPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> NpmPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> NpmPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> NpmPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> NpmPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> NpmPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> NpmPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> NpmPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> NpmPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> NpmPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> NpmPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> NpmPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> NpmPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> NpmPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> NpmPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> NpmPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> NpmPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> NpmPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> NpmPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> NpmPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> NpmPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> NpmPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> NpmPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> NpmPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> NpmPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> NpmPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> NpmPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> NpmPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> NpmPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/npm_package_upload_request.rs b/bindings/rust/src/src/models/npm_package_upload_request.rs new file mode 100644 index 00000000..e80b0cc6 --- /dev/null +++ b/bindings/rust/src/src/models/npm_package_upload_request.rs @@ -0,0 +1,109 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NpmPackageUploadRequest { + /// The default npm dist-tag for this package/version - This will replace any other package/version if they are using the same tag. + #[serde(rename = "npm_dist_tag")] + npm_dist_tag: Option, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl NpmPackageUploadRequest { + pub fn new(package_file: String) -> NpmPackageUploadRequest { + NpmPackageUploadRequest { + npm_dist_tag: None, + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_npm_dist_tag(&mut self, npm_dist_tag: String) { + self.npm_dist_tag = Some(npm_dist_tag); + } + + pub fn with_npm_dist_tag(mut self, npm_dist_tag: String) -> NpmPackageUploadRequest { + self.npm_dist_tag = Some(npm_dist_tag); + self + } + + pub fn npm_dist_tag(&self) -> Option<&String> { + self.npm_dist_tag.as_ref() + } + + pub fn reset_npm_dist_tag(&mut self) { + self.npm_dist_tag = None; + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> NpmPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> NpmPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> NpmPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/npm_upstream.rs b/bindings/rust/src/src/models/npm_upstream.rs new file mode 100644 index 00000000..ddbff935 --- /dev/null +++ b/bindings/rust/src/src/models/npm_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NpmUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl NpmUpstream { + pub fn new(name: String, upstream_url: String) -> NpmUpstream { + NpmUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> NpmUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> NpmUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> NpmUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> NpmUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> NpmUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> NpmUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> NpmUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> NpmUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> NpmUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> NpmUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> NpmUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> NpmUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> NpmUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> NpmUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> NpmUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> NpmUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> NpmUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> NpmUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/npm_upstream_request.rs b/bindings/rust/src/src/models/npm_upstream_request.rs new file mode 100644 index 00000000..757d3d56 --- /dev/null +++ b/bindings/rust/src/src/models/npm_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NpmUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl NpmUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> NpmUpstreamRequest { + NpmUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> NpmUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> NpmUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> NpmUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> NpmUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> NpmUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> NpmUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> NpmUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> NpmUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> NpmUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> NpmUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> NpmUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> NpmUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> NpmUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/npm_upstream_request_patch.rs b/bindings/rust/src/src/models/npm_upstream_request_patch.rs new file mode 100644 index 00000000..609c392c --- /dev/null +++ b/bindings/rust/src/src/models/npm_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NpmUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl NpmUpstreamRequestPatch { + pub fn new() -> NpmUpstreamRequestPatch { + NpmUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> NpmUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> NpmUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> NpmUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> NpmUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> NpmUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> NpmUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> NpmUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> NpmUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> NpmUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> NpmUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> NpmUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> NpmUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> NpmUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nuget_package_upload.rs b/bindings/rust/src/src/models/nuget_package_upload.rs new file mode 100644 index 00000000..d674b5c3 --- /dev/null +++ b/bindings/rust/src/src/models/nuget_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NugetPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl NugetPackageUpload { + pub fn new() -> NugetPackageUpload { + NugetPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> NugetPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> NugetPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> NugetPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> NugetPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> NugetPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> NugetPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> NugetPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> NugetPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> NugetPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> NugetPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> NugetPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> NugetPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> NugetPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> NugetPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> NugetPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> NugetPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> NugetPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> NugetPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> NugetPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> NugetPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> NugetPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> NugetPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> NugetPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> NugetPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> NugetPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> NugetPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> NugetPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> NugetPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> NugetPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> NugetPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> NugetPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> NugetPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> NugetPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> NugetPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> NugetPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> NugetPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> NugetPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> NugetPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> NugetPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> NugetPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> NugetPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> NugetPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> NugetPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> NugetPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> NugetPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> NugetPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> NugetPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> NugetPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> NugetPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> NugetPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> NugetPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> NugetPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> NugetPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> NugetPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> NugetPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> NugetPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> NugetPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> NugetPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> NugetPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> NugetPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> NugetPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> NugetPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> NugetPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> NugetPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> NugetPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> NugetPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> NugetPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> NugetPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> NugetPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> NugetPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> NugetPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> NugetPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> NugetPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> NugetPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> NugetPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> NugetPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> NugetPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> NugetPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> NugetPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> NugetPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nuget_package_upload_request.rs b/bindings/rust/src/src/models/nuget_package_upload_request.rs new file mode 100644 index 00000000..9f0002e5 --- /dev/null +++ b/bindings/rust/src/src/models/nuget_package_upload_request.rs @@ -0,0 +1,109 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NugetPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// Uploads a symbols file as a separate package + #[serde(rename = "symbols_file")] + symbols_file: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl NugetPackageUploadRequest { + pub fn new(package_file: String) -> NugetPackageUploadRequest { + NugetPackageUploadRequest { + package_file: package_file, + republish: None, + symbols_file: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> NugetPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> NugetPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_symbols_file(&mut self, symbols_file: String) { + self.symbols_file = Some(symbols_file); + } + + pub fn with_symbols_file(mut self, symbols_file: String) -> NugetPackageUploadRequest { + self.symbols_file = Some(symbols_file); + self + } + + pub fn symbols_file(&self) -> Option<&String> { + self.symbols_file.as_ref() + } + + pub fn reset_symbols_file(&mut self) { + self.symbols_file = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> NugetPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nuget_upstream.rs b/bindings/rust/src/src/models/nuget_upstream.rs new file mode 100644 index 00000000..3364317a --- /dev/null +++ b/bindings/rust/src/src/models/nuget_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NugetUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl NugetUpstream { + pub fn new(name: String, upstream_url: String) -> NugetUpstream { + NugetUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> NugetUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> NugetUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> NugetUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> NugetUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> NugetUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> NugetUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> NugetUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> NugetUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> NugetUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> NugetUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> NugetUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> NugetUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> NugetUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> NugetUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> NugetUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> NugetUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> NugetUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> NugetUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nuget_upstream_request.rs b/bindings/rust/src/src/models/nuget_upstream_request.rs new file mode 100644 index 00000000..8fa63a92 --- /dev/null +++ b/bindings/rust/src/src/models/nuget_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NugetUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl NugetUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> NugetUpstreamRequest { + NugetUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> NugetUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> NugetUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> NugetUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> NugetUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> NugetUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> NugetUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> NugetUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> NugetUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> NugetUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> NugetUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> NugetUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> NugetUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> NugetUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/nuget_upstream_request_patch.rs b/bindings/rust/src/src/models/nuget_upstream_request_patch.rs new file mode 100644 index 00000000..7788a3b9 --- /dev/null +++ b/bindings/rust/src/src/models/nuget_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct NugetUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl NugetUpstreamRequestPatch { + pub fn new() -> NugetUpstreamRequestPatch { + NugetUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> NugetUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> NugetUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> NugetUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> NugetUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> NugetUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> NugetUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> NugetUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> NugetUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> NugetUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> NugetUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> NugetUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> NugetUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> NugetUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization.rs b/bindings/rust/src/src/models/organization.rs new file mode 100644 index 00000000..f812ddfc --- /dev/null +++ b/bindings/rust/src/src/models/organization.rs @@ -0,0 +1,167 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Organization { + #[serde(rename = "country")] + country: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// The city/town/area your organization is based in. + #[serde(rename = "location")] + location: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// A short public descriptive for your organization. + #[serde(rename = "tagline")] + tagline: Option +} + +impl Organization { + pub fn new(name: String) -> Organization { + Organization { + country: None, + created_at: None, + location: None, + name: name, + slug: None, + slug_perm: None, + tagline: None + } + } + + pub fn set_country(&mut self, country: String) { + self.country = Some(country); + } + + pub fn with_country(mut self, country: String) -> Organization { + self.country = Some(country); + self + } + + pub fn country(&self) -> Option<&String> { + self.country.as_ref() + } + + pub fn reset_country(&mut self) { + self.country = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> Organization { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_location(&mut self, location: String) { + self.location = Some(location); + } + + pub fn with_location(mut self, location: String) -> Organization { + self.location = Some(location); + self + } + + pub fn location(&self) -> Option<&String> { + self.location.as_ref() + } + + pub fn reset_location(&mut self) { + self.location = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> Organization { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> Organization { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> Organization { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_tagline(&mut self, tagline: String) { + self.tagline = Some(tagline); + } + + pub fn with_tagline(mut self, tagline: String) -> Organization { + self.tagline = Some(tagline); + self + } + + pub fn tagline(&self) -> Option<&String> { + self.tagline.as_ref() + } + + pub fn reset_tagline(&mut self) { + self.tagline = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_group_sync.rs b/bindings/rust/src/src/models/organization_group_sync.rs new file mode 100644 index 00000000..daf397e5 --- /dev/null +++ b/bindings/rust/src/src/models/organization_group_sync.rs @@ -0,0 +1,119 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationGroupSync { + #[serde(rename = "idp_key")] + idp_key: String, + #[serde(rename = "idp_value")] + idp_value: String, + #[serde(rename = "role")] + role: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "team")] + team: String +} + +impl OrganizationGroupSync { + pub fn new(idp_key: String, idp_value: String, team: String) -> OrganizationGroupSync { + OrganizationGroupSync { + idp_key: idp_key, + idp_value: idp_value, + role: None, + slug_perm: None, + team: team + } + } + + pub fn set_idp_key(&mut self, idp_key: String) { + self.idp_key = idp_key; + } + + pub fn with_idp_key(mut self, idp_key: String) -> OrganizationGroupSync { + self.idp_key = idp_key; + self + } + + pub fn idp_key(&self) -> &String { + &self.idp_key + } + + + pub fn set_idp_value(&mut self, idp_value: String) { + self.idp_value = idp_value; + } + + pub fn with_idp_value(mut self, idp_value: String) -> OrganizationGroupSync { + self.idp_value = idp_value; + self + } + + pub fn idp_value(&self) -> &String { + &self.idp_value + } + + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationGroupSync { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> OrganizationGroupSync { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_team(&mut self, team: String) { + self.team = team; + } + + pub fn with_team(mut self, team: String) -> OrganizationGroupSync { + self.team = team; + self + } + + pub fn team(&self) -> &String { + &self.team + } + + +} + + + diff --git a/bindings/rust/src/src/models/organization_group_sync_request.rs b/bindings/rust/src/src/models/organization_group_sync_request.rs new file mode 100644 index 00000000..241b1bfb --- /dev/null +++ b/bindings/rust/src/src/models/organization_group_sync_request.rs @@ -0,0 +1,116 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationGroupSyncRequest { + #[serde(rename = "idp_key")] + idp_key: String, + #[serde(rename = "idp_value")] + idp_value: String, + #[serde(rename = "organization")] + organization: String, + #[serde(rename = "role")] + role: Option, + #[serde(rename = "team")] + team: String +} + +impl OrganizationGroupSyncRequest { + pub fn new(idp_key: String, idp_value: String, organization: String, team: String) -> OrganizationGroupSyncRequest { + OrganizationGroupSyncRequest { + idp_key: idp_key, + idp_value: idp_value, + organization: organization, + role: None, + team: team + } + } + + pub fn set_idp_key(&mut self, idp_key: String) { + self.idp_key = idp_key; + } + + pub fn with_idp_key(mut self, idp_key: String) -> OrganizationGroupSyncRequest { + self.idp_key = idp_key; + self + } + + pub fn idp_key(&self) -> &String { + &self.idp_key + } + + + pub fn set_idp_value(&mut self, idp_value: String) { + self.idp_value = idp_value; + } + + pub fn with_idp_value(mut self, idp_value: String) -> OrganizationGroupSyncRequest { + self.idp_value = idp_value; + self + } + + pub fn idp_value(&self) -> &String { + &self.idp_value + } + + + pub fn set_organization(&mut self, organization: String) { + self.organization = organization; + } + + pub fn with_organization(mut self, organization: String) -> OrganizationGroupSyncRequest { + self.organization = organization; + self + } + + pub fn organization(&self) -> &String { + &self.organization + } + + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationGroupSyncRequest { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_team(&mut self, team: String) { + self.team = team; + } + + pub fn with_team(mut self, team: String) -> OrganizationGroupSyncRequest { + self.team = team; + self + } + + pub fn team(&self) -> &String { + &self.team + } + + +} + + + diff --git a/bindings/rust/src/src/models/organization_group_sync_status.rs b/bindings/rust/src/src/models/organization_group_sync_status.rs new file mode 100644 index 00000000..22d6106f --- /dev/null +++ b/bindings/rust/src/src/models/organization_group_sync_status.rs @@ -0,0 +1,48 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationGroupSyncStatus { + #[serde(rename = "saml_group_sync_status")] + saml_group_sync_status: Option +} + +impl OrganizationGroupSyncStatus { + pub fn new() -> OrganizationGroupSyncStatus { + OrganizationGroupSyncStatus { + saml_group_sync_status: None + } + } + + pub fn set_saml_group_sync_status(&mut self, saml_group_sync_status: bool) { + self.saml_group_sync_status = Some(saml_group_sync_status); + } + + pub fn with_saml_group_sync_status(mut self, saml_group_sync_status: bool) -> OrganizationGroupSyncStatus { + self.saml_group_sync_status = Some(saml_group_sync_status); + self + } + + pub fn saml_group_sync_status(&self) -> Option<&bool> { + self.saml_group_sync_status.as_ref() + } + + pub fn reset_saml_group_sync_status(&mut self) { + self.saml_group_sync_status = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_invite.rs b/bindings/rust/src/src/models/organization_invite.rs new file mode 100644 index 00000000..33d184a1 --- /dev/null +++ b/bindings/rust/src/src/models/organization_invite.rs @@ -0,0 +1,231 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationInvite { + /// The email of the user to be invited. + #[serde(rename = "email")] + email: Option, + #[serde(rename = "expires_at")] + expires_at: Option, + #[serde(rename = "inviter")] + inviter: Option, + #[serde(rename = "inviter_url")] + inviter_url: Option, + #[serde(rename = "org")] + org: Option, + /// The role to be assigned to the invited user. + #[serde(rename = "role")] + role: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "teams")] + teams: Option>, + /// The slug of the user to be invited. + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_url")] + user_url: Option +} + +impl OrganizationInvite { + pub fn new() -> OrganizationInvite { + OrganizationInvite { + email: None, + expires_at: None, + inviter: None, + inviter_url: None, + org: None, + role: None, + slug_perm: None, + teams: None, + user: None, + user_url: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> OrganizationInvite { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_expires_at(&mut self, expires_at: String) { + self.expires_at = Some(expires_at); + } + + pub fn with_expires_at(mut self, expires_at: String) -> OrganizationInvite { + self.expires_at = Some(expires_at); + self + } + + pub fn expires_at(&self) -> Option<&String> { + self.expires_at.as_ref() + } + + pub fn reset_expires_at(&mut self) { + self.expires_at = None; + } + + pub fn set_inviter(&mut self, inviter: String) { + self.inviter = Some(inviter); + } + + pub fn with_inviter(mut self, inviter: String) -> OrganizationInvite { + self.inviter = Some(inviter); + self + } + + pub fn inviter(&self) -> Option<&String> { + self.inviter.as_ref() + } + + pub fn reset_inviter(&mut self) { + self.inviter = None; + } + + pub fn set_inviter_url(&mut self, inviter_url: String) { + self.inviter_url = Some(inviter_url); + } + + pub fn with_inviter_url(mut self, inviter_url: String) -> OrganizationInvite { + self.inviter_url = Some(inviter_url); + self + } + + pub fn inviter_url(&self) -> Option<&String> { + self.inviter_url.as_ref() + } + + pub fn reset_inviter_url(&mut self) { + self.inviter_url = None; + } + + pub fn set_org(&mut self, org: String) { + self.org = Some(org); + } + + pub fn with_org(mut self, org: String) -> OrganizationInvite { + self.org = Some(org); + self + } + + pub fn org(&self) -> Option<&String> { + self.org.as_ref() + } + + pub fn reset_org(&mut self) { + self.org = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationInvite { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> OrganizationInvite { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_teams(&mut self, teams: Vec<::models::OrganizationTeamInvite>) { + self.teams = Some(teams); + } + + pub fn with_teams(mut self, teams: Vec<::models::OrganizationTeamInvite>) -> OrganizationInvite { + self.teams = Some(teams); + self + } + + pub fn teams(&self) -> Option<&Vec<::models::OrganizationTeamInvite>> { + self.teams.as_ref() + } + + pub fn reset_teams(&mut self) { + self.teams = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> OrganizationInvite { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> OrganizationInvite { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_invite_extend.rs b/bindings/rust/src/src/models/organization_invite_extend.rs new file mode 100644 index 00000000..b3abab98 --- /dev/null +++ b/bindings/rust/src/src/models/organization_invite_extend.rs @@ -0,0 +1,232 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationInviteExtend { + /// The email of the user to be invited. + #[serde(rename = "email")] + email: Option, + #[serde(rename = "expires_at")] + expires_at: Option, + #[serde(rename = "inviter")] + inviter: Option, + #[serde(rename = "inviter_url")] + inviter_url: Option, + #[serde(rename = "org")] + org: Option, + /// The role to be assigned to the invited user. + #[serde(rename = "role")] + role: Option, + /// The slug_perm of the invite to be extended. + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "teams")] + teams: Option>, + /// The slug of the user to be invited. + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_url")] + user_url: Option +} + +impl OrganizationInviteExtend { + pub fn new() -> OrganizationInviteExtend { + OrganizationInviteExtend { + email: None, + expires_at: None, + inviter: None, + inviter_url: None, + org: None, + role: None, + slug_perm: None, + teams: None, + user: None, + user_url: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> OrganizationInviteExtend { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_expires_at(&mut self, expires_at: String) { + self.expires_at = Some(expires_at); + } + + pub fn with_expires_at(mut self, expires_at: String) -> OrganizationInviteExtend { + self.expires_at = Some(expires_at); + self + } + + pub fn expires_at(&self) -> Option<&String> { + self.expires_at.as_ref() + } + + pub fn reset_expires_at(&mut self) { + self.expires_at = None; + } + + pub fn set_inviter(&mut self, inviter: String) { + self.inviter = Some(inviter); + } + + pub fn with_inviter(mut self, inviter: String) -> OrganizationInviteExtend { + self.inviter = Some(inviter); + self + } + + pub fn inviter(&self) -> Option<&String> { + self.inviter.as_ref() + } + + pub fn reset_inviter(&mut self) { + self.inviter = None; + } + + pub fn set_inviter_url(&mut self, inviter_url: String) { + self.inviter_url = Some(inviter_url); + } + + pub fn with_inviter_url(mut self, inviter_url: String) -> OrganizationInviteExtend { + self.inviter_url = Some(inviter_url); + self + } + + pub fn inviter_url(&self) -> Option<&String> { + self.inviter_url.as_ref() + } + + pub fn reset_inviter_url(&mut self) { + self.inviter_url = None; + } + + pub fn set_org(&mut self, org: String) { + self.org = Some(org); + } + + pub fn with_org(mut self, org: String) -> OrganizationInviteExtend { + self.org = Some(org); + self + } + + pub fn org(&self) -> Option<&String> { + self.org.as_ref() + } + + pub fn reset_org(&mut self) { + self.org = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationInviteExtend { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> OrganizationInviteExtend { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_teams(&mut self, teams: Vec<::models::OrganizationTeamInvite>) { + self.teams = Some(teams); + } + + pub fn with_teams(mut self, teams: Vec<::models::OrganizationTeamInvite>) -> OrganizationInviteExtend { + self.teams = Some(teams); + self + } + + pub fn teams(&self) -> Option<&Vec<::models::OrganizationTeamInvite>> { + self.teams.as_ref() + } + + pub fn reset_teams(&mut self) { + self.teams = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> OrganizationInviteExtend { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> OrganizationInviteExtend { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_invite_request.rs b/bindings/rust/src/src/models/organization_invite_request.rs new file mode 100644 index 00000000..d35953cb --- /dev/null +++ b/bindings/rust/src/src/models/organization_invite_request.rs @@ -0,0 +1,111 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationInviteRequest { + /// The email of the user to be invited. + #[serde(rename = "email")] + email: Option, + /// The role to be assigned to the invited user. + #[serde(rename = "role")] + role: Option, + #[serde(rename = "teams")] + teams: Option>, + /// The slug of the user to be invited. + #[serde(rename = "user")] + user: Option +} + +impl OrganizationInviteRequest { + pub fn new() -> OrganizationInviteRequest { + OrganizationInviteRequest { + email: None, + role: None, + teams: None, + user: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> OrganizationInviteRequest { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationInviteRequest { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_teams(&mut self, teams: Vec<::models::OrganizationTeamInvite>) { + self.teams = Some(teams); + } + + pub fn with_teams(mut self, teams: Vec<::models::OrganizationTeamInvite>) -> OrganizationInviteRequest { + self.teams = Some(teams); + self + } + + pub fn teams(&self) -> Option<&Vec<::models::OrganizationTeamInvite>> { + self.teams.as_ref() + } + + pub fn reset_teams(&mut self) { + self.teams = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> OrganizationInviteRequest { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_invite_update.rs b/bindings/rust/src/src/models/organization_invite_update.rs new file mode 100644 index 00000000..887e75ea --- /dev/null +++ b/bindings/rust/src/src/models/organization_invite_update.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationInviteUpdate { + /// The role to be assigned to the invited user. + #[serde(rename = "role")] + role: Option +} + +impl OrganizationInviteUpdate { + pub fn new() -> OrganizationInviteUpdate { + OrganizationInviteUpdate { + role: None + } + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationInviteUpdate { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_invite_update_request_patch.rs b/bindings/rust/src/src/models/organization_invite_update_request_patch.rs new file mode 100644 index 00000000..790f27f3 --- /dev/null +++ b/bindings/rust/src/src/models/organization_invite_update_request_patch.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationInviteUpdateRequestPatch { + /// The role to be assigned to the invited user. + #[serde(rename = "role")] + role: Option +} + +impl OrganizationInviteUpdateRequestPatch { + pub fn new() -> OrganizationInviteUpdateRequestPatch { + OrganizationInviteUpdateRequestPatch { + role: None + } + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationInviteUpdateRequestPatch { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_membership.rs b/bindings/rust/src/src/models/organization_membership.rs new file mode 100644 index 00000000..3a926f6f --- /dev/null +++ b/bindings/rust/src/src/models/organization_membership.rs @@ -0,0 +1,268 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationMembership { + #[serde(rename = "email")] + email: Option, + #[serde(rename = "has_two_factor")] + has_two_factor: Option, + #[serde(rename = "is_active")] + is_active: Option, + #[serde(rename = "joined_at")] + joined_at: Option, + #[serde(rename = "last_login_at")] + last_login_at: Option, + #[serde(rename = "last_login_method")] + last_login_method: Option, + #[serde(rename = "role")] + role: Option, + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_id")] + user_id: Option, + #[serde(rename = "user_name")] + user_name: Option, + #[serde(rename = "user_url")] + user_url: Option, + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationMembership { + pub fn new() -> OrganizationMembership { + OrganizationMembership { + email: None, + has_two_factor: None, + is_active: None, + joined_at: None, + last_login_at: None, + last_login_method: None, + role: None, + user: None, + user_id: None, + user_name: None, + user_url: None, + visibility: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> OrganizationMembership { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_has_two_factor(&mut self, has_two_factor: bool) { + self.has_two_factor = Some(has_two_factor); + } + + pub fn with_has_two_factor(mut self, has_two_factor: bool) -> OrganizationMembership { + self.has_two_factor = Some(has_two_factor); + self + } + + pub fn has_two_factor(&self) -> Option<&bool> { + self.has_two_factor.as_ref() + } + + pub fn reset_has_two_factor(&mut self) { + self.has_two_factor = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> OrganizationMembership { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_joined_at(&mut self, joined_at: String) { + self.joined_at = Some(joined_at); + } + + pub fn with_joined_at(mut self, joined_at: String) -> OrganizationMembership { + self.joined_at = Some(joined_at); + self + } + + pub fn joined_at(&self) -> Option<&String> { + self.joined_at.as_ref() + } + + pub fn reset_joined_at(&mut self) { + self.joined_at = None; + } + + pub fn set_last_login_at(&mut self, last_login_at: String) { + self.last_login_at = Some(last_login_at); + } + + pub fn with_last_login_at(mut self, last_login_at: String) -> OrganizationMembership { + self.last_login_at = Some(last_login_at); + self + } + + pub fn last_login_at(&self) -> Option<&String> { + self.last_login_at.as_ref() + } + + pub fn reset_last_login_at(&mut self) { + self.last_login_at = None; + } + + pub fn set_last_login_method(&mut self, last_login_method: String) { + self.last_login_method = Some(last_login_method); + } + + pub fn with_last_login_method(mut self, last_login_method: String) -> OrganizationMembership { + self.last_login_method = Some(last_login_method); + self + } + + pub fn last_login_method(&self) -> Option<&String> { + self.last_login_method.as_ref() + } + + pub fn reset_last_login_method(&mut self) { + self.last_login_method = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationMembership { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> OrganizationMembership { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_id(&mut self, user_id: String) { + self.user_id = Some(user_id); + } + + pub fn with_user_id(mut self, user_id: String) -> OrganizationMembership { + self.user_id = Some(user_id); + self + } + + pub fn user_id(&self) -> Option<&String> { + self.user_id.as_ref() + } + + pub fn reset_user_id(&mut self) { + self.user_id = None; + } + + pub fn set_user_name(&mut self, user_name: String) { + self.user_name = Some(user_name); + } + + pub fn with_user_name(mut self, user_name: String) -> OrganizationMembership { + self.user_name = Some(user_name); + self + } + + pub fn user_name(&self) -> Option<&String> { + self.user_name.as_ref() + } + + pub fn reset_user_name(&mut self) { + self.user_name = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> OrganizationMembership { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationMembership { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_membership_request_patch.rs b/bindings/rust/src/src/models/organization_membership_request_patch.rs new file mode 100644 index 00000000..082a5efd --- /dev/null +++ b/bindings/rust/src/src/models/organization_membership_request_patch.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationMembershipRequestPatch { +} + +impl OrganizationMembershipRequestPatch { + pub fn new() -> OrganizationMembershipRequestPatch { + OrganizationMembershipRequestPatch { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_membership_role_update.rs b/bindings/rust/src/src/models/organization_membership_role_update.rs new file mode 100644 index 00000000..ab067740 --- /dev/null +++ b/bindings/rust/src/src/models/organization_membership_role_update.rs @@ -0,0 +1,248 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationMembershipRoleUpdate { + #[serde(rename = "email")] + email: Option, + #[serde(rename = "has_two_factor")] + has_two_factor: Option, + #[serde(rename = "joined_at")] + joined_at: Option, + #[serde(rename = "last_login_at")] + last_login_at: Option, + #[serde(rename = "last_login_method")] + last_login_method: Option, + #[serde(rename = "role")] + role: Option, + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_id")] + user_id: Option, + #[serde(rename = "user_name")] + user_name: Option, + #[serde(rename = "user_url")] + user_url: Option, + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationMembershipRoleUpdate { + pub fn new() -> OrganizationMembershipRoleUpdate { + OrganizationMembershipRoleUpdate { + email: None, + has_two_factor: None, + joined_at: None, + last_login_at: None, + last_login_method: None, + role: None, + user: None, + user_id: None, + user_name: None, + user_url: None, + visibility: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> OrganizationMembershipRoleUpdate { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_has_two_factor(&mut self, has_two_factor: bool) { + self.has_two_factor = Some(has_two_factor); + } + + pub fn with_has_two_factor(mut self, has_two_factor: bool) -> OrganizationMembershipRoleUpdate { + self.has_two_factor = Some(has_two_factor); + self + } + + pub fn has_two_factor(&self) -> Option<&bool> { + self.has_two_factor.as_ref() + } + + pub fn reset_has_two_factor(&mut self) { + self.has_two_factor = None; + } + + pub fn set_joined_at(&mut self, joined_at: String) { + self.joined_at = Some(joined_at); + } + + pub fn with_joined_at(mut self, joined_at: String) -> OrganizationMembershipRoleUpdate { + self.joined_at = Some(joined_at); + self + } + + pub fn joined_at(&self) -> Option<&String> { + self.joined_at.as_ref() + } + + pub fn reset_joined_at(&mut self) { + self.joined_at = None; + } + + pub fn set_last_login_at(&mut self, last_login_at: String) { + self.last_login_at = Some(last_login_at); + } + + pub fn with_last_login_at(mut self, last_login_at: String) -> OrganizationMembershipRoleUpdate { + self.last_login_at = Some(last_login_at); + self + } + + pub fn last_login_at(&self) -> Option<&String> { + self.last_login_at.as_ref() + } + + pub fn reset_last_login_at(&mut self) { + self.last_login_at = None; + } + + pub fn set_last_login_method(&mut self, last_login_method: String) { + self.last_login_method = Some(last_login_method); + } + + pub fn with_last_login_method(mut self, last_login_method: String) -> OrganizationMembershipRoleUpdate { + self.last_login_method = Some(last_login_method); + self + } + + pub fn last_login_method(&self) -> Option<&String> { + self.last_login_method.as_ref() + } + + pub fn reset_last_login_method(&mut self) { + self.last_login_method = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationMembershipRoleUpdate { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> OrganizationMembershipRoleUpdate { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_id(&mut self, user_id: String) { + self.user_id = Some(user_id); + } + + pub fn with_user_id(mut self, user_id: String) -> OrganizationMembershipRoleUpdate { + self.user_id = Some(user_id); + self + } + + pub fn user_id(&self) -> Option<&String> { + self.user_id.as_ref() + } + + pub fn reset_user_id(&mut self) { + self.user_id = None; + } + + pub fn set_user_name(&mut self, user_name: String) { + self.user_name = Some(user_name); + } + + pub fn with_user_name(mut self, user_name: String) -> OrganizationMembershipRoleUpdate { + self.user_name = Some(user_name); + self + } + + pub fn user_name(&self) -> Option<&String> { + self.user_name.as_ref() + } + + pub fn reset_user_name(&mut self) { + self.user_name = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> OrganizationMembershipRoleUpdate { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationMembershipRoleUpdate { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_membership_role_update_request_patch.rs b/bindings/rust/src/src/models/organization_membership_role_update_request_patch.rs new file mode 100644 index 00000000..22da138d --- /dev/null +++ b/bindings/rust/src/src/models/organization_membership_role_update_request_patch.rs @@ -0,0 +1,48 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationMembershipRoleUpdateRequestPatch { + #[serde(rename = "role")] + role: Option +} + +impl OrganizationMembershipRoleUpdateRequestPatch { + pub fn new() -> OrganizationMembershipRoleUpdateRequestPatch { + OrganizationMembershipRoleUpdateRequestPatch { + role: None + } + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationMembershipRoleUpdateRequestPatch { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_membership_visibility_update.rs b/bindings/rust/src/src/models/organization_membership_visibility_update.rs new file mode 100644 index 00000000..8913d3ff --- /dev/null +++ b/bindings/rust/src/src/models/organization_membership_visibility_update.rs @@ -0,0 +1,248 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationMembershipVisibilityUpdate { + #[serde(rename = "email")] + email: Option, + #[serde(rename = "has_two_factor")] + has_two_factor: Option, + #[serde(rename = "joined_at")] + joined_at: Option, + #[serde(rename = "last_login_at")] + last_login_at: Option, + #[serde(rename = "last_login_method")] + last_login_method: Option, + #[serde(rename = "role")] + role: Option, + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_id")] + user_id: Option, + #[serde(rename = "user_name")] + user_name: Option, + #[serde(rename = "user_url")] + user_url: Option, + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationMembershipVisibilityUpdate { + pub fn new() -> OrganizationMembershipVisibilityUpdate { + OrganizationMembershipVisibilityUpdate { + email: None, + has_two_factor: None, + joined_at: None, + last_login_at: None, + last_login_method: None, + role: None, + user: None, + user_id: None, + user_name: None, + user_url: None, + visibility: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> OrganizationMembershipVisibilityUpdate { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_has_two_factor(&mut self, has_two_factor: bool) { + self.has_two_factor = Some(has_two_factor); + } + + pub fn with_has_two_factor(mut self, has_two_factor: bool) -> OrganizationMembershipVisibilityUpdate { + self.has_two_factor = Some(has_two_factor); + self + } + + pub fn has_two_factor(&self) -> Option<&bool> { + self.has_two_factor.as_ref() + } + + pub fn reset_has_two_factor(&mut self) { + self.has_two_factor = None; + } + + pub fn set_joined_at(&mut self, joined_at: String) { + self.joined_at = Some(joined_at); + } + + pub fn with_joined_at(mut self, joined_at: String) -> OrganizationMembershipVisibilityUpdate { + self.joined_at = Some(joined_at); + self + } + + pub fn joined_at(&self) -> Option<&String> { + self.joined_at.as_ref() + } + + pub fn reset_joined_at(&mut self) { + self.joined_at = None; + } + + pub fn set_last_login_at(&mut self, last_login_at: String) { + self.last_login_at = Some(last_login_at); + } + + pub fn with_last_login_at(mut self, last_login_at: String) -> OrganizationMembershipVisibilityUpdate { + self.last_login_at = Some(last_login_at); + self + } + + pub fn last_login_at(&self) -> Option<&String> { + self.last_login_at.as_ref() + } + + pub fn reset_last_login_at(&mut self) { + self.last_login_at = None; + } + + pub fn set_last_login_method(&mut self, last_login_method: String) { + self.last_login_method = Some(last_login_method); + } + + pub fn with_last_login_method(mut self, last_login_method: String) -> OrganizationMembershipVisibilityUpdate { + self.last_login_method = Some(last_login_method); + self + } + + pub fn last_login_method(&self) -> Option<&String> { + self.last_login_method.as_ref() + } + + pub fn reset_last_login_method(&mut self) { + self.last_login_method = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationMembershipVisibilityUpdate { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> OrganizationMembershipVisibilityUpdate { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_id(&mut self, user_id: String) { + self.user_id = Some(user_id); + } + + pub fn with_user_id(mut self, user_id: String) -> OrganizationMembershipVisibilityUpdate { + self.user_id = Some(user_id); + self + } + + pub fn user_id(&self) -> Option<&String> { + self.user_id.as_ref() + } + + pub fn reset_user_id(&mut self) { + self.user_id = None; + } + + pub fn set_user_name(&mut self, user_name: String) { + self.user_name = Some(user_name); + } + + pub fn with_user_name(mut self, user_name: String) -> OrganizationMembershipVisibilityUpdate { + self.user_name = Some(user_name); + self + } + + pub fn user_name(&self) -> Option<&String> { + self.user_name.as_ref() + } + + pub fn reset_user_name(&mut self) { + self.user_name = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> OrganizationMembershipVisibilityUpdate { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationMembershipVisibilityUpdate { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_membership_visibility_update_request_patch.rs b/bindings/rust/src/src/models/organization_membership_visibility_update_request_patch.rs new file mode 100644 index 00000000..cc65cfba --- /dev/null +++ b/bindings/rust/src/src/models/organization_membership_visibility_update_request_patch.rs @@ -0,0 +1,48 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationMembershipVisibilityUpdateRequestPatch { + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationMembershipVisibilityUpdateRequestPatch { + pub fn new() -> OrganizationMembershipVisibilityUpdateRequestPatch { + OrganizationMembershipVisibilityUpdateRequestPatch { + visibility: None + } + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationMembershipVisibilityUpdateRequestPatch { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_package_license_policy.rs b/bindings/rust/src/src/models/organization_package_license_policy.rs new file mode 100644 index 00000000..304590d5 --- /dev/null +++ b/bindings/rust/src/src/models/organization_package_license_policy.rs @@ -0,0 +1,202 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationPackageLicensePolicy { + #[serde(rename = "allow_unknown_licenses")] + allow_unknown_licenses: Option, + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "spdx_identifiers")] + spdx_identifiers: Vec, + #[serde(rename = "updated_at")] + updated_at: Option +} + +impl OrganizationPackageLicensePolicy { + pub fn new(name: String, spdx_identifiers: Vec) -> OrganizationPackageLicensePolicy { + OrganizationPackageLicensePolicy { + allow_unknown_licenses: None, + created_at: None, + description: None, + name: name, + on_violation_quarantine: None, + package_query_string: None, + slug_perm: None, + spdx_identifiers: spdx_identifiers, + updated_at: None + } + } + + pub fn set_allow_unknown_licenses(&mut self, allow_unknown_licenses: bool) { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + } + + pub fn with_allow_unknown_licenses(mut self, allow_unknown_licenses: bool) -> OrganizationPackageLicensePolicy { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + self + } + + pub fn allow_unknown_licenses(&self) -> Option<&bool> { + self.allow_unknown_licenses.as_ref() + } + + pub fn reset_allow_unknown_licenses(&mut self) { + self.allow_unknown_licenses = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> OrganizationPackageLicensePolicy { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationPackageLicensePolicy { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> OrganizationPackageLicensePolicy { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> OrganizationPackageLicensePolicy { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> OrganizationPackageLicensePolicy { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> OrganizationPackageLicensePolicy { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_spdx_identifiers(&mut self, spdx_identifiers: Vec) { + self.spdx_identifiers = spdx_identifiers; + } + + pub fn with_spdx_identifiers(mut self, spdx_identifiers: Vec) -> OrganizationPackageLicensePolicy { + self.spdx_identifiers = spdx_identifiers; + self + } + + pub fn spdx_identifiers(&self) -> &Vec { + &self.spdx_identifiers + } + + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> OrganizationPackageLicensePolicy { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_package_license_policy_request.rs b/bindings/rust/src/src/models/organization_package_license_policy_request.rs new file mode 100644 index 00000000..05dc9aa4 --- /dev/null +++ b/bindings/rust/src/src/models/organization_package_license_policy_request.rs @@ -0,0 +1,142 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationPackageLicensePolicyRequest { + #[serde(rename = "allow_unknown_licenses")] + allow_unknown_licenses: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option, + #[serde(rename = "spdx_identifiers")] + spdx_identifiers: Vec +} + +impl OrganizationPackageLicensePolicyRequest { + pub fn new(name: String, spdx_identifiers: Vec) -> OrganizationPackageLicensePolicyRequest { + OrganizationPackageLicensePolicyRequest { + allow_unknown_licenses: None, + description: None, + name: name, + on_violation_quarantine: None, + package_query_string: None, + spdx_identifiers: spdx_identifiers + } + } + + pub fn set_allow_unknown_licenses(&mut self, allow_unknown_licenses: bool) { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + } + + pub fn with_allow_unknown_licenses(mut self, allow_unknown_licenses: bool) -> OrganizationPackageLicensePolicyRequest { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + self + } + + pub fn allow_unknown_licenses(&self) -> Option<&bool> { + self.allow_unknown_licenses.as_ref() + } + + pub fn reset_allow_unknown_licenses(&mut self) { + self.allow_unknown_licenses = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationPackageLicensePolicyRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> OrganizationPackageLicensePolicyRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> OrganizationPackageLicensePolicyRequest { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> OrganizationPackageLicensePolicyRequest { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + + pub fn set_spdx_identifiers(&mut self, spdx_identifiers: Vec) { + self.spdx_identifiers = spdx_identifiers; + } + + pub fn with_spdx_identifiers(mut self, spdx_identifiers: Vec) -> OrganizationPackageLicensePolicyRequest { + self.spdx_identifiers = spdx_identifiers; + self + } + + pub fn spdx_identifiers(&self) -> &Vec { + &self.spdx_identifiers + } + + +} + + + diff --git a/bindings/rust/src/src/models/organization_package_license_policy_request_patch.rs b/bindings/rust/src/src/models/organization_package_license_policy_request_patch.rs new file mode 100644 index 00000000..af866d21 --- /dev/null +++ b/bindings/rust/src/src/models/organization_package_license_policy_request_patch.rs @@ -0,0 +1,148 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationPackageLicensePolicyRequestPatch { + #[serde(rename = "allow_unknown_licenses")] + allow_unknown_licenses: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option, + #[serde(rename = "spdx_identifiers")] + spdx_identifiers: Option> +} + +impl OrganizationPackageLicensePolicyRequestPatch { + pub fn new() -> OrganizationPackageLicensePolicyRequestPatch { + OrganizationPackageLicensePolicyRequestPatch { + allow_unknown_licenses: None, + description: None, + name: None, + on_violation_quarantine: None, + package_query_string: None, + spdx_identifiers: None + } + } + + pub fn set_allow_unknown_licenses(&mut self, allow_unknown_licenses: bool) { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + } + + pub fn with_allow_unknown_licenses(mut self, allow_unknown_licenses: bool) -> OrganizationPackageLicensePolicyRequestPatch { + self.allow_unknown_licenses = Some(allow_unknown_licenses); + self + } + + pub fn allow_unknown_licenses(&self) -> Option<&bool> { + self.allow_unknown_licenses.as_ref() + } + + pub fn reset_allow_unknown_licenses(&mut self) { + self.allow_unknown_licenses = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationPackageLicensePolicyRequestPatch { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> OrganizationPackageLicensePolicyRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> OrganizationPackageLicensePolicyRequestPatch { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> OrganizationPackageLicensePolicyRequestPatch { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + + pub fn set_spdx_identifiers(&mut self, spdx_identifiers: Vec) { + self.spdx_identifiers = Some(spdx_identifiers); + } + + pub fn with_spdx_identifiers(mut self, spdx_identifiers: Vec) -> OrganizationPackageLicensePolicyRequestPatch { + self.spdx_identifiers = Some(spdx_identifiers); + self + } + + pub fn spdx_identifiers(&self) -> Option<&Vec> { + self.spdx_identifiers.as_ref() + } + + pub fn reset_spdx_identifiers(&mut self) { + self.spdx_identifiers = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_package_vulnerability_policy.rs b/bindings/rust/src/src/models/organization_package_vulnerability_policy.rs new file mode 100644 index 00000000..f57a744f --- /dev/null +++ b/bindings/rust/src/src/models/organization_package_vulnerability_policy.rs @@ -0,0 +1,206 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationPackageVulnerabilityPolicy { + /// Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. + #[serde(rename = "allow_unknown_severity")] + allow_unknown_severity: Option, + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "min_severity")] + min_severity: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option +} + +impl OrganizationPackageVulnerabilityPolicy { + pub fn new(name: String) -> OrganizationPackageVulnerabilityPolicy { + OrganizationPackageVulnerabilityPolicy { + allow_unknown_severity: None, + created_at: None, + description: None, + min_severity: None, + name: name, + on_violation_quarantine: None, + package_query_string: None, + slug_perm: None, + updated_at: None + } + } + + pub fn set_allow_unknown_severity(&mut self, allow_unknown_severity: bool) { + self.allow_unknown_severity = Some(allow_unknown_severity); + } + + pub fn with_allow_unknown_severity(mut self, allow_unknown_severity: bool) -> OrganizationPackageVulnerabilityPolicy { + self.allow_unknown_severity = Some(allow_unknown_severity); + self + } + + pub fn allow_unknown_severity(&self) -> Option<&bool> { + self.allow_unknown_severity.as_ref() + } + + pub fn reset_allow_unknown_severity(&mut self) { + self.allow_unknown_severity = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> OrganizationPackageVulnerabilityPolicy { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationPackageVulnerabilityPolicy { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_min_severity(&mut self, min_severity: String) { + self.min_severity = Some(min_severity); + } + + pub fn with_min_severity(mut self, min_severity: String) -> OrganizationPackageVulnerabilityPolicy { + self.min_severity = Some(min_severity); + self + } + + pub fn min_severity(&self) -> Option<&String> { + self.min_severity.as_ref() + } + + pub fn reset_min_severity(&mut self) { + self.min_severity = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> OrganizationPackageVulnerabilityPolicy { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> OrganizationPackageVulnerabilityPolicy { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> OrganizationPackageVulnerabilityPolicy { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> OrganizationPackageVulnerabilityPolicy { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> OrganizationPackageVulnerabilityPolicy { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_package_vulnerability_policy_request.rs b/bindings/rust/src/src/models/organization_package_vulnerability_policy_request.rs new file mode 100644 index 00000000..974d4728 --- /dev/null +++ b/bindings/rust/src/src/models/organization_package_vulnerability_policy_request.rs @@ -0,0 +1,146 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationPackageVulnerabilityPolicyRequest { + /// Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. + #[serde(rename = "allow_unknown_severity")] + allow_unknown_severity: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "min_severity")] + min_severity: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option +} + +impl OrganizationPackageVulnerabilityPolicyRequest { + pub fn new(name: String) -> OrganizationPackageVulnerabilityPolicyRequest { + OrganizationPackageVulnerabilityPolicyRequest { + allow_unknown_severity: None, + description: None, + min_severity: None, + name: name, + on_violation_quarantine: None, + package_query_string: None + } + } + + pub fn set_allow_unknown_severity(&mut self, allow_unknown_severity: bool) { + self.allow_unknown_severity = Some(allow_unknown_severity); + } + + pub fn with_allow_unknown_severity(mut self, allow_unknown_severity: bool) -> OrganizationPackageVulnerabilityPolicyRequest { + self.allow_unknown_severity = Some(allow_unknown_severity); + self + } + + pub fn allow_unknown_severity(&self) -> Option<&bool> { + self.allow_unknown_severity.as_ref() + } + + pub fn reset_allow_unknown_severity(&mut self) { + self.allow_unknown_severity = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationPackageVulnerabilityPolicyRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_min_severity(&mut self, min_severity: String) { + self.min_severity = Some(min_severity); + } + + pub fn with_min_severity(mut self, min_severity: String) -> OrganizationPackageVulnerabilityPolicyRequest { + self.min_severity = Some(min_severity); + self + } + + pub fn min_severity(&self) -> Option<&String> { + self.min_severity.as_ref() + } + + pub fn reset_min_severity(&mut self) { + self.min_severity = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> OrganizationPackageVulnerabilityPolicyRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> OrganizationPackageVulnerabilityPolicyRequest { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> OrganizationPackageVulnerabilityPolicyRequest { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_package_vulnerability_policy_request_patch.rs b/bindings/rust/src/src/models/organization_package_vulnerability_policy_request_patch.rs new file mode 100644 index 00000000..3b87f6cd --- /dev/null +++ b/bindings/rust/src/src/models/organization_package_vulnerability_policy_request_patch.rs @@ -0,0 +1,149 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationPackageVulnerabilityPolicyRequestPatch { + /// Denotes whether vulnerabilities detected by a security scan with an unknown severity are permitted by this policy. + #[serde(rename = "allow_unknown_severity")] + allow_unknown_severity: Option, + #[serde(rename = "description")] + description: Option, + #[serde(rename = "min_severity")] + min_severity: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "on_violation_quarantine")] + on_violation_quarantine: Option, + #[serde(rename = "package_query_string")] + package_query_string: Option +} + +impl OrganizationPackageVulnerabilityPolicyRequestPatch { + pub fn new() -> OrganizationPackageVulnerabilityPolicyRequestPatch { + OrganizationPackageVulnerabilityPolicyRequestPatch { + allow_unknown_severity: None, + description: None, + min_severity: None, + name: None, + on_violation_quarantine: None, + package_query_string: None + } + } + + pub fn set_allow_unknown_severity(&mut self, allow_unknown_severity: bool) { + self.allow_unknown_severity = Some(allow_unknown_severity); + } + + pub fn with_allow_unknown_severity(mut self, allow_unknown_severity: bool) -> OrganizationPackageVulnerabilityPolicyRequestPatch { + self.allow_unknown_severity = Some(allow_unknown_severity); + self + } + + pub fn allow_unknown_severity(&self) -> Option<&bool> { + self.allow_unknown_severity.as_ref() + } + + pub fn reset_allow_unknown_severity(&mut self) { + self.allow_unknown_severity = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationPackageVulnerabilityPolicyRequestPatch { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_min_severity(&mut self, min_severity: String) { + self.min_severity = Some(min_severity); + } + + pub fn with_min_severity(mut self, min_severity: String) -> OrganizationPackageVulnerabilityPolicyRequestPatch { + self.min_severity = Some(min_severity); + self + } + + pub fn min_severity(&self) -> Option<&String> { + self.min_severity.as_ref() + } + + pub fn reset_min_severity(&mut self) { + self.min_severity = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> OrganizationPackageVulnerabilityPolicyRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_on_violation_quarantine(&mut self, on_violation_quarantine: bool) { + self.on_violation_quarantine = Some(on_violation_quarantine); + } + + pub fn with_on_violation_quarantine(mut self, on_violation_quarantine: bool) -> OrganizationPackageVulnerabilityPolicyRequestPatch { + self.on_violation_quarantine = Some(on_violation_quarantine); + self + } + + pub fn on_violation_quarantine(&self) -> Option<&bool> { + self.on_violation_quarantine.as_ref() + } + + pub fn reset_on_violation_quarantine(&mut self) { + self.on_violation_quarantine = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> OrganizationPackageVulnerabilityPolicyRequestPatch { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_saml_auth.rs b/bindings/rust/src/src/models/organization_saml_auth.rs new file mode 100644 index 00000000..cf178602 --- /dev/null +++ b/bindings/rust/src/src/models/organization_saml_auth.rs @@ -0,0 +1,104 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationSamlAuth { + #[serde(rename = "saml_auth_enabled")] + saml_auth_enabled: bool, + #[serde(rename = "saml_auth_enforced")] + saml_auth_enforced: bool, + /// If configured, SAML metadata will be used as entered instead of retrieved from a remote URL. + #[serde(rename = "saml_metadata_inline")] + saml_metadata_inline: Option, + /// If configured, SAML metadata be retrieved from a remote URL. + #[serde(rename = "saml_metadata_url")] + saml_metadata_url: Option +} + +impl OrganizationSamlAuth { + pub fn new(saml_auth_enabled: bool, saml_auth_enforced: bool) -> OrganizationSamlAuth { + OrganizationSamlAuth { + saml_auth_enabled: saml_auth_enabled, + saml_auth_enforced: saml_auth_enforced, + saml_metadata_inline: None, + saml_metadata_url: None + } + } + + pub fn set_saml_auth_enabled(&mut self, saml_auth_enabled: bool) { + self.saml_auth_enabled = saml_auth_enabled; + } + + pub fn with_saml_auth_enabled(mut self, saml_auth_enabled: bool) -> OrganizationSamlAuth { + self.saml_auth_enabled = saml_auth_enabled; + self + } + + pub fn saml_auth_enabled(&self) -> &bool { + &self.saml_auth_enabled + } + + + pub fn set_saml_auth_enforced(&mut self, saml_auth_enforced: bool) { + self.saml_auth_enforced = saml_auth_enforced; + } + + pub fn with_saml_auth_enforced(mut self, saml_auth_enforced: bool) -> OrganizationSamlAuth { + self.saml_auth_enforced = saml_auth_enforced; + self + } + + pub fn saml_auth_enforced(&self) -> &bool { + &self.saml_auth_enforced + } + + + pub fn set_saml_metadata_inline(&mut self, saml_metadata_inline: String) { + self.saml_metadata_inline = Some(saml_metadata_inline); + } + + pub fn with_saml_metadata_inline(mut self, saml_metadata_inline: String) -> OrganizationSamlAuth { + self.saml_metadata_inline = Some(saml_metadata_inline); + self + } + + pub fn saml_metadata_inline(&self) -> Option<&String> { + self.saml_metadata_inline.as_ref() + } + + pub fn reset_saml_metadata_inline(&mut self) { + self.saml_metadata_inline = None; + } + + pub fn set_saml_metadata_url(&mut self, saml_metadata_url: String) { + self.saml_metadata_url = Some(saml_metadata_url); + } + + pub fn with_saml_metadata_url(mut self, saml_metadata_url: String) -> OrganizationSamlAuth { + self.saml_metadata_url = Some(saml_metadata_url); + self + } + + pub fn saml_metadata_url(&self) -> Option<&String> { + self.saml_metadata_url.as_ref() + } + + pub fn reset_saml_metadata_url(&mut self) { + self.saml_metadata_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_saml_auth_request_patch.rs b/bindings/rust/src/src/models/organization_saml_auth_request_patch.rs new file mode 100644 index 00000000..4c2ec965 --- /dev/null +++ b/bindings/rust/src/src/models/organization_saml_auth_request_patch.rs @@ -0,0 +1,110 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationSamlAuthRequestPatch { + #[serde(rename = "saml_auth_enabled")] + saml_auth_enabled: Option, + #[serde(rename = "saml_auth_enforced")] + saml_auth_enforced: Option, + /// If configured, SAML metadata will be used as entered instead of retrieved from a remote URL. + #[serde(rename = "saml_metadata_inline")] + saml_metadata_inline: Option, + /// If configured, SAML metadata be retrieved from a remote URL. + #[serde(rename = "saml_metadata_url")] + saml_metadata_url: Option +} + +impl OrganizationSamlAuthRequestPatch { + pub fn new() -> OrganizationSamlAuthRequestPatch { + OrganizationSamlAuthRequestPatch { + saml_auth_enabled: None, + saml_auth_enforced: None, + saml_metadata_inline: None, + saml_metadata_url: None + } + } + + pub fn set_saml_auth_enabled(&mut self, saml_auth_enabled: bool) { + self.saml_auth_enabled = Some(saml_auth_enabled); + } + + pub fn with_saml_auth_enabled(mut self, saml_auth_enabled: bool) -> OrganizationSamlAuthRequestPatch { + self.saml_auth_enabled = Some(saml_auth_enabled); + self + } + + pub fn saml_auth_enabled(&self) -> Option<&bool> { + self.saml_auth_enabled.as_ref() + } + + pub fn reset_saml_auth_enabled(&mut self) { + self.saml_auth_enabled = None; + } + + pub fn set_saml_auth_enforced(&mut self, saml_auth_enforced: bool) { + self.saml_auth_enforced = Some(saml_auth_enforced); + } + + pub fn with_saml_auth_enforced(mut self, saml_auth_enforced: bool) -> OrganizationSamlAuthRequestPatch { + self.saml_auth_enforced = Some(saml_auth_enforced); + self + } + + pub fn saml_auth_enforced(&self) -> Option<&bool> { + self.saml_auth_enforced.as_ref() + } + + pub fn reset_saml_auth_enforced(&mut self) { + self.saml_auth_enforced = None; + } + + pub fn set_saml_metadata_inline(&mut self, saml_metadata_inline: String) { + self.saml_metadata_inline = Some(saml_metadata_inline); + } + + pub fn with_saml_metadata_inline(mut self, saml_metadata_inline: String) -> OrganizationSamlAuthRequestPatch { + self.saml_metadata_inline = Some(saml_metadata_inline); + self + } + + pub fn saml_metadata_inline(&self) -> Option<&String> { + self.saml_metadata_inline.as_ref() + } + + pub fn reset_saml_metadata_inline(&mut self) { + self.saml_metadata_inline = None; + } + + pub fn set_saml_metadata_url(&mut self, saml_metadata_url: String) { + self.saml_metadata_url = Some(saml_metadata_url); + } + + pub fn with_saml_metadata_url(mut self, saml_metadata_url: String) -> OrganizationSamlAuthRequestPatch { + self.saml_metadata_url = Some(saml_metadata_url); + self + } + + pub fn saml_metadata_url(&self) -> Option<&String> { + self.saml_metadata_url.as_ref() + } + + pub fn reset_saml_metadata_url(&mut self) { + self.saml_metadata_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_team.rs b/bindings/rust/src/src/models/organization_team.rs new file mode 100644 index 00000000..d5e8f8fd --- /dev/null +++ b/bindings/rust/src/src/models/organization_team.rs @@ -0,0 +1,125 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationTeam { + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationTeam { + pub fn new(name: String) -> OrganizationTeam { + OrganizationTeam { + description: None, + name: name, + slug: None, + slug_perm: None, + visibility: None + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationTeam { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> OrganizationTeam { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> OrganizationTeam { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> OrganizationTeam { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationTeam { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_team_invite.rs b/bindings/rust/src/src/models/organization_team_invite.rs new file mode 100644 index 00000000..316282da --- /dev/null +++ b/bindings/rust/src/src/models/organization_team_invite.rs @@ -0,0 +1,67 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationTeamInvite { + /// The role to be assigned to the invited user in the team. + #[serde(rename = "role")] + role: Option, + /// The team identifier (slug). + #[serde(rename = "team")] + team: String +} + +impl OrganizationTeamInvite { + pub fn new(team: String) -> OrganizationTeamInvite { + OrganizationTeamInvite { + role: None, + team: team + } + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> OrganizationTeamInvite { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_team(&mut self, team: String) { + self.team = team; + } + + pub fn with_team(mut self, team: String) -> OrganizationTeamInvite { + self.team = team; + self + } + + pub fn team(&self) -> &String { + &self.team + } + + +} + + + diff --git a/bindings/rust/src/src/models/organization_team_members.rs b/bindings/rust/src/src/models/organization_team_members.rs new file mode 100644 index 00000000..f30c3bce --- /dev/null +++ b/bindings/rust/src/src/models/organization_team_members.rs @@ -0,0 +1,46 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationTeamMembers { + /// The team members + #[serde(rename = "members")] + members: Vec<::models::OrganizationTeamMembership> +} + +impl OrganizationTeamMembers { + pub fn new(members: Vec<::models::OrganizationTeamMembership>) -> OrganizationTeamMembers { + OrganizationTeamMembers { + members: members + } + } + + pub fn set_members(&mut self, members: Vec<::models::OrganizationTeamMembership>) { + self.members = members; + } + + pub fn with_members(mut self, members: Vec<::models::OrganizationTeamMembership>) -> OrganizationTeamMembers { + self.members = members; + self + } + + pub fn members(&self) -> &Vec<::models::OrganizationTeamMembership> { + &self.members + } + + +} + + + diff --git a/bindings/rust/src/src/models/organization_team_membership.rs b/bindings/rust/src/src/models/organization_team_membership.rs new file mode 100644 index 00000000..95b7f306 --- /dev/null +++ b/bindings/rust/src/src/models/organization_team_membership.rs @@ -0,0 +1,64 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// OrganizationTeamMembership : The team members + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationTeamMembership { + #[serde(rename = "role")] + role: String, + #[serde(rename = "user")] + user: String +} + +impl OrganizationTeamMembership { + /// The team members + pub fn new(role: String, user: String) -> OrganizationTeamMembership { + OrganizationTeamMembership { + role: role, + user: user + } + } + + pub fn set_role(&mut self, role: String) { + self.role = role; + } + + pub fn with_role(mut self, role: String) -> OrganizationTeamMembership { + self.role = role; + self + } + + pub fn role(&self) -> &String { + &self.role + } + + + pub fn set_user(&mut self, user: String) { + self.user = user; + } + + pub fn with_user(mut self, user: String) -> OrganizationTeamMembership { + self.user = user; + self + } + + pub fn user(&self) -> &String { + &self.user + } + + +} + + + diff --git a/bindings/rust/src/src/models/organization_team_request.rs b/bindings/rust/src/src/models/organization_team_request.rs new file mode 100644 index 00000000..4b4e0796 --- /dev/null +++ b/bindings/rust/src/src/models/organization_team_request.rs @@ -0,0 +1,105 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationTeamRequest { + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationTeamRequest { + pub fn new(name: String) -> OrganizationTeamRequest { + OrganizationTeamRequest { + description: None, + name: name, + slug: None, + visibility: None + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationTeamRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> OrganizationTeamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> OrganizationTeamRequest { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationTeamRequest { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/organization_team_request_patch.rs b/bindings/rust/src/src/models/organization_team_request_patch.rs new file mode 100644 index 00000000..aaa4e759 --- /dev/null +++ b/bindings/rust/src/src/models/organization_team_request_patch.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct OrganizationTeamRequestPatch { + #[serde(rename = "description")] + description: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "visibility")] + visibility: Option +} + +impl OrganizationTeamRequestPatch { + pub fn new() -> OrganizationTeamRequestPatch { + OrganizationTeamRequestPatch { + description: None, + name: None, + slug: None, + visibility: None + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> OrganizationTeamRequestPatch { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> OrganizationTeamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> OrganizationTeamRequestPatch { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_visibility(&mut self, visibility: String) { + self.visibility = Some(visibility); + } + + pub fn with_visibility(mut self, visibility: String) -> OrganizationTeamRequestPatch { + self.visibility = Some(visibility); + self + } + + pub fn visibility(&self) -> Option<&String> { + self.visibility.as_ref() + } + + pub fn reset_visibility(&mut self) { + self.visibility = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/p2_package_upload.rs b/bindings/rust/src/src/models/p2_package_upload.rs new file mode 100644 index 00000000..fc6cf5c5 --- /dev/null +++ b/bindings/rust/src/src/models/p2_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct P2PackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl P2PackageUpload { + pub fn new() -> P2PackageUpload { + P2PackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> P2PackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> P2PackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> P2PackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> P2PackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> P2PackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> P2PackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> P2PackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> P2PackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> P2PackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> P2PackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> P2PackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> P2PackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> P2PackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> P2PackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> P2PackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> P2PackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> P2PackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> P2PackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> P2PackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> P2PackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> P2PackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> P2PackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> P2PackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> P2PackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> P2PackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> P2PackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> P2PackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> P2PackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> P2PackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> P2PackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> P2PackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> P2PackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> P2PackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> P2PackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> P2PackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> P2PackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> P2PackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> P2PackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> P2PackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> P2PackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> P2PackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> P2PackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> P2PackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> P2PackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> P2PackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> P2PackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> P2PackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> P2PackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> P2PackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> P2PackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> P2PackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> P2PackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> P2PackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> P2PackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> P2PackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> P2PackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> P2PackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> P2PackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> P2PackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> P2PackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> P2PackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> P2PackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> P2PackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> P2PackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> P2PackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> P2PackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> P2PackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> P2PackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> P2PackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> P2PackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> P2PackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> P2PackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> P2PackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> P2PackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> P2PackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> P2PackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> P2PackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> P2PackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> P2PackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> P2PackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/p2_package_upload_request.rs b/bindings/rust/src/src/models/p2_package_upload_request.rs new file mode 100644 index 00000000..1342b95e --- /dev/null +++ b/bindings/rust/src/src/models/p2_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct P2PackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl P2PackageUploadRequest { + pub fn new(package_file: String) -> P2PackageUploadRequest { + P2PackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> P2PackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> P2PackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> P2PackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package.rs b/bindings/rust/src/src/models/package.rs new file mode 100644 index 00000000..b46d11bc --- /dev/null +++ b/bindings/rust/src/src/models/package.rs @@ -0,0 +1,1674 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Package { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags")] + tags: Option<::models::Tags>, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl Package { + pub fn new() -> Package { + Package { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> Package { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> Package { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> Package { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> Package { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> Package { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> Package { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> Package { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> Package { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> Package { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> Package { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> Package { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> Package { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> Package { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> Package { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> Package { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> Package { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> Package { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> Package { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> Package { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> Package { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> Package { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> Package { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> Package { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> Package { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> Package { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> Package { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> Package { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> Package { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> Package { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> Package { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> Package { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> Package { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> Package { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> Package { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> Package { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> Package { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> Package { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> Package { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> Package { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> Package { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> Package { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> Package { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> Package { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> Package { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> Package { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> Package { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> Package { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> Package { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> Package { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> Package { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> Package { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> Package { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> Package { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> Package { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> Package { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> Package { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> Package { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> Package { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> Package { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> Package { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> Package { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> Package { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> Package { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> Package { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> Package { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> Package { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> Package { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> Package { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> Package { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> Package { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> Package { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> Package { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags(&mut self, tags: ::models::Tags) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: ::models::Tags) -> Package { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&::models::Tags> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> Package { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> Package { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> Package { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> Package { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> Package { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> Package { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> Package { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> Package { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_copy.rs b/bindings/rust/src/src/models/package_copy.rs new file mode 100644 index 00000000..cb785fe2 --- /dev/null +++ b/bindings/rust/src/src/models/package_copy.rs @@ -0,0 +1,1675 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageCopy { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + /// The repository the package will be copied to. + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags")] + tags: Option<::models::Tags>, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl PackageCopy { + pub fn new() -> PackageCopy { + PackageCopy { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> PackageCopy { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PackageCopy { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PackageCopy { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PackageCopy { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PackageCopy { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PackageCopy { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> PackageCopy { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> PackageCopy { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageCopy { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> PackageCopy { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> PackageCopy { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> PackageCopy { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PackageCopy { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> PackageCopy { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> PackageCopy { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PackageCopy { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> PackageCopy { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> PackageCopy { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> PackageCopy { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> PackageCopy { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> PackageCopy { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> PackageCopy { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> PackageCopy { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> PackageCopy { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PackageCopy { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PackageCopy { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PackageCopy { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageCopy { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PackageCopy { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PackageCopy { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PackageCopy { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PackageCopy { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PackageCopy { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PackageCopy { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PackageCopy { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PackageCopy { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PackageCopy { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PackageCopy { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> PackageCopy { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageCopy { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> PackageCopy { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> PackageCopy { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> PackageCopy { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> PackageCopy { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> PackageCopy { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> PackageCopy { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> PackageCopy { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> PackageCopy { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> PackageCopy { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> PackageCopy { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> PackageCopy { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> PackageCopy { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> PackageCopy { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> PackageCopy { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> PackageCopy { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PackageCopy { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PackageCopy { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PackageCopy { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> PackageCopy { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageCopy { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PackageCopy { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PackageCopy { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PackageCopy { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PackageCopy { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PackageCopy { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PackageCopy { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PackageCopy { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> PackageCopy { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> PackageCopy { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> PackageCopy { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PackageCopy { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PackageCopy { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags(&mut self, tags: ::models::Tags) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: ::models::Tags) -> PackageCopy { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&::models::Tags> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> PackageCopy { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> PackageCopy { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> PackageCopy { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> PackageCopy { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> PackageCopy { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageCopy { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> PackageCopy { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> PackageCopy { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_copy_request.rs b/bindings/rust/src/src/models/package_copy_request.rs new file mode 100644 index 00000000..6a765fba --- /dev/null +++ b/bindings/rust/src/src/models/package_copy_request.rs @@ -0,0 +1,66 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageCopyRequest { + #[serde(rename = "destination")] + destination: String, + /// If true, the package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option +} + +impl PackageCopyRequest { + pub fn new(destination: String) -> PackageCopyRequest { + PackageCopyRequest { + destination: destination, + republish: None + } + } + + pub fn set_destination(&mut self, destination: String) { + self.destination = destination; + } + + pub fn with_destination(mut self, destination: String) -> PackageCopyRequest { + self.destination = destination; + self + } + + pub fn destination(&self) -> &String { + &self.destination + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> PackageCopyRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_deny_policy.rs b/bindings/rust/src/src/models/package_deny_policy.rs new file mode 100644 index 00000000..35590611 --- /dev/null +++ b/bindings/rust/src/src/models/package_deny_policy.rs @@ -0,0 +1,207 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageDenyPolicy { + #[serde(rename = "action")] + action: Option, + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "description")] + description: Option, + /// Whether this rule is enabled or disabled. + #[serde(rename = "enabled")] + enabled: Option, + #[serde(rename = "name")] + name: Option, + /// Packages that match this query will trigger this deny rule. + #[serde(rename = "package_query_string")] + package_query_string: String, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "status")] + status: Option, + #[serde(rename = "updated_at")] + updated_at: Option +} + +impl PackageDenyPolicy { + pub fn new(package_query_string: String) -> PackageDenyPolicy { + PackageDenyPolicy { + action: None, + created_at: None, + description: None, + enabled: None, + name: None, + package_query_string: package_query_string, + slug_perm: None, + status: None, + updated_at: None + } + } + + pub fn set_action(&mut self, action: String) { + self.action = Some(action); + } + + pub fn with_action(mut self, action: String) -> PackageDenyPolicy { + self.action = Some(action); + self + } + + pub fn action(&self) -> Option<&String> { + self.action.as_ref() + } + + pub fn reset_action(&mut self) { + self.action = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> PackageDenyPolicy { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageDenyPolicy { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_enabled(&mut self, enabled: bool) { + self.enabled = Some(enabled); + } + + pub fn with_enabled(mut self, enabled: bool) -> PackageDenyPolicy { + self.enabled = Some(enabled); + self + } + + pub fn enabled(&self) -> Option<&bool> { + self.enabled.as_ref() + } + + pub fn reset_enabled(&mut self) { + self.enabled = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageDenyPolicy { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = package_query_string; + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> PackageDenyPolicy { + self.package_query_string = package_query_string; + self + } + + pub fn package_query_string(&self) -> &String { + &self.package_query_string + } + + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageDenyPolicy { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_status(&mut self, status: String) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: String) -> PackageDenyPolicy { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&String> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> PackageDenyPolicy { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_deny_policy_request.rs b/bindings/rust/src/src/models/package_deny_policy_request.rs new file mode 100644 index 00000000..c18deed8 --- /dev/null +++ b/bindings/rust/src/src/models/package_deny_policy_request.rs @@ -0,0 +1,107 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageDenyPolicyRequest { + #[serde(rename = "description")] + description: Option, + /// Whether this rule is enabled or disabled. + #[serde(rename = "enabled")] + enabled: Option, + #[serde(rename = "name")] + name: Option, + /// Packages that match this query will trigger this deny rule. + #[serde(rename = "package_query_string")] + package_query_string: String +} + +impl PackageDenyPolicyRequest { + pub fn new(package_query_string: String) -> PackageDenyPolicyRequest { + PackageDenyPolicyRequest { + description: None, + enabled: None, + name: None, + package_query_string: package_query_string + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageDenyPolicyRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_enabled(&mut self, enabled: bool) { + self.enabled = Some(enabled); + } + + pub fn with_enabled(mut self, enabled: bool) -> PackageDenyPolicyRequest { + self.enabled = Some(enabled); + self + } + + pub fn enabled(&self) -> Option<&bool> { + self.enabled.as_ref() + } + + pub fn reset_enabled(&mut self) { + self.enabled = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageDenyPolicyRequest { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = package_query_string; + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> PackageDenyPolicyRequest { + self.package_query_string = package_query_string; + self + } + + pub fn package_query_string(&self) -> &String { + &self.package_query_string + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_deny_policy_request_patch.rs b/bindings/rust/src/src/models/package_deny_policy_request_patch.rs new file mode 100644 index 00000000..9713702c --- /dev/null +++ b/bindings/rust/src/src/models/package_deny_policy_request_patch.rs @@ -0,0 +1,110 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageDenyPolicyRequestPatch { + #[serde(rename = "description")] + description: Option, + /// Whether this rule is enabled or disabled. + #[serde(rename = "enabled")] + enabled: Option, + #[serde(rename = "name")] + name: Option, + /// Packages that match this query will trigger this deny rule. + #[serde(rename = "package_query_string")] + package_query_string: Option +} + +impl PackageDenyPolicyRequestPatch { + pub fn new() -> PackageDenyPolicyRequestPatch { + PackageDenyPolicyRequestPatch { + description: None, + enabled: None, + name: None, + package_query_string: None + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageDenyPolicyRequestPatch { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_enabled(&mut self, enabled: bool) { + self.enabled = Some(enabled); + } + + pub fn with_enabled(mut self, enabled: bool) -> PackageDenyPolicyRequestPatch { + self.enabled = Some(enabled); + self + } + + pub fn enabled(&self) -> Option<&bool> { + self.enabled.as_ref() + } + + pub fn reset_enabled(&mut self) { + self.enabled = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageDenyPolicyRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_package_query_string(&mut self, package_query_string: String) { + self.package_query_string = Some(package_query_string); + } + + pub fn with_package_query_string(mut self, package_query_string: String) -> PackageDenyPolicyRequestPatch { + self.package_query_string = Some(package_query_string); + self + } + + pub fn package_query_string(&self) -> Option<&String> { + self.package_query_string.as_ref() + } + + pub fn reset_package_query_string(&mut self) { + self.package_query_string = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_dependencies.rs b/bindings/rust/src/src/models/package_dependencies.rs new file mode 100644 index 00000000..206c2587 --- /dev/null +++ b/bindings/rust/src/src/models/package_dependencies.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageDependencies { + #[serde(rename = "dependencies")] + dependencies: Vec<::models::PackageDependency> +} + +impl PackageDependencies { + pub fn new(dependencies: Vec<::models::PackageDependency>) -> PackageDependencies { + PackageDependencies { + dependencies: dependencies + } + } + + pub fn set_dependencies(&mut self, dependencies: Vec<::models::PackageDependency>) { + self.dependencies = dependencies; + } + + pub fn with_dependencies(mut self, dependencies: Vec<::models::PackageDependency>) -> PackageDependencies { + self.dependencies = dependencies; + self + } + + pub fn dependencies(&self) -> &Vec<::models::PackageDependency> { + &self.dependencies + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_dependency.rs b/bindings/rust/src/src/models/package_dependency.rs new file mode 100644 index 00000000..17011f47 --- /dev/null +++ b/bindings/rust/src/src/models/package_dependency.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageDependency { + #[serde(rename = "dep_type")] + dep_type: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "operator")] + operator: Option, + #[serde(rename = "version")] + version: Option +} + +impl PackageDependency { + pub fn new() -> PackageDependency { + PackageDependency { + dep_type: None, + name: None, + operator: None, + version: None + } + } + + pub fn set_dep_type(&mut self, dep_type: String) { + self.dep_type = Some(dep_type); + } + + pub fn with_dep_type(mut self, dep_type: String) -> PackageDependency { + self.dep_type = Some(dep_type); + self + } + + pub fn dep_type(&self) -> Option<&String> { + self.dep_type.as_ref() + } + + pub fn reset_dep_type(&mut self) { + self.dep_type = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageDependency { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_operator(&mut self, operator: String) { + self.operator = Some(operator); + } + + pub fn with_operator(mut self, operator: String) -> PackageDependency { + self.operator = Some(operator); + self + } + + pub fn operator(&self) -> Option<&String> { + self.operator.as_ref() + } + + pub fn reset_operator(&mut self) { + self.operator = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageDependency { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_file.rs b/bindings/rust/src/src/models/package_file.rs new file mode 100644 index 00000000..ac451277 --- /dev/null +++ b/bindings/rust/src/src/models/package_file.rs @@ -0,0 +1,310 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageFile { + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + #[serde(rename = "downloads")] + downloads: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_primary")] + is_primary: Option, + #[serde(rename = "is_synchronised")] + is_synchronised: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the file. + #[serde(rename = "size")] + size: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// Freeform descriptor that describes what the file is. + #[serde(rename = "tag")] + tag: Option +} + +impl PackageFile { + pub fn new() -> PackageFile { + PackageFile { + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + downloads: None, + filename: None, + is_downloadable: None, + is_primary: None, + is_synchronised: None, + signature_url: None, + size: None, + slug_perm: None, + tag: None + } + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PackageFile { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PackageFile { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PackageFile { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PackageFile { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PackageFile { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PackageFile { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PackageFile { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageFile { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_primary(&mut self, is_primary: bool) { + self.is_primary = Some(is_primary); + } + + pub fn with_is_primary(mut self, is_primary: bool) -> PackageFile { + self.is_primary = Some(is_primary); + self + } + + pub fn is_primary(&self) -> Option<&bool> { + self.is_primary.as_ref() + } + + pub fn reset_is_primary(&mut self) { + self.is_primary = None; + } + + pub fn set_is_synchronised(&mut self, is_synchronised: bool) { + self.is_synchronised = Some(is_synchronised); + } + + pub fn with_is_synchronised(mut self, is_synchronised: bool) -> PackageFile { + self.is_synchronised = Some(is_synchronised); + self + } + + pub fn is_synchronised(&self) -> Option<&bool> { + self.is_synchronised.as_ref() + } + + pub fn reset_is_synchronised(&mut self) { + self.is_synchronised = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PackageFile { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PackageFile { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageFile { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_tag(&mut self, tag: String) { + self.tag = Some(tag); + } + + pub fn with_tag(mut self, tag: String) -> PackageFile { + self.tag = Some(tag); + self + } + + pub fn tag(&self) -> Option<&String> { + self.tag.as_ref() + } + + pub fn reset_tag(&mut self) { + self.tag = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_file_parts_upload.rs b/bindings/rust/src/src/models/package_file_parts_upload.rs new file mode 100644 index 00000000..6b86c545 --- /dev/null +++ b/bindings/rust/src/src/models/package_file_parts_upload.rs @@ -0,0 +1,91 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageFilePartsUpload { + /// The identifier for the file to use uploading parts. + #[serde(rename = "identifier")] + identifier: Option, + /// The querystring to use for the next-step PUT upload. + #[serde(rename = "upload_querystring")] + upload_querystring: Option, + /// The URL to use for the next-step PUT upload + #[serde(rename = "upload_url")] + upload_url: Option +} + +impl PackageFilePartsUpload { + pub fn new() -> PackageFilePartsUpload { + PackageFilePartsUpload { + identifier: None, + upload_querystring: None, + upload_url: None + } + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = Some(identifier); + } + + pub fn with_identifier(mut self, identifier: String) -> PackageFilePartsUpload { + self.identifier = Some(identifier); + self + } + + pub fn identifier(&self) -> Option<&String> { + self.identifier.as_ref() + } + + pub fn reset_identifier(&mut self) { + self.identifier = None; + } + + pub fn set_upload_querystring(&mut self, upload_querystring: String) { + self.upload_querystring = Some(upload_querystring); + } + + pub fn with_upload_querystring(mut self, upload_querystring: String) -> PackageFilePartsUpload { + self.upload_querystring = Some(upload_querystring); + self + } + + pub fn upload_querystring(&self) -> Option<&String> { + self.upload_querystring.as_ref() + } + + pub fn reset_upload_querystring(&mut self) { + self.upload_querystring = None; + } + + pub fn set_upload_url(&mut self, upload_url: String) { + self.upload_url = Some(upload_url); + } + + pub fn with_upload_url(mut self, upload_url: String) -> PackageFilePartsUpload { + self.upload_url = Some(upload_url); + self + } + + pub fn upload_url(&self) -> Option<&String> { + self.upload_url.as_ref() + } + + pub fn reset_upload_url(&mut self) { + self.upload_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_file_upload.rs b/bindings/rust/src/src/models/package_file_upload.rs new file mode 100644 index 00000000..2d3bfd77 --- /dev/null +++ b/bindings/rust/src/src/models/package_file_upload.rs @@ -0,0 +1,133 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageFileUpload { + /// The identifier for the file to use when creating packages + #[serde(rename = "identifier")] + identifier: Option, + /// The dictionary of fields that must be sent with POST uploads + #[serde(rename = "upload_fields")] + upload_fields: Option, + /// The dictionary of headers that must be sent with uploads + #[serde(rename = "upload_headers")] + upload_headers: Option, + /// The querystring to use for the next-step POST or PUT upload + #[serde(rename = "upload_querystring")] + upload_querystring: Option, + /// The URL to use for the next-step POST or PUT upload + #[serde(rename = "upload_url")] + upload_url: Option +} + +impl PackageFileUpload { + pub fn new() -> PackageFileUpload { + PackageFileUpload { + identifier: None, + upload_fields: None, + upload_headers: None, + upload_querystring: None, + upload_url: None + } + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = Some(identifier); + } + + pub fn with_identifier(mut self, identifier: String) -> PackageFileUpload { + self.identifier = Some(identifier); + self + } + + pub fn identifier(&self) -> Option<&String> { + self.identifier.as_ref() + } + + pub fn reset_identifier(&mut self) { + self.identifier = None; + } + + pub fn set_upload_fields(&mut self, upload_fields: Value) { + self.upload_fields = Some(upload_fields); + } + + pub fn with_upload_fields(mut self, upload_fields: Value) -> PackageFileUpload { + self.upload_fields = Some(upload_fields); + self + } + + pub fn upload_fields(&self) -> Option<&Value> { + self.upload_fields.as_ref() + } + + pub fn reset_upload_fields(&mut self) { + self.upload_fields = None; + } + + pub fn set_upload_headers(&mut self, upload_headers: Value) { + self.upload_headers = Some(upload_headers); + } + + pub fn with_upload_headers(mut self, upload_headers: Value) -> PackageFileUpload { + self.upload_headers = Some(upload_headers); + self + } + + pub fn upload_headers(&self) -> Option<&Value> { + self.upload_headers.as_ref() + } + + pub fn reset_upload_headers(&mut self) { + self.upload_headers = None; + } + + pub fn set_upload_querystring(&mut self, upload_querystring: String) { + self.upload_querystring = Some(upload_querystring); + } + + pub fn with_upload_querystring(mut self, upload_querystring: String) -> PackageFileUpload { + self.upload_querystring = Some(upload_querystring); + self + } + + pub fn upload_querystring(&self) -> Option<&String> { + self.upload_querystring.as_ref() + } + + pub fn reset_upload_querystring(&mut self) { + self.upload_querystring = None; + } + + pub fn set_upload_url(&mut self, upload_url: String) { + self.upload_url = Some(upload_url); + } + + pub fn with_upload_url(mut self, upload_url: String) -> PackageFileUpload { + self.upload_url = Some(upload_url); + self + } + + pub fn upload_url(&self) -> Option<&String> { + self.upload_url.as_ref() + } + + pub fn reset_upload_url(&mut self) { + self.upload_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_file_upload_request.rs b/bindings/rust/src/src/models/package_file_upload_request.rs new file mode 100644 index 00000000..4b7a3ab2 --- /dev/null +++ b/bindings/rust/src/src/models/package_file_upload_request.rs @@ -0,0 +1,109 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageFileUploadRequest { + /// Filename for the package file upload. + #[serde(rename = "filename")] + filename: String, + /// MD5 checksum for a POST-based package file upload. + #[serde(rename = "md5_checksum")] + md5_checksum: Option, + /// The method to use for package file upload. + #[serde(rename = "method")] + method: Option, + /// SHA256 checksum for a PUT-based package file upload. + #[serde(rename = "sha256_checksum")] + sha256_checksum: Option +} + +impl PackageFileUploadRequest { + pub fn new(filename: String) -> PackageFileUploadRequest { + PackageFileUploadRequest { + filename: filename, + md5_checksum: None, + method: None, + sha256_checksum: None + } + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = filename; + } + + pub fn with_filename(mut self, filename: String) -> PackageFileUploadRequest { + self.filename = filename; + self + } + + pub fn filename(&self) -> &String { + &self.filename + } + + + pub fn set_md5_checksum(&mut self, md5_checksum: String) { + self.md5_checksum = Some(md5_checksum); + } + + pub fn with_md5_checksum(mut self, md5_checksum: String) -> PackageFileUploadRequest { + self.md5_checksum = Some(md5_checksum); + self + } + + pub fn md5_checksum(&self) -> Option<&String> { + self.md5_checksum.as_ref() + } + + pub fn reset_md5_checksum(&mut self) { + self.md5_checksum = None; + } + + pub fn set_method(&mut self, method: String) { + self.method = Some(method); + } + + pub fn with_method(mut self, method: String) -> PackageFileUploadRequest { + self.method = Some(method); + self + } + + pub fn method(&self) -> Option<&String> { + self.method.as_ref() + } + + pub fn reset_method(&mut self) { + self.method = None; + } + + pub fn set_sha256_checksum(&mut self, sha256_checksum: String) { + self.sha256_checksum = Some(sha256_checksum); + } + + pub fn with_sha256_checksum(mut self, sha256_checksum: String) -> PackageFileUploadRequest { + self.sha256_checksum = Some(sha256_checksum); + self + } + + pub fn sha256_checksum(&self) -> Option<&String> { + self.sha256_checksum.as_ref() + } + + pub fn reset_sha256_checksum(&mut self) { + self.sha256_checksum = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_license_policy_evaluation_request.rs b/bindings/rust/src/src/models/package_license_policy_evaluation_request.rs new file mode 100644 index 00000000..e7924407 --- /dev/null +++ b/bindings/rust/src/src/models/package_license_policy_evaluation_request.rs @@ -0,0 +1,168 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageLicensePolicyEvaluationRequest { + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "evaluation_count")] + evaluation_count: Option, + #[serde(rename = "policy")] + policy: Option<::models::NestedLicensePolicy>, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "status")] + status: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "violation_count")] + violation_count: Option +} + +impl PackageLicensePolicyEvaluationRequest { + pub fn new() -> PackageLicensePolicyEvaluationRequest { + PackageLicensePolicyEvaluationRequest { + created_at: None, + evaluation_count: None, + policy: None, + slug_perm: None, + status: None, + updated_at: None, + violation_count: None + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> PackageLicensePolicyEvaluationRequest { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_evaluation_count(&mut self, evaluation_count: i32) { + self.evaluation_count = Some(evaluation_count); + } + + pub fn with_evaluation_count(mut self, evaluation_count: i32) -> PackageLicensePolicyEvaluationRequest { + self.evaluation_count = Some(evaluation_count); + self + } + + pub fn evaluation_count(&self) -> Option<&i32> { + self.evaluation_count.as_ref() + } + + pub fn reset_evaluation_count(&mut self) { + self.evaluation_count = None; + } + + pub fn set_policy(&mut self, policy: ::models::NestedLicensePolicy) { + self.policy = Some(policy); + } + + pub fn with_policy(mut self, policy: ::models::NestedLicensePolicy) -> PackageLicensePolicyEvaluationRequest { + self.policy = Some(policy); + self + } + + pub fn policy(&self) -> Option<&::models::NestedLicensePolicy> { + self.policy.as_ref() + } + + pub fn reset_policy(&mut self) { + self.policy = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageLicensePolicyEvaluationRequest { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_status(&mut self, status: String) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: String) -> PackageLicensePolicyEvaluationRequest { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&String> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> PackageLicensePolicyEvaluationRequest { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_violation_count(&mut self, violation_count: i32) { + self.violation_count = Some(violation_count); + } + + pub fn with_violation_count(mut self, violation_count: i32) -> PackageLicensePolicyEvaluationRequest { + self.violation_count = Some(violation_count); + self + } + + pub fn violation_count(&self) -> Option<&i32> { + self.violation_count.as_ref() + } + + pub fn reset_violation_count(&mut self) { + self.violation_count = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_license_policy_evaluation_request_request.rs b/bindings/rust/src/src/models/package_license_policy_evaluation_request_request.rs new file mode 100644 index 00000000..97fbaf13 --- /dev/null +++ b/bindings/rust/src/src/models/package_license_policy_evaluation_request_request.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageLicensePolicyEvaluationRequestRequest { +} + +impl PackageLicensePolicyEvaluationRequestRequest { + pub fn new() -> PackageLicensePolicyEvaluationRequestRequest { + PackageLicensePolicyEvaluationRequestRequest { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/package_license_policy_violation_log.rs b/bindings/rust/src/src/models/package_license_policy_violation_log.rs new file mode 100644 index 00000000..51001885 --- /dev/null +++ b/bindings/rust/src/src/models/package_license_policy_violation_log.rs @@ -0,0 +1,99 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageLicensePolicyViolationLog { + #[serde(rename = "event_at")] + event_at: Option, + #[serde(rename = "package")] + package: ::models::PackageVulnerability, + #[serde(rename = "policy")] + policy: ::models::NestedLicensePolicy, + #[serde(rename = "reasons")] + reasons: Vec +} + +impl PackageLicensePolicyViolationLog { + pub fn new(package: ::models::PackageVulnerability, policy: ::models::NestedLicensePolicy, reasons: Vec) -> PackageLicensePolicyViolationLog { + PackageLicensePolicyViolationLog { + event_at: None, + package: package, + policy: policy, + reasons: reasons + } + } + + pub fn set_event_at(&mut self, event_at: String) { + self.event_at = Some(event_at); + } + + pub fn with_event_at(mut self, event_at: String) -> PackageLicensePolicyViolationLog { + self.event_at = Some(event_at); + self + } + + pub fn event_at(&self) -> Option<&String> { + self.event_at.as_ref() + } + + pub fn reset_event_at(&mut self) { + self.event_at = None; + } + + pub fn set_package(&mut self, package: ::models::PackageVulnerability) { + self.package = package; + } + + pub fn with_package(mut self, package: ::models::PackageVulnerability) -> PackageLicensePolicyViolationLog { + self.package = package; + self + } + + pub fn package(&self) -> &::models::PackageVulnerability { + &self.package + } + + + pub fn set_policy(&mut self, policy: ::models::NestedLicensePolicy) { + self.policy = policy; + } + + pub fn with_policy(mut self, policy: ::models::NestedLicensePolicy) -> PackageLicensePolicyViolationLog { + self.policy = policy; + self + } + + pub fn policy(&self) -> &::models::NestedLicensePolicy { + &self.policy + } + + + pub fn set_reasons(&mut self, reasons: Vec) { + self.reasons = reasons; + } + + pub fn with_reasons(mut self, reasons: Vec) -> PackageLicensePolicyViolationLog { + self.reasons = reasons; + self + } + + pub fn reasons(&self) -> &Vec { + &self.reasons + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_license_policy_violation_log_cursor_page.rs b/bindings/rust/src/src/models/package_license_policy_violation_log_cursor_page.rs new file mode 100644 index 00000000..9571b76b --- /dev/null +++ b/bindings/rust/src/src/models/package_license_policy_violation_log_cursor_page.rs @@ -0,0 +1,85 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageLicensePolicyViolationLogCursorPage { + #[serde(rename = "next")] + next: Option, + #[serde(rename = "previous")] + previous: Option, + #[serde(rename = "results")] + results: Vec<::models::PackageLicensePolicyViolationLog> +} + +impl PackageLicensePolicyViolationLogCursorPage { + pub fn new(results: Vec<::models::PackageLicensePolicyViolationLog>) -> PackageLicensePolicyViolationLogCursorPage { + PackageLicensePolicyViolationLogCursorPage { + next: None, + previous: None, + results: results + } + } + + pub fn set_next(&mut self, next: String) { + self.next = Some(next); + } + + pub fn with_next(mut self, next: String) -> PackageLicensePolicyViolationLogCursorPage { + self.next = Some(next); + self + } + + pub fn next(&self) -> Option<&String> { + self.next.as_ref() + } + + pub fn reset_next(&mut self) { + self.next = None; + } + + pub fn set_previous(&mut self, previous: String) { + self.previous = Some(previous); + } + + pub fn with_previous(mut self, previous: String) -> PackageLicensePolicyViolationLogCursorPage { + self.previous = Some(previous); + self + } + + pub fn previous(&self) -> Option<&String> { + self.previous.as_ref() + } + + pub fn reset_previous(&mut self) { + self.previous = None; + } + + pub fn set_results(&mut self, results: Vec<::models::PackageLicensePolicyViolationLog>) { + self.results = results; + } + + pub fn with_results(mut self, results: Vec<::models::PackageLicensePolicyViolationLog>) -> PackageLicensePolicyViolationLogCursorPage { + self.results = results; + self + } + + pub fn results(&self) -> &Vec<::models::PackageLicensePolicyViolationLog> { + &self.results + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_move.rs b/bindings/rust/src/src/models/package_move.rs new file mode 100644 index 00000000..ad0c2a9d --- /dev/null +++ b/bindings/rust/src/src/models/package_move.rs @@ -0,0 +1,1675 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageMove { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + /// The repository the package will be moved to. + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags")] + tags: Option<::models::Tags>, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl PackageMove { + pub fn new() -> PackageMove { + PackageMove { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> PackageMove { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PackageMove { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PackageMove { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PackageMove { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PackageMove { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PackageMove { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> PackageMove { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> PackageMove { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageMove { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> PackageMove { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> PackageMove { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> PackageMove { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PackageMove { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> PackageMove { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> PackageMove { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PackageMove { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> PackageMove { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> PackageMove { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> PackageMove { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> PackageMove { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> PackageMove { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> PackageMove { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> PackageMove { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> PackageMove { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PackageMove { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PackageMove { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PackageMove { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageMove { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PackageMove { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PackageMove { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PackageMove { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PackageMove { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PackageMove { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PackageMove { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PackageMove { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PackageMove { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PackageMove { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PackageMove { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> PackageMove { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageMove { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> PackageMove { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> PackageMove { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> PackageMove { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> PackageMove { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> PackageMove { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> PackageMove { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> PackageMove { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> PackageMove { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> PackageMove { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> PackageMove { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> PackageMove { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> PackageMove { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> PackageMove { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> PackageMove { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> PackageMove { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PackageMove { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PackageMove { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PackageMove { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> PackageMove { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageMove { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PackageMove { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PackageMove { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PackageMove { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PackageMove { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PackageMove { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PackageMove { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PackageMove { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> PackageMove { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> PackageMove { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> PackageMove { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PackageMove { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PackageMove { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags(&mut self, tags: ::models::Tags) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: ::models::Tags) -> PackageMove { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&::models::Tags> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> PackageMove { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> PackageMove { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> PackageMove { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> PackageMove { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> PackageMove { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageMove { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> PackageMove { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> PackageMove { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_move_request.rs b/bindings/rust/src/src/models/package_move_request.rs new file mode 100644 index 00000000..bb676627 --- /dev/null +++ b/bindings/rust/src/src/models/package_move_request.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageMoveRequest { + #[serde(rename = "destination")] + destination: String +} + +impl PackageMoveRequest { + pub fn new(destination: String) -> PackageMoveRequest { + PackageMoveRequest { + destination: destination + } + } + + pub fn set_destination(&mut self, destination: String) { + self.destination = destination; + } + + pub fn with_destination(mut self, destination: String) -> PackageMoveRequest { + self.destination = destination; + self + } + + pub fn destination(&self) -> &String { + &self.destination + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_quarantine.rs b/bindings/rust/src/src/models/package_quarantine.rs new file mode 100644 index 00000000..583049a9 --- /dev/null +++ b/bindings/rust/src/src/models/package_quarantine.rs @@ -0,0 +1,1653 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageQuarantine { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags")] + tags: Option<::models::Tags>, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl PackageQuarantine { + pub fn new() -> PackageQuarantine { + PackageQuarantine { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> PackageQuarantine { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PackageQuarantine { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PackageQuarantine { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PackageQuarantine { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PackageQuarantine { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PackageQuarantine { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> PackageQuarantine { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> PackageQuarantine { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageQuarantine { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> PackageQuarantine { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> PackageQuarantine { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> PackageQuarantine { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PackageQuarantine { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> PackageQuarantine { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> PackageQuarantine { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PackageQuarantine { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> PackageQuarantine { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> PackageQuarantine { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> PackageQuarantine { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> PackageQuarantine { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> PackageQuarantine { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> PackageQuarantine { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> PackageQuarantine { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> PackageQuarantine { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PackageQuarantine { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PackageQuarantine { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PackageQuarantine { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageQuarantine { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PackageQuarantine { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PackageQuarantine { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PackageQuarantine { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PackageQuarantine { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PackageQuarantine { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PackageQuarantine { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PackageQuarantine { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PackageQuarantine { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PackageQuarantine { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PackageQuarantine { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> PackageQuarantine { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageQuarantine { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> PackageQuarantine { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> PackageQuarantine { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> PackageQuarantine { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> PackageQuarantine { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> PackageQuarantine { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> PackageQuarantine { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> PackageQuarantine { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> PackageQuarantine { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> PackageQuarantine { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> PackageQuarantine { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> PackageQuarantine { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> PackageQuarantine { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> PackageQuarantine { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> PackageQuarantine { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PackageQuarantine { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PackageQuarantine { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PackageQuarantine { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> PackageQuarantine { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageQuarantine { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PackageQuarantine { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PackageQuarantine { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PackageQuarantine { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PackageQuarantine { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PackageQuarantine { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PackageQuarantine { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PackageQuarantine { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> PackageQuarantine { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> PackageQuarantine { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> PackageQuarantine { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PackageQuarantine { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PackageQuarantine { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags(&mut self, tags: ::models::Tags) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: ::models::Tags) -> PackageQuarantine { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&::models::Tags> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> PackageQuarantine { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> PackageQuarantine { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> PackageQuarantine { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> PackageQuarantine { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> PackageQuarantine { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageQuarantine { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> PackageQuarantine { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> PackageQuarantine { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_quarantine_request.rs b/bindings/rust/src/src/models/package_quarantine_request.rs new file mode 100644 index 00000000..a05fedb0 --- /dev/null +++ b/bindings/rust/src/src/models/package_quarantine_request.rs @@ -0,0 +1,70 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageQuarantineRequest { + /// If true, the package is released from quarantine. + #[serde(rename = "release")] + release: Option, + /// If true, the package is released from quarantine. Note: This field is deprecated, please use 'release' instead. + #[serde(rename = "restore")] + restore: Option +} + +impl PackageQuarantineRequest { + pub fn new() -> PackageQuarantineRequest { + PackageQuarantineRequest { + release: None, + restore: None + } + } + + pub fn set_release(&mut self, release: bool) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: bool) -> PackageQuarantineRequest { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&bool> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_restore(&mut self, restore: bool) { + self.restore = Some(restore); + } + + pub fn with_restore(mut self, restore: bool) -> PackageQuarantineRequest { + self.restore = Some(restore); + self + } + + pub fn restore(&self) -> Option<&bool> { + self.restore.as_ref() + } + + pub fn reset_restore(&mut self) { + self.restore = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_resync.rs b/bindings/rust/src/src/models/package_resync.rs new file mode 100644 index 00000000..75980ea3 --- /dev/null +++ b/bindings/rust/src/src/models/package_resync.rs @@ -0,0 +1,1674 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageResync { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags")] + tags: Option<::models::Tags>, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl PackageResync { + pub fn new() -> PackageResync { + PackageResync { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> PackageResync { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PackageResync { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PackageResync { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PackageResync { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PackageResync { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PackageResync { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> PackageResync { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> PackageResync { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageResync { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> PackageResync { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> PackageResync { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> PackageResync { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PackageResync { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> PackageResync { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> PackageResync { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PackageResync { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> PackageResync { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> PackageResync { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> PackageResync { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> PackageResync { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> PackageResync { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> PackageResync { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> PackageResync { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> PackageResync { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PackageResync { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PackageResync { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PackageResync { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageResync { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PackageResync { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PackageResync { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PackageResync { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PackageResync { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PackageResync { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PackageResync { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PackageResync { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PackageResync { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PackageResync { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PackageResync { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> PackageResync { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageResync { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> PackageResync { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> PackageResync { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> PackageResync { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> PackageResync { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> PackageResync { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> PackageResync { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> PackageResync { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> PackageResync { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> PackageResync { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> PackageResync { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> PackageResync { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> PackageResync { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> PackageResync { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> PackageResync { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> PackageResync { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PackageResync { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PackageResync { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PackageResync { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> PackageResync { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageResync { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PackageResync { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PackageResync { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PackageResync { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PackageResync { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PackageResync { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PackageResync { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PackageResync { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> PackageResync { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> PackageResync { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> PackageResync { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PackageResync { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PackageResync { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags(&mut self, tags: ::models::Tags) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: ::models::Tags) -> PackageResync { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&::models::Tags> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> PackageResync { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> PackageResync { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> PackageResync { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> PackageResync { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> PackageResync { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageResync { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> PackageResync { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> PackageResync { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_status.rs b/bindings/rust/src/src/models/package_status.rs new file mode 100644 index 00000000..fb8e9486 --- /dev/null +++ b/bindings/rust/src/src/models/package_status.rs @@ -0,0 +1,515 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageStatus { + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + #[serde(rename = "self_url")] + self_url: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option +} + +impl PackageStatus { + pub fn new() -> PackageStatus { + PackageStatus { + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + self_url: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + sync_finished_at: None, + sync_progress: None + } + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PackageStatus { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PackageStatus { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PackageStatus { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageStatus { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PackageStatus { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PackageStatus { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PackageStatus { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PackageStatus { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PackageStatus { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PackageStatus { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PackageStatus { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PackageStatus { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PackageStatus { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PackageStatus { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PackageStatus { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PackageStatus { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PackageStatus { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PackageStatus { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PackageStatus { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PackageStatus { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PackageStatus { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PackageStatus { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PackageStatus { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PackageStatus { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_tag.rs b/bindings/rust/src/src/models/package_tag.rs new file mode 100644 index 00000000..335e605d --- /dev/null +++ b/bindings/rust/src/src/models/package_tag.rs @@ -0,0 +1,1675 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageTag { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + /// If true, created tags will be immutable. An immutable flag is a tag that cannot be removed from a package. + #[serde(rename = "is_immutable")] + is_immutable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl PackageTag { + pub fn new() -> PackageTag { + PackageTag { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_immutable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> PackageTag { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PackageTag { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PackageTag { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PackageTag { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PackageTag { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PackageTag { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> PackageTag { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> PackageTag { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PackageTag { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> PackageTag { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> PackageTag { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> PackageTag { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PackageTag { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> PackageTag { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> PackageTag { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PackageTag { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> PackageTag { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> PackageTag { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> PackageTag { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> PackageTag { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> PackageTag { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> PackageTag { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> PackageTag { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> PackageTag { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PackageTag { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PackageTag { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PackageTag { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PackageTag { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_immutable(&mut self, is_immutable: bool) { + self.is_immutable = Some(is_immutable); + } + + pub fn with_is_immutable(mut self, is_immutable: bool) -> PackageTag { + self.is_immutable = Some(is_immutable); + self + } + + pub fn is_immutable(&self) -> Option<&bool> { + self.is_immutable.as_ref() + } + + pub fn reset_is_immutable(&mut self) { + self.is_immutable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PackageTag { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PackageTag { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PackageTag { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PackageTag { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PackageTag { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PackageTag { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PackageTag { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PackageTag { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PackageTag { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PackageTag { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> PackageTag { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageTag { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> PackageTag { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> PackageTag { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> PackageTag { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> PackageTag { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> PackageTag { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> PackageTag { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> PackageTag { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> PackageTag { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> PackageTag { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> PackageTag { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> PackageTag { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> PackageTag { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> PackageTag { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> PackageTag { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> PackageTag { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PackageTag { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PackageTag { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PackageTag { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> PackageTag { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageTag { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PackageTag { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PackageTag { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PackageTag { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PackageTag { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PackageTag { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PackageTag { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PackageTag { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> PackageTag { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> PackageTag { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> PackageTag { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PackageTag { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PackageTag { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> PackageTag { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> PackageTag { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> PackageTag { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> PackageTag { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> PackageTag { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageTag { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> PackageTag { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> PackageTag { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_tag_request.rs b/bindings/rust/src/src/models/package_tag_request.rs new file mode 100644 index 00000000..b9c4c512 --- /dev/null +++ b/bindings/rust/src/src/models/package_tag_request.rs @@ -0,0 +1,90 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageTagRequest { + #[serde(rename = "action")] + action: Option, + /// If true, created tags will be immutable. An immutable flag is a tag that cannot be removed from a package. + #[serde(rename = "is_immutable")] + is_immutable: Option, + /// A list of tags to apply the action to. Not required for clears. + #[serde(rename = "tags")] + tags: Option> +} + +impl PackageTagRequest { + pub fn new() -> PackageTagRequest { + PackageTagRequest { + action: None, + is_immutable: None, + tags: None + } + } + + pub fn set_action(&mut self, action: String) { + self.action = Some(action); + } + + pub fn with_action(mut self, action: String) -> PackageTagRequest { + self.action = Some(action); + self + } + + pub fn action(&self) -> Option<&String> { + self.action.as_ref() + } + + pub fn reset_action(&mut self) { + self.action = None; + } + + pub fn set_is_immutable(&mut self, is_immutable: bool) { + self.is_immutable = Some(is_immutable); + } + + pub fn with_is_immutable(mut self, is_immutable: bool) -> PackageTagRequest { + self.is_immutable = Some(is_immutable); + self + } + + pub fn is_immutable(&self) -> Option<&bool> { + self.is_immutable.as_ref() + } + + pub fn reset_is_immutable(&mut self) { + self.is_immutable = None; + } + + pub fn set_tags(&mut self, tags: Vec) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: Vec) -> PackageTagRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&Vec> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_usage_metrics.rs b/bindings/rust/src/src/models/package_usage_metrics.rs new file mode 100644 index 00000000..4e767c6c --- /dev/null +++ b/bindings/rust/src/src/models/package_usage_metrics.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageUsageMetrics { + #[serde(rename = "packages")] + packages: ::models::CommonMetrics +} + +impl PackageUsageMetrics { + pub fn new(packages: ::models::CommonMetrics) -> PackageUsageMetrics { + PackageUsageMetrics { + packages: packages + } + } + + pub fn set_packages(&mut self, packages: ::models::CommonMetrics) { + self.packages = packages; + } + + pub fn with_packages(mut self, packages: ::models::CommonMetrics) -> PackageUsageMetrics { + self.packages = packages; + self + } + + pub fn packages(&self) -> &::models::CommonMetrics { + &self.packages + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_version_badge.rs b/bindings/rust/src/src/models/package_version_badge.rs new file mode 100644 index 00000000..ceb00990 --- /dev/null +++ b/bindings/rust/src/src/models/package_version_badge.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageVersionBadge { +} + +impl PackageVersionBadge { + pub fn new() -> PackageVersionBadge { + PackageVersionBadge { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/package_vulnerability.rs b/bindings/rust/src/src/models/package_vulnerability.rs new file mode 100644 index 00000000..81e345d0 --- /dev/null +++ b/bindings/rust/src/src/models/package_vulnerability.rs @@ -0,0 +1,107 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageVulnerability { + #[serde(rename = "identifier")] + identifier: String, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "url")] + url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option +} + +impl PackageVulnerability { + pub fn new(identifier: String) -> PackageVulnerability { + PackageVulnerability { + identifier: identifier, + name: None, + url: None, + version: None + } + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = identifier; + } + + pub fn with_identifier(mut self, identifier: String) -> PackageVulnerability { + self.identifier = identifier; + self + } + + pub fn identifier(&self) -> &String { + &self.identifier + } + + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PackageVulnerability { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_url(&mut self, url: String) { + self.url = Some(url); + } + + pub fn with_url(mut self, url: String) -> PackageVulnerability { + self.url = Some(url); + self + } + + pub fn url(&self) -> Option<&String> { + self.url.as_ref() + } + + pub fn reset_url(&mut self) { + self.url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PackageVulnerability { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_vulnerability_policy_evaluation_request.rs b/bindings/rust/src/src/models/package_vulnerability_policy_evaluation_request.rs new file mode 100644 index 00000000..22c9c1ed --- /dev/null +++ b/bindings/rust/src/src/models/package_vulnerability_policy_evaluation_request.rs @@ -0,0 +1,168 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageVulnerabilityPolicyEvaluationRequest { + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "evaluation_count")] + evaluation_count: Option, + #[serde(rename = "policy")] + policy: Option<::models::NestedVulnerabilityPolicy>, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "status")] + status: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "violation_count")] + violation_count: Option +} + +impl PackageVulnerabilityPolicyEvaluationRequest { + pub fn new() -> PackageVulnerabilityPolicyEvaluationRequest { + PackageVulnerabilityPolicyEvaluationRequest { + created_at: None, + evaluation_count: None, + policy: None, + slug_perm: None, + status: None, + updated_at: None, + violation_count: None + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> PackageVulnerabilityPolicyEvaluationRequest { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_evaluation_count(&mut self, evaluation_count: i32) { + self.evaluation_count = Some(evaluation_count); + } + + pub fn with_evaluation_count(mut self, evaluation_count: i32) -> PackageVulnerabilityPolicyEvaluationRequest { + self.evaluation_count = Some(evaluation_count); + self + } + + pub fn evaluation_count(&self) -> Option<&i32> { + self.evaluation_count.as_ref() + } + + pub fn reset_evaluation_count(&mut self) { + self.evaluation_count = None; + } + + pub fn set_policy(&mut self, policy: ::models::NestedVulnerabilityPolicy) { + self.policy = Some(policy); + } + + pub fn with_policy(mut self, policy: ::models::NestedVulnerabilityPolicy) -> PackageVulnerabilityPolicyEvaluationRequest { + self.policy = Some(policy); + self + } + + pub fn policy(&self) -> Option<&::models::NestedVulnerabilityPolicy> { + self.policy.as_ref() + } + + pub fn reset_policy(&mut self) { + self.policy = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PackageVulnerabilityPolicyEvaluationRequest { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_status(&mut self, status: String) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: String) -> PackageVulnerabilityPolicyEvaluationRequest { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&String> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> PackageVulnerabilityPolicyEvaluationRequest { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_violation_count(&mut self, violation_count: i32) { + self.violation_count = Some(violation_count); + } + + pub fn with_violation_count(mut self, violation_count: i32) -> PackageVulnerabilityPolicyEvaluationRequest { + self.violation_count = Some(violation_count); + self + } + + pub fn violation_count(&self) -> Option<&i32> { + self.violation_count.as_ref() + } + + pub fn reset_violation_count(&mut self) { + self.violation_count = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/package_vulnerability_policy_evaluation_request_request.rs b/bindings/rust/src/src/models/package_vulnerability_policy_evaluation_request_request.rs new file mode 100644 index 00000000..93ffec77 --- /dev/null +++ b/bindings/rust/src/src/models/package_vulnerability_policy_evaluation_request_request.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageVulnerabilityPolicyEvaluationRequestRequest { +} + +impl PackageVulnerabilityPolicyEvaluationRequestRequest { + pub fn new() -> PackageVulnerabilityPolicyEvaluationRequestRequest { + PackageVulnerabilityPolicyEvaluationRequestRequest { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/package_vulnerability_policy_violation_log.rs b/bindings/rust/src/src/models/package_vulnerability_policy_violation_log.rs new file mode 100644 index 00000000..b7b8966c --- /dev/null +++ b/bindings/rust/src/src/models/package_vulnerability_policy_violation_log.rs @@ -0,0 +1,116 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageVulnerabilityPolicyViolationLog { + #[serde(rename = "event_at")] + event_at: Option, + #[serde(rename = "package")] + package: ::models::PackageVulnerability, + #[serde(rename = "policy")] + policy: ::models::NestedVulnerabilityPolicy, + #[serde(rename = "reasons")] + reasons: Vec, + #[serde(rename = "vulnerability_scan_results")] + vulnerability_scan_results: ::models::NestedVulnerabilityScanResults +} + +impl PackageVulnerabilityPolicyViolationLog { + pub fn new(package: ::models::PackageVulnerability, policy: ::models::NestedVulnerabilityPolicy, reasons: Vec, vulnerability_scan_results: ::models::NestedVulnerabilityScanResults) -> PackageVulnerabilityPolicyViolationLog { + PackageVulnerabilityPolicyViolationLog { + event_at: None, + package: package, + policy: policy, + reasons: reasons, + vulnerability_scan_results: vulnerability_scan_results + } + } + + pub fn set_event_at(&mut self, event_at: String) { + self.event_at = Some(event_at); + } + + pub fn with_event_at(mut self, event_at: String) -> PackageVulnerabilityPolicyViolationLog { + self.event_at = Some(event_at); + self + } + + pub fn event_at(&self) -> Option<&String> { + self.event_at.as_ref() + } + + pub fn reset_event_at(&mut self) { + self.event_at = None; + } + + pub fn set_package(&mut self, package: ::models::PackageVulnerability) { + self.package = package; + } + + pub fn with_package(mut self, package: ::models::PackageVulnerability) -> PackageVulnerabilityPolicyViolationLog { + self.package = package; + self + } + + pub fn package(&self) -> &::models::PackageVulnerability { + &self.package + } + + + pub fn set_policy(&mut self, policy: ::models::NestedVulnerabilityPolicy) { + self.policy = policy; + } + + pub fn with_policy(mut self, policy: ::models::NestedVulnerabilityPolicy) -> PackageVulnerabilityPolicyViolationLog { + self.policy = policy; + self + } + + pub fn policy(&self) -> &::models::NestedVulnerabilityPolicy { + &self.policy + } + + + pub fn set_reasons(&mut self, reasons: Vec) { + self.reasons = reasons; + } + + pub fn with_reasons(mut self, reasons: Vec) -> PackageVulnerabilityPolicyViolationLog { + self.reasons = reasons; + self + } + + pub fn reasons(&self) -> &Vec { + &self.reasons + } + + + pub fn set_vulnerability_scan_results(&mut self, vulnerability_scan_results: ::models::NestedVulnerabilityScanResults) { + self.vulnerability_scan_results = vulnerability_scan_results; + } + + pub fn with_vulnerability_scan_results(mut self, vulnerability_scan_results: ::models::NestedVulnerabilityScanResults) -> PackageVulnerabilityPolicyViolationLog { + self.vulnerability_scan_results = vulnerability_scan_results; + self + } + + pub fn vulnerability_scan_results(&self) -> &::models::NestedVulnerabilityScanResults { + &self.vulnerability_scan_results + } + + +} + + + diff --git a/bindings/rust/src/src/models/package_vulnerability_policy_violation_log_cursor_page.rs b/bindings/rust/src/src/models/package_vulnerability_policy_violation_log_cursor_page.rs new file mode 100644 index 00000000..540626ce --- /dev/null +++ b/bindings/rust/src/src/models/package_vulnerability_policy_violation_log_cursor_page.rs @@ -0,0 +1,85 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PackageVulnerabilityPolicyViolationLogCursorPage { + #[serde(rename = "next")] + next: Option, + #[serde(rename = "previous")] + previous: Option, + #[serde(rename = "results")] + results: Vec<::models::PackageVulnerabilityPolicyViolationLog> +} + +impl PackageVulnerabilityPolicyViolationLogCursorPage { + pub fn new(results: Vec<::models::PackageVulnerabilityPolicyViolationLog>) -> PackageVulnerabilityPolicyViolationLogCursorPage { + PackageVulnerabilityPolicyViolationLogCursorPage { + next: None, + previous: None, + results: results + } + } + + pub fn set_next(&mut self, next: String) { + self.next = Some(next); + } + + pub fn with_next(mut self, next: String) -> PackageVulnerabilityPolicyViolationLogCursorPage { + self.next = Some(next); + self + } + + pub fn next(&self) -> Option<&String> { + self.next.as_ref() + } + + pub fn reset_next(&mut self) { + self.next = None; + } + + pub fn set_previous(&mut self, previous: String) { + self.previous = Some(previous); + } + + pub fn with_previous(mut self, previous: String) -> PackageVulnerabilityPolicyViolationLogCursorPage { + self.previous = Some(previous); + self + } + + pub fn previous(&self) -> Option<&String> { + self.previous.as_ref() + } + + pub fn reset_previous(&mut self) { + self.previous = None; + } + + pub fn set_results(&mut self, results: Vec<::models::PackageVulnerabilityPolicyViolationLog>) { + self.results = results; + } + + pub fn with_results(mut self, results: Vec<::models::PackageVulnerabilityPolicyViolationLog>) -> PackageVulnerabilityPolicyViolationLogCursorPage { + self.results = results; + self + } + + pub fn results(&self) -> &Vec<::models::PackageVulnerabilityPolicyViolationLog> { + &self.results + } + + +} + + + diff --git a/bindings/rust/src/src/models/provider_settings.rs b/bindings/rust/src/src/models/provider_settings.rs new file mode 100644 index 00000000..3f9ef049 --- /dev/null +++ b/bindings/rust/src/src/models/provider_settings.rs @@ -0,0 +1,160 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ProviderSettings { + /// The set of claims that any received tokens from the provider must contain to authenticate as the configured service account. + #[serde(rename = "claims")] + claims: Value, + /// Whether the provider settings should be used for incoming OIDC requests. + #[serde(rename = "enabled")] + enabled: bool, + /// The name of the provider settings are being configured for + #[serde(rename = "name")] + name: String, + /// The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/ + #[serde(rename = "provider_url")] + provider_url: String, + /// The service accounts associated with these provider settings + #[serde(rename = "service_accounts")] + service_accounts: Vec, + /// The slug of the provider settings + #[serde(rename = "slug")] + slug: Option, + /// The unique, immutable identifier of the provider settings. + #[serde(rename = "slug_perm")] + slug_perm: Option +} + +impl ProviderSettings { + pub fn new(claims: Value, enabled: bool, name: String, provider_url: String, service_accounts: Vec) -> ProviderSettings { + ProviderSettings { + claims: claims, + enabled: enabled, + name: name, + provider_url: provider_url, + service_accounts: service_accounts, + slug: None, + slug_perm: None + } + } + + pub fn set_claims(&mut self, claims: Value) { + self.claims = claims; + } + + pub fn with_claims(mut self, claims: Value) -> ProviderSettings { + self.claims = claims; + self + } + + pub fn claims(&self) -> &Value { + &self.claims + } + + + pub fn set_enabled(&mut self, enabled: bool) { + self.enabled = enabled; + } + + pub fn with_enabled(mut self, enabled: bool) -> ProviderSettings { + self.enabled = enabled; + self + } + + pub fn enabled(&self) -> &bool { + &self.enabled + } + + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> ProviderSettings { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_provider_url(&mut self, provider_url: String) { + self.provider_url = provider_url; + } + + pub fn with_provider_url(mut self, provider_url: String) -> ProviderSettings { + self.provider_url = provider_url; + self + } + + pub fn provider_url(&self) -> &String { + &self.provider_url + } + + + pub fn set_service_accounts(&mut self, service_accounts: Vec) { + self.service_accounts = service_accounts; + } + + pub fn with_service_accounts(mut self, service_accounts: Vec) -> ProviderSettings { + self.service_accounts = service_accounts; + self + } + + pub fn service_accounts(&self) -> &Vec { + &self.service_accounts + } + + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> ProviderSettings { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> ProviderSettings { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/provider_settings_request.rs b/bindings/rust/src/src/models/provider_settings_request.rs new file mode 100644 index 00000000..2151ef29 --- /dev/null +++ b/bindings/rust/src/src/models/provider_settings_request.rs @@ -0,0 +1,118 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ProviderSettingsRequest { + /// The set of claims that any received tokens from the provider must contain to authenticate as the configured service account. + #[serde(rename = "claims")] + claims: Value, + /// Whether the provider settings should be used for incoming OIDC requests. + #[serde(rename = "enabled")] + enabled: bool, + /// The name of the provider settings are being configured for + #[serde(rename = "name")] + name: String, + /// The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/ + #[serde(rename = "provider_url")] + provider_url: String, + /// The service accounts associated with these provider settings + #[serde(rename = "service_accounts")] + service_accounts: Vec +} + +impl ProviderSettingsRequest { + pub fn new(claims: Value, enabled: bool, name: String, provider_url: String, service_accounts: Vec) -> ProviderSettingsRequest { + ProviderSettingsRequest { + claims: claims, + enabled: enabled, + name: name, + provider_url: provider_url, + service_accounts: service_accounts + } + } + + pub fn set_claims(&mut self, claims: Value) { + self.claims = claims; + } + + pub fn with_claims(mut self, claims: Value) -> ProviderSettingsRequest { + self.claims = claims; + self + } + + pub fn claims(&self) -> &Value { + &self.claims + } + + + pub fn set_enabled(&mut self, enabled: bool) { + self.enabled = enabled; + } + + pub fn with_enabled(mut self, enabled: bool) -> ProviderSettingsRequest { + self.enabled = enabled; + self + } + + pub fn enabled(&self) -> &bool { + &self.enabled + } + + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> ProviderSettingsRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_provider_url(&mut self, provider_url: String) { + self.provider_url = provider_url; + } + + pub fn with_provider_url(mut self, provider_url: String) -> ProviderSettingsRequest { + self.provider_url = provider_url; + self + } + + pub fn provider_url(&self) -> &String { + &self.provider_url + } + + + pub fn set_service_accounts(&mut self, service_accounts: Vec) { + self.service_accounts = service_accounts; + } + + pub fn with_service_accounts(mut self, service_accounts: Vec) -> ProviderSettingsRequest { + self.service_accounts = service_accounts; + self + } + + pub fn service_accounts(&self) -> &Vec { + &self.service_accounts + } + + +} + + + diff --git a/bindings/rust/src/src/models/provider_settings_request_patch.rs b/bindings/rust/src/src/models/provider_settings_request_patch.rs new file mode 100644 index 00000000..0bf819a2 --- /dev/null +++ b/bindings/rust/src/src/models/provider_settings_request_patch.rs @@ -0,0 +1,133 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ProviderSettingsRequestPatch { + /// The set of claims that any received tokens from the provider must contain to authenticate as the configured service account. + #[serde(rename = "claims")] + claims: Option, + /// Whether the provider settings should be used for incoming OIDC requests. + #[serde(rename = "enabled")] + enabled: Option, + /// The name of the provider settings are being configured for + #[serde(rename = "name")] + name: Option, + /// The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/ + #[serde(rename = "provider_url")] + provider_url: Option, + /// The service accounts associated with these provider settings + #[serde(rename = "service_accounts")] + service_accounts: Option> +} + +impl ProviderSettingsRequestPatch { + pub fn new() -> ProviderSettingsRequestPatch { + ProviderSettingsRequestPatch { + claims: None, + enabled: None, + name: None, + provider_url: None, + service_accounts: None + } + } + + pub fn set_claims(&mut self, claims: Value) { + self.claims = Some(claims); + } + + pub fn with_claims(mut self, claims: Value) -> ProviderSettingsRequestPatch { + self.claims = Some(claims); + self + } + + pub fn claims(&self) -> Option<&Value> { + self.claims.as_ref() + } + + pub fn reset_claims(&mut self) { + self.claims = None; + } + + pub fn set_enabled(&mut self, enabled: bool) { + self.enabled = Some(enabled); + } + + pub fn with_enabled(mut self, enabled: bool) -> ProviderSettingsRequestPatch { + self.enabled = Some(enabled); + self + } + + pub fn enabled(&self) -> Option<&bool> { + self.enabled.as_ref() + } + + pub fn reset_enabled(&mut self) { + self.enabled = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> ProviderSettingsRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_provider_url(&mut self, provider_url: String) { + self.provider_url = Some(provider_url); + } + + pub fn with_provider_url(mut self, provider_url: String) -> ProviderSettingsRequestPatch { + self.provider_url = Some(provider_url); + self + } + + pub fn provider_url(&self) -> Option<&String> { + self.provider_url.as_ref() + } + + pub fn reset_provider_url(&mut self) { + self.provider_url = None; + } + + pub fn set_service_accounts(&mut self, service_accounts: Vec) { + self.service_accounts = Some(service_accounts); + } + + pub fn with_service_accounts(mut self, service_accounts: Vec) -> ProviderSettingsRequestPatch { + self.service_accounts = Some(service_accounts); + self + } + + pub fn service_accounts(&self) -> Option<&Vec> { + self.service_accounts.as_ref() + } + + pub fn reset_service_accounts(&mut self) { + self.service_accounts = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/python_package_upload.rs b/bindings/rust/src/src/models/python_package_upload.rs new file mode 100644 index 00000000..5885bf4a --- /dev/null +++ b/bindings/rust/src/src/models/python_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PythonPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl PythonPackageUpload { + pub fn new() -> PythonPackageUpload { + PythonPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> PythonPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> PythonPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> PythonPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> PythonPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> PythonPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> PythonPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> PythonPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> PythonPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> PythonPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> PythonPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> PythonPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> PythonPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> PythonPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> PythonPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> PythonPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> PythonPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> PythonPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> PythonPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> PythonPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> PythonPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> PythonPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> PythonPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> PythonPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> PythonPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> PythonPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> PythonPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> PythonPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> PythonPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> PythonPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> PythonPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> PythonPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> PythonPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> PythonPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> PythonPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> PythonPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> PythonPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> PythonPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> PythonPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> PythonPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PythonPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> PythonPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> PythonPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> PythonPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> PythonPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> PythonPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> PythonPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> PythonPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> PythonPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> PythonPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> PythonPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> PythonPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> PythonPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> PythonPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> PythonPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> PythonPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> PythonPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> PythonPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> PythonPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> PythonPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PythonPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> PythonPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> PythonPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> PythonPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> PythonPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> PythonPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> PythonPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> PythonPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> PythonPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> PythonPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> PythonPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> PythonPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> PythonPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> PythonPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> PythonPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> PythonPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> PythonPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> PythonPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> PythonPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> PythonPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> PythonPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/python_package_upload_request.rs b/bindings/rust/src/src/models/python_package_upload_request.rs new file mode 100644 index 00000000..49979d3c --- /dev/null +++ b/bindings/rust/src/src/models/python_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PythonPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl PythonPackageUploadRequest { + pub fn new(package_file: String) -> PythonPackageUploadRequest { + PythonPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> PythonPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> PythonPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> PythonPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/python_upstream.rs b/bindings/rust/src/src/models/python_upstream.rs new file mode 100644 index 00000000..4d5bcdb5 --- /dev/null +++ b/bindings/rust/src/src/models/python_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PythonUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl PythonUpstream { + pub fn new(name: String, upstream_url: String) -> PythonUpstream { + PythonUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> PythonUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> PythonUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> PythonUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> PythonUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> PythonUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> PythonUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> PythonUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> PythonUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> PythonUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> PythonUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> PythonUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> PythonUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> PythonUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> PythonUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> PythonUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> PythonUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> PythonUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> PythonUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/python_upstream_request.rs b/bindings/rust/src/src/models/python_upstream_request.rs new file mode 100644 index 00000000..38121826 --- /dev/null +++ b/bindings/rust/src/src/models/python_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PythonUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl PythonUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> PythonUpstreamRequest { + PythonUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> PythonUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> PythonUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> PythonUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> PythonUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> PythonUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> PythonUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> PythonUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> PythonUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> PythonUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> PythonUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> PythonUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> PythonUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> PythonUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/python_upstream_request_patch.rs b/bindings/rust/src/src/models/python_upstream_request_patch.rs new file mode 100644 index 00000000..6018fad2 --- /dev/null +++ b/bindings/rust/src/src/models/python_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PythonUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl PythonUpstreamRequestPatch { + pub fn new() -> PythonUpstreamRequestPatch { + PythonUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> PythonUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> PythonUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> PythonUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> PythonUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> PythonUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> PythonUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> PythonUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> PythonUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> PythonUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> PythonUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> PythonUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> PythonUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> PythonUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/quota.rs b/bindings/rust/src/src/models/quota.rs new file mode 100644 index 00000000..de2a6061 --- /dev/null +++ b/bindings/rust/src/src/models/quota.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Quota { + #[serde(rename = "usage")] + usage: ::models::UsageFieldset +} + +impl Quota { + pub fn new(usage: ::models::UsageFieldset) -> Quota { + Quota { + usage: usage + } + } + + pub fn set_usage(&mut self, usage: ::models::UsageFieldset) { + self.usage = usage; + } + + pub fn with_usage(mut self, usage: ::models::UsageFieldset) -> Quota { + self.usage = usage; + self + } + + pub fn usage(&self) -> &::models::UsageFieldset { + &self.usage + } + + +} + + + diff --git a/bindings/rust/src/src/models/quota_history.rs b/bindings/rust/src/src/models/quota_history.rs new file mode 100644 index 00000000..d5503e5f --- /dev/null +++ b/bindings/rust/src/src/models/quota_history.rs @@ -0,0 +1,45 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct QuotaHistory { + #[serde(rename = "history")] + history: Vec<::models::History> +} + +impl QuotaHistory { + pub fn new(history: Vec<::models::History>) -> QuotaHistory { + QuotaHistory { + history: history + } + } + + pub fn set_history(&mut self, history: Vec<::models::History>) { + self.history = history; + } + + pub fn with_history(mut self, history: Vec<::models::History>) -> QuotaHistory { + self.history = history; + self + } + + pub fn history(&self) -> &Vec<::models::History> { + &self.history + } + + +} + + + diff --git a/bindings/rust/src/src/models/rate_check.rs b/bindings/rust/src/src/models/rate_check.rs new file mode 100644 index 00000000..0c800272 --- /dev/null +++ b/bindings/rust/src/src/models/rate_check.rs @@ -0,0 +1,154 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RateCheck { + /// The time in seconds that you are suggested to wait until the next request in order to avoid consuming too much within the rate limit window. + #[serde(rename = "interval")] + interval: Option, + /// The maximum number of requests that you are permitted to send per hour + #[serde(rename = "limit")] + limit: Option, + /// The number of requests that are remaining in the current rate limit window + #[serde(rename = "remaining")] + remaining: Option, + /// The UTC epoch timestamp at which the current rate limit window will reset + #[serde(rename = "reset")] + reset: Option, + /// The ISO 8601 datetime at which the current rate limit window will reset + #[serde(rename = "reset_iso_8601")] + reset_iso_8601: Option, + /// If true, throttling is currently being enforced. + #[serde(rename = "throttled")] + throttled: Option +} + +impl RateCheck { + pub fn new() -> RateCheck { + RateCheck { + interval: None, + limit: None, + remaining: None, + reset: None, + reset_iso_8601: None, + throttled: None + } + } + + pub fn set_interval(&mut self, interval: f32) { + self.interval = Some(interval); + } + + pub fn with_interval(mut self, interval: f32) -> RateCheck { + self.interval = Some(interval); + self + } + + pub fn interval(&self) -> Option<&f32> { + self.interval.as_ref() + } + + pub fn reset_interval(&mut self) { + self.interval = None; + } + + pub fn set_limit(&mut self, limit: i32) { + self.limit = Some(limit); + } + + pub fn with_limit(mut self, limit: i32) -> RateCheck { + self.limit = Some(limit); + self + } + + pub fn limit(&self) -> Option<&i32> { + self.limit.as_ref() + } + + pub fn reset_limit(&mut self) { + self.limit = None; + } + + pub fn set_remaining(&mut self, remaining: i32) { + self.remaining = Some(remaining); + } + + pub fn with_remaining(mut self, remaining: i32) -> RateCheck { + self.remaining = Some(remaining); + self + } + + pub fn remaining(&self) -> Option<&i32> { + self.remaining.as_ref() + } + + pub fn reset_remaining(&mut self) { + self.remaining = None; + } + + pub fn set_reset(&mut self, reset: i32) { + self.reset = Some(reset); + } + + pub fn with_reset(mut self, reset: i32) -> RateCheck { + self.reset = Some(reset); + self + } + + pub fn reset(&self) -> Option<&i32> { + self.reset.as_ref() + } + + pub fn reset_reset(&mut self) { + self.reset = None; + } + + pub fn set_reset_iso_8601(&mut self, reset_iso_8601: String) { + self.reset_iso_8601 = Some(reset_iso_8601); + } + + pub fn with_reset_iso_8601(mut self, reset_iso_8601: String) -> RateCheck { + self.reset_iso_8601 = Some(reset_iso_8601); + self + } + + pub fn reset_iso_8601(&self) -> Option<&String> { + self.reset_iso_8601.as_ref() + } + + pub fn reset_reset_iso_8601(&mut self) { + self.reset_iso_8601 = None; + } + + pub fn set_throttled(&mut self, throttled: bool) { + self.throttled = Some(throttled); + } + + pub fn with_throttled(mut self, throttled: bool) -> RateCheck { + self.throttled = Some(throttled); + self + } + + pub fn throttled(&self) -> Option<&bool> { + self.throttled.as_ref() + } + + pub fn reset_throttled(&mut self) { + self.throttled = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/raw_package_upload.rs b/bindings/rust/src/src/models/raw_package_upload.rs new file mode 100644 index 00000000..f6697de0 --- /dev/null +++ b/bindings/rust/src/src/models/raw_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RawPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl RawPackageUpload { + pub fn new() -> RawPackageUpload { + RawPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> RawPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> RawPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> RawPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> RawPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> RawPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> RawPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> RawPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> RawPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RawPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> RawPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> RawPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> RawPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> RawPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> RawPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> RawPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> RawPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> RawPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> RawPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> RawPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> RawPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> RawPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> RawPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> RawPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> RawPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> RawPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> RawPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> RawPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> RawPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> RawPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> RawPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> RawPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> RawPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> RawPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> RawPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> RawPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> RawPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> RawPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> RawPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> RawPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RawPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> RawPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> RawPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> RawPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> RawPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> RawPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> RawPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> RawPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> RawPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> RawPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> RawPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> RawPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> RawPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> RawPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> RawPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> RawPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RawPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> RawPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> RawPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> RawPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RawPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> RawPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> RawPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> RawPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> RawPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> RawPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> RawPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> RawPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> RawPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> RawPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> RawPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> RawPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> RawPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> RawPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> RawPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> RawPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> RawPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> RawPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> RawPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> RawPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> RawPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/raw_package_upload_request.rs b/bindings/rust/src/src/models/raw_package_upload_request.rs new file mode 100644 index 00000000..28783bdd --- /dev/null +++ b/bindings/rust/src/src/models/raw_package_upload_request.rs @@ -0,0 +1,193 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RawPackageUploadRequest { + /// A custom content/media (also known as MIME) type to be sent when downloading this file. By default Cloudsmith will attempt to detect the type, but if you need to override it, you can specify it here. + #[serde(rename = "content_type")] + content_type: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option +} + +impl RawPackageUploadRequest { + pub fn new(package_file: String) -> RawPackageUploadRequest { + RawPackageUploadRequest { + content_type: None, + description: None, + name: None, + package_file: package_file, + republish: None, + summary: None, + tags: None, + version: None + } + } + + pub fn set_content_type(&mut self, content_type: String) { + self.content_type = Some(content_type); + } + + pub fn with_content_type(mut self, content_type: String) -> RawPackageUploadRequest { + self.content_type = Some(content_type); + self + } + + pub fn content_type(&self) -> Option<&String> { + self.content_type.as_ref() + } + + pub fn reset_content_type(&mut self) { + self.content_type = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RawPackageUploadRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RawPackageUploadRequest { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> RawPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> RawPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> RawPackageUploadRequest { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> RawPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> RawPackageUploadRequest { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository.rs b/bindings/rust/src/src/models/repository.rs new file mode 100644 index 00000000..848d6054 --- /dev/null +++ b/bindings/rust/src/src/models/repository.rs @@ -0,0 +1,1363 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Repository { + /// Base URL from which packages and other artifacts are downloaded. + #[serde(rename = "cdn_url")] + cdn_url: Option, + /// The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. + #[serde(rename = "content_kind")] + content_kind: Option, + /// If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. + #[serde(rename = "contextual_auth_realm")] + contextual_auth_realm: Option, + /// If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "copy_own")] + copy_own: Option, + /// This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. + #[serde(rename = "copy_packages")] + copy_packages: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. + #[serde(rename = "default_privilege")] + default_privilege: Option, + /// If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "delete_own")] + delete_own: Option, + /// This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. + #[serde(rename = "delete_packages")] + delete_packages: Option, + /// The datetime the repository was manually deleted at. + #[serde(rename = "deleted_at")] + deleted_at: Option, + /// A description of the repository's purpose/contents. + #[serde(rename = "description")] + description: Option, + /// The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. + #[serde(rename = "distributes")] + distributes: Option>, + /// If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. + #[serde(rename = "docker_refresh_tokens_enabled")] + docker_refresh_tokens_enabled: Option, + #[serde(rename = "ecdsa_keys")] + ecdsa_keys: Option>, + /// If checked, downloads will explicitly require acceptance of an EULA. + #[serde(rename = "enforce_eula")] + enforce_eula: Option, + #[serde(rename = "gpg_keys")] + gpg_keys: Option>, + /// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. + #[serde(rename = "index_files")] + index_files: Option, + #[serde(rename = "is_open_source")] + is_open_source: Option, + #[serde(rename = "is_private")] + is_private: Option, + #[serde(rename = "is_public")] + is_public: Option, + /// This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. + #[serde(rename = "manage_entitlements_privilege")] + manage_entitlements_privilege: Option, + /// If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "move_own")] + move_own: Option, + /// This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. + #[serde(rename = "move_packages")] + move_packages: Option, + /// A descriptive name for the repository. + #[serde(rename = "name")] + name: String, + /// Namespace to which this repository belongs. + #[serde(rename = "namespace")] + namespace: Option, + /// API endpoint where data about this namespace can be retrieved. + #[serde(rename = "namespace_url")] + namespace_url: Option, + /// When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. + #[serde(rename = "nuget_native_signing_enabled")] + nuget_native_signing_enabled: Option, + /// The number of downloads for packages in the repository. + #[serde(rename = "num_downloads")] + num_downloads: Option, + /// Number of packages with policy violations in a repository. + #[serde(rename = "num_policy_violated_packages")] + num_policy_violated_packages: Option, + /// Number of quarantined packages in a repository. + #[serde(rename = "num_quarantined_packages")] + num_quarantined_packages: Option, + /// The SPDX identifier of the open source license. + #[serde(rename = "open_source_license")] + open_source_license: Option, + /// The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. + #[serde(rename = "open_source_project_url")] + open_source_project_url: Option, + /// The number of packages in the repository. + #[serde(rename = "package_count")] + package_count: Option, + /// The number of groups in the repository. + #[serde(rename = "package_group_count")] + package_group_count: Option, + /// If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_npmjs")] + proxy_npmjs: Option, + /// If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_pypi")] + proxy_pypi: Option, + /// If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. + #[serde(rename = "raw_package_index_enabled")] + raw_package_index_enabled: Option, + /// If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. + #[serde(rename = "raw_package_index_signatures_enabled")] + raw_package_index_signatures_enabled: Option, + /// This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. + #[serde(rename = "replace_packages")] + replace_packages: Option, + /// If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. + #[serde(rename = "replace_packages_by_default")] + replace_packages_by_default: Option, + /// The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time. + #[serde(rename = "repository_type")] + repository_type: Option, + /// The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. + #[serde(rename = "repository_type_str")] + repository_type_str: Option, + /// If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "resync_own")] + resync_own: Option, + /// This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. + #[serde(rename = "resync_packages")] + resync_packages: Option, + /// If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "scan_own")] + scan_own: Option, + /// This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. + #[serde(rename = "scan_packages")] + scan_packages: Option, + /// Website URL for this repository. + #[serde(rename = "self_html_url")] + self_html_url: Option, + /// API endpoint where data about this repository can be retrieved. + #[serde(rename = "self_url")] + self_url: Option, + /// If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. + #[serde(rename = "show_setup_all")] + show_setup_all: Option, + /// The calculated size of the repository. + #[serde(rename = "size")] + size: Option, + /// The calculated size of the repository (human readable). + #[serde(rename = "size_str")] + size_str: Option, + /// The slug identifies the repository in URIs. + #[serde(rename = "slug")] + slug: Option, + /// The slug_perm immutably identifies the repository. It will never change once a repository has been created. + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The Cloudsmith region in which package files are stored. + #[serde(rename = "storage_region")] + storage_region: Option, + /// If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. + #[serde(rename = "strict_npm_validation")] + strict_npm_validation: Option, + /// If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools + #[serde(rename = "tag_pre_releases_as_latest")] + tag_pre_releases_as_latest: Option, + /// If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-'; or 'source=none' if no token was used. You can use this to help with pinning. + #[serde(rename = "use_debian_labels")] + use_debian_labels: Option, + /// If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. + #[serde(rename = "use_default_cargo_upstream")] + use_default_cargo_upstream: Option, + /// This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). + #[serde(rename = "use_entitlements_privilege")] + use_entitlements_privilege: Option, + /// If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). + #[serde(rename = "use_noarch_packages")] + use_noarch_packages: Option, + /// If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. + #[serde(rename = "use_source_packages")] + use_source_packages: Option, + /// If checked, vulnerability scanning will be enabled for all supported packages within this repository. + #[serde(rename = "use_vulnerability_scanning")] + use_vulnerability_scanning: Option, + /// If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. + #[serde(rename = "user_entitlements_enabled")] + user_entitlements_enabled: Option, + /// This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. + #[serde(rename = "view_statistics")] + view_statistics: Option +} + +impl Repository { + pub fn new(name: String) -> Repository { + Repository { + cdn_url: None, + content_kind: None, + contextual_auth_realm: None, + copy_own: None, + copy_packages: None, + created_at: None, + default_privilege: None, + delete_own: None, + delete_packages: None, + deleted_at: None, + description: None, + distributes: None, + docker_refresh_tokens_enabled: None, + ecdsa_keys: None, + enforce_eula: None, + gpg_keys: None, + index_files: None, + is_open_source: None, + is_private: None, + is_public: None, + manage_entitlements_privilege: None, + move_own: None, + move_packages: None, + name: name, + namespace: None, + namespace_url: None, + nuget_native_signing_enabled: None, + num_downloads: None, + num_policy_violated_packages: None, + num_quarantined_packages: None, + open_source_license: None, + open_source_project_url: None, + package_count: None, + package_group_count: None, + proxy_npmjs: None, + proxy_pypi: None, + raw_package_index_enabled: None, + raw_package_index_signatures_enabled: None, + replace_packages: None, + replace_packages_by_default: None, + repository_type: None, + repository_type_str: None, + resync_own: None, + resync_packages: None, + scan_own: None, + scan_packages: None, + self_html_url: None, + self_url: None, + show_setup_all: None, + size: None, + size_str: None, + slug: None, + slug_perm: None, + storage_region: None, + strict_npm_validation: None, + tag_pre_releases_as_latest: None, + use_debian_labels: None, + use_default_cargo_upstream: None, + use_entitlements_privilege: None, + use_noarch_packages: None, + use_source_packages: None, + use_vulnerability_scanning: None, + user_entitlements_enabled: None, + view_statistics: None + } + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> Repository { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_content_kind(&mut self, content_kind: String) { + self.content_kind = Some(content_kind); + } + + pub fn with_content_kind(mut self, content_kind: String) -> Repository { + self.content_kind = Some(content_kind); + self + } + + pub fn content_kind(&self) -> Option<&String> { + self.content_kind.as_ref() + } + + pub fn reset_content_kind(&mut self) { + self.content_kind = None; + } + + pub fn set_contextual_auth_realm(&mut self, contextual_auth_realm: bool) { + self.contextual_auth_realm = Some(contextual_auth_realm); + } + + pub fn with_contextual_auth_realm(mut self, contextual_auth_realm: bool) -> Repository { + self.contextual_auth_realm = Some(contextual_auth_realm); + self + } + + pub fn contextual_auth_realm(&self) -> Option<&bool> { + self.contextual_auth_realm.as_ref() + } + + pub fn reset_contextual_auth_realm(&mut self) { + self.contextual_auth_realm = None; + } + + pub fn set_copy_own(&mut self, copy_own: bool) { + self.copy_own = Some(copy_own); + } + + pub fn with_copy_own(mut self, copy_own: bool) -> Repository { + self.copy_own = Some(copy_own); + self + } + + pub fn copy_own(&self) -> Option<&bool> { + self.copy_own.as_ref() + } + + pub fn reset_copy_own(&mut self) { + self.copy_own = None; + } + + pub fn set_copy_packages(&mut self, copy_packages: String) { + self.copy_packages = Some(copy_packages); + } + + pub fn with_copy_packages(mut self, copy_packages: String) -> Repository { + self.copy_packages = Some(copy_packages); + self + } + + pub fn copy_packages(&self) -> Option<&String> { + self.copy_packages.as_ref() + } + + pub fn reset_copy_packages(&mut self) { + self.copy_packages = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> Repository { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default_privilege(&mut self, default_privilege: String) { + self.default_privilege = Some(default_privilege); + } + + pub fn with_default_privilege(mut self, default_privilege: String) -> Repository { + self.default_privilege = Some(default_privilege); + self + } + + pub fn default_privilege(&self) -> Option<&String> { + self.default_privilege.as_ref() + } + + pub fn reset_default_privilege(&mut self) { + self.default_privilege = None; + } + + pub fn set_delete_own(&mut self, delete_own: bool) { + self.delete_own = Some(delete_own); + } + + pub fn with_delete_own(mut self, delete_own: bool) -> Repository { + self.delete_own = Some(delete_own); + self + } + + pub fn delete_own(&self) -> Option<&bool> { + self.delete_own.as_ref() + } + + pub fn reset_delete_own(&mut self) { + self.delete_own = None; + } + + pub fn set_delete_packages(&mut self, delete_packages: String) { + self.delete_packages = Some(delete_packages); + } + + pub fn with_delete_packages(mut self, delete_packages: String) -> Repository { + self.delete_packages = Some(delete_packages); + self + } + + pub fn delete_packages(&self) -> Option<&String> { + self.delete_packages.as_ref() + } + + pub fn reset_delete_packages(&mut self) { + self.delete_packages = None; + } + + pub fn set_deleted_at(&mut self, deleted_at: String) { + self.deleted_at = Some(deleted_at); + } + + pub fn with_deleted_at(mut self, deleted_at: String) -> Repository { + self.deleted_at = Some(deleted_at); + self + } + + pub fn deleted_at(&self) -> Option<&String> { + self.deleted_at.as_ref() + } + + pub fn reset_deleted_at(&mut self) { + self.deleted_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> Repository { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_distributes(&mut self, distributes: Vec) { + self.distributes = Some(distributes); + } + + pub fn with_distributes(mut self, distributes: Vec) -> Repository { + self.distributes = Some(distributes); + self + } + + pub fn distributes(&self) -> Option<&Vec> { + self.distributes.as_ref() + } + + pub fn reset_distributes(&mut self) { + self.distributes = None; + } + + pub fn set_docker_refresh_tokens_enabled(&mut self, docker_refresh_tokens_enabled: bool) { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + } + + pub fn with_docker_refresh_tokens_enabled(mut self, docker_refresh_tokens_enabled: bool) -> Repository { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + self + } + + pub fn docker_refresh_tokens_enabled(&self) -> Option<&bool> { + self.docker_refresh_tokens_enabled.as_ref() + } + + pub fn reset_docker_refresh_tokens_enabled(&mut self) { + self.docker_refresh_tokens_enabled = None; + } + + pub fn set_ecdsa_keys(&mut self, ecdsa_keys: Vec<::models::RepositoryEcdsaKey>) { + self.ecdsa_keys = Some(ecdsa_keys); + } + + pub fn with_ecdsa_keys(mut self, ecdsa_keys: Vec<::models::RepositoryEcdsaKey>) -> Repository { + self.ecdsa_keys = Some(ecdsa_keys); + self + } + + pub fn ecdsa_keys(&self) -> Option<&Vec<::models::RepositoryEcdsaKey>> { + self.ecdsa_keys.as_ref() + } + + pub fn reset_ecdsa_keys(&mut self) { + self.ecdsa_keys = None; + } + + pub fn set_enforce_eula(&mut self, enforce_eula: bool) { + self.enforce_eula = Some(enforce_eula); + } + + pub fn with_enforce_eula(mut self, enforce_eula: bool) -> Repository { + self.enforce_eula = Some(enforce_eula); + self + } + + pub fn enforce_eula(&self) -> Option<&bool> { + self.enforce_eula.as_ref() + } + + pub fn reset_enforce_eula(&mut self) { + self.enforce_eula = None; + } + + pub fn set_gpg_keys(&mut self, gpg_keys: Vec<::models::RepositoryGpgKey>) { + self.gpg_keys = Some(gpg_keys); + } + + pub fn with_gpg_keys(mut self, gpg_keys: Vec<::models::RepositoryGpgKey>) -> Repository { + self.gpg_keys = Some(gpg_keys); + self + } + + pub fn gpg_keys(&self) -> Option<&Vec<::models::RepositoryGpgKey>> { + self.gpg_keys.as_ref() + } + + pub fn reset_gpg_keys(&mut self) { + self.gpg_keys = None; + } + + pub fn set_index_files(&mut self, index_files: bool) { + self.index_files = Some(index_files); + } + + pub fn with_index_files(mut self, index_files: bool) -> Repository { + self.index_files = Some(index_files); + self + } + + pub fn index_files(&self) -> Option<&bool> { + self.index_files.as_ref() + } + + pub fn reset_index_files(&mut self) { + self.index_files = None; + } + + pub fn set_is_open_source(&mut self, is_open_source: bool) { + self.is_open_source = Some(is_open_source); + } + + pub fn with_is_open_source(mut self, is_open_source: bool) -> Repository { + self.is_open_source = Some(is_open_source); + self + } + + pub fn is_open_source(&self) -> Option<&bool> { + self.is_open_source.as_ref() + } + + pub fn reset_is_open_source(&mut self) { + self.is_open_source = None; + } + + pub fn set_is_private(&mut self, is_private: bool) { + self.is_private = Some(is_private); + } + + pub fn with_is_private(mut self, is_private: bool) -> Repository { + self.is_private = Some(is_private); + self + } + + pub fn is_private(&self) -> Option<&bool> { + self.is_private.as_ref() + } + + pub fn reset_is_private(&mut self) { + self.is_private = None; + } + + pub fn set_is_public(&mut self, is_public: bool) { + self.is_public = Some(is_public); + } + + pub fn with_is_public(mut self, is_public: bool) -> Repository { + self.is_public = Some(is_public); + self + } + + pub fn is_public(&self) -> Option<&bool> { + self.is_public.as_ref() + } + + pub fn reset_is_public(&mut self) { + self.is_public = None; + } + + pub fn set_manage_entitlements_privilege(&mut self, manage_entitlements_privilege: String) { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + } + + pub fn with_manage_entitlements_privilege(mut self, manage_entitlements_privilege: String) -> Repository { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + self + } + + pub fn manage_entitlements_privilege(&self) -> Option<&String> { + self.manage_entitlements_privilege.as_ref() + } + + pub fn reset_manage_entitlements_privilege(&mut self) { + self.manage_entitlements_privilege = None; + } + + pub fn set_move_own(&mut self, move_own: bool) { + self.move_own = Some(move_own); + } + + pub fn with_move_own(mut self, move_own: bool) -> Repository { + self.move_own = Some(move_own); + self + } + + pub fn move_own(&self) -> Option<&bool> { + self.move_own.as_ref() + } + + pub fn reset_move_own(&mut self) { + self.move_own = None; + } + + pub fn set_move_packages(&mut self, move_packages: String) { + self.move_packages = Some(move_packages); + } + + pub fn with_move_packages(mut self, move_packages: String) -> Repository { + self.move_packages = Some(move_packages); + self + } + + pub fn move_packages(&self) -> Option<&String> { + self.move_packages.as_ref() + } + + pub fn reset_move_packages(&mut self) { + self.move_packages = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> Repository { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> Repository { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> Repository { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_nuget_native_signing_enabled(&mut self, nuget_native_signing_enabled: bool) { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + } + + pub fn with_nuget_native_signing_enabled(mut self, nuget_native_signing_enabled: bool) -> Repository { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + self + } + + pub fn nuget_native_signing_enabled(&self) -> Option<&bool> { + self.nuget_native_signing_enabled.as_ref() + } + + pub fn reset_nuget_native_signing_enabled(&mut self) { + self.nuget_native_signing_enabled = None; + } + + pub fn set_num_downloads(&mut self, num_downloads: i32) { + self.num_downloads = Some(num_downloads); + } + + pub fn with_num_downloads(mut self, num_downloads: i32) -> Repository { + self.num_downloads = Some(num_downloads); + self + } + + pub fn num_downloads(&self) -> Option<&i32> { + self.num_downloads.as_ref() + } + + pub fn reset_num_downloads(&mut self) { + self.num_downloads = None; + } + + pub fn set_num_policy_violated_packages(&mut self, num_policy_violated_packages: i32) { + self.num_policy_violated_packages = Some(num_policy_violated_packages); + } + + pub fn with_num_policy_violated_packages(mut self, num_policy_violated_packages: i32) -> Repository { + self.num_policy_violated_packages = Some(num_policy_violated_packages); + self + } + + pub fn num_policy_violated_packages(&self) -> Option<&i32> { + self.num_policy_violated_packages.as_ref() + } + + pub fn reset_num_policy_violated_packages(&mut self) { + self.num_policy_violated_packages = None; + } + + pub fn set_num_quarantined_packages(&mut self, num_quarantined_packages: i32) { + self.num_quarantined_packages = Some(num_quarantined_packages); + } + + pub fn with_num_quarantined_packages(mut self, num_quarantined_packages: i32) -> Repository { + self.num_quarantined_packages = Some(num_quarantined_packages); + self + } + + pub fn num_quarantined_packages(&self) -> Option<&i32> { + self.num_quarantined_packages.as_ref() + } + + pub fn reset_num_quarantined_packages(&mut self) { + self.num_quarantined_packages = None; + } + + pub fn set_open_source_license(&mut self, open_source_license: String) { + self.open_source_license = Some(open_source_license); + } + + pub fn with_open_source_license(mut self, open_source_license: String) -> Repository { + self.open_source_license = Some(open_source_license); + self + } + + pub fn open_source_license(&self) -> Option<&String> { + self.open_source_license.as_ref() + } + + pub fn reset_open_source_license(&mut self) { + self.open_source_license = None; + } + + pub fn set_open_source_project_url(&mut self, open_source_project_url: String) { + self.open_source_project_url = Some(open_source_project_url); + } + + pub fn with_open_source_project_url(mut self, open_source_project_url: String) -> Repository { + self.open_source_project_url = Some(open_source_project_url); + self + } + + pub fn open_source_project_url(&self) -> Option<&String> { + self.open_source_project_url.as_ref() + } + + pub fn reset_open_source_project_url(&mut self) { + self.open_source_project_url = None; + } + + pub fn set_package_count(&mut self, package_count: i32) { + self.package_count = Some(package_count); + } + + pub fn with_package_count(mut self, package_count: i32) -> Repository { + self.package_count = Some(package_count); + self + } + + pub fn package_count(&self) -> Option<&i32> { + self.package_count.as_ref() + } + + pub fn reset_package_count(&mut self) { + self.package_count = None; + } + + pub fn set_package_group_count(&mut self, package_group_count: i32) { + self.package_group_count = Some(package_group_count); + } + + pub fn with_package_group_count(mut self, package_group_count: i32) -> Repository { + self.package_group_count = Some(package_group_count); + self + } + + pub fn package_group_count(&self) -> Option<&i32> { + self.package_group_count.as_ref() + } + + pub fn reset_package_group_count(&mut self) { + self.package_group_count = None; + } + + pub fn set_proxy_npmjs(&mut self, proxy_npmjs: bool) { + self.proxy_npmjs = Some(proxy_npmjs); + } + + pub fn with_proxy_npmjs(mut self, proxy_npmjs: bool) -> Repository { + self.proxy_npmjs = Some(proxy_npmjs); + self + } + + pub fn proxy_npmjs(&self) -> Option<&bool> { + self.proxy_npmjs.as_ref() + } + + pub fn reset_proxy_npmjs(&mut self) { + self.proxy_npmjs = None; + } + + pub fn set_proxy_pypi(&mut self, proxy_pypi: bool) { + self.proxy_pypi = Some(proxy_pypi); + } + + pub fn with_proxy_pypi(mut self, proxy_pypi: bool) -> Repository { + self.proxy_pypi = Some(proxy_pypi); + self + } + + pub fn proxy_pypi(&self) -> Option<&bool> { + self.proxy_pypi.as_ref() + } + + pub fn reset_proxy_pypi(&mut self) { + self.proxy_pypi = None; + } + + pub fn set_raw_package_index_enabled(&mut self, raw_package_index_enabled: bool) { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + } + + pub fn with_raw_package_index_enabled(mut self, raw_package_index_enabled: bool) -> Repository { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + self + } + + pub fn raw_package_index_enabled(&self) -> Option<&bool> { + self.raw_package_index_enabled.as_ref() + } + + pub fn reset_raw_package_index_enabled(&mut self) { + self.raw_package_index_enabled = None; + } + + pub fn set_raw_package_index_signatures_enabled(&mut self, raw_package_index_signatures_enabled: bool) { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + } + + pub fn with_raw_package_index_signatures_enabled(mut self, raw_package_index_signatures_enabled: bool) -> Repository { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + self + } + + pub fn raw_package_index_signatures_enabled(&self) -> Option<&bool> { + self.raw_package_index_signatures_enabled.as_ref() + } + + pub fn reset_raw_package_index_signatures_enabled(&mut self) { + self.raw_package_index_signatures_enabled = None; + } + + pub fn set_replace_packages(&mut self, replace_packages: String) { + self.replace_packages = Some(replace_packages); + } + + pub fn with_replace_packages(mut self, replace_packages: String) -> Repository { + self.replace_packages = Some(replace_packages); + self + } + + pub fn replace_packages(&self) -> Option<&String> { + self.replace_packages.as_ref() + } + + pub fn reset_replace_packages(&mut self) { + self.replace_packages = None; + } + + pub fn set_replace_packages_by_default(&mut self, replace_packages_by_default: bool) { + self.replace_packages_by_default = Some(replace_packages_by_default); + } + + pub fn with_replace_packages_by_default(mut self, replace_packages_by_default: bool) -> Repository { + self.replace_packages_by_default = Some(replace_packages_by_default); + self + } + + pub fn replace_packages_by_default(&self) -> Option<&bool> { + self.replace_packages_by_default.as_ref() + } + + pub fn reset_replace_packages_by_default(&mut self) { + self.replace_packages_by_default = None; + } + + pub fn set_repository_type(&mut self, repository_type: i32) { + self.repository_type = Some(repository_type); + } + + pub fn with_repository_type(mut self, repository_type: i32) -> Repository { + self.repository_type = Some(repository_type); + self + } + + pub fn repository_type(&self) -> Option<&i32> { + self.repository_type.as_ref() + } + + pub fn reset_repository_type(&mut self) { + self.repository_type = None; + } + + pub fn set_repository_type_str(&mut self, repository_type_str: String) { + self.repository_type_str = Some(repository_type_str); + } + + pub fn with_repository_type_str(mut self, repository_type_str: String) -> Repository { + self.repository_type_str = Some(repository_type_str); + self + } + + pub fn repository_type_str(&self) -> Option<&String> { + self.repository_type_str.as_ref() + } + + pub fn reset_repository_type_str(&mut self) { + self.repository_type_str = None; + } + + pub fn set_resync_own(&mut self, resync_own: bool) { + self.resync_own = Some(resync_own); + } + + pub fn with_resync_own(mut self, resync_own: bool) -> Repository { + self.resync_own = Some(resync_own); + self + } + + pub fn resync_own(&self) -> Option<&bool> { + self.resync_own.as_ref() + } + + pub fn reset_resync_own(&mut self) { + self.resync_own = None; + } + + pub fn set_resync_packages(&mut self, resync_packages: String) { + self.resync_packages = Some(resync_packages); + } + + pub fn with_resync_packages(mut self, resync_packages: String) -> Repository { + self.resync_packages = Some(resync_packages); + self + } + + pub fn resync_packages(&self) -> Option<&String> { + self.resync_packages.as_ref() + } + + pub fn reset_resync_packages(&mut self) { + self.resync_packages = None; + } + + pub fn set_scan_own(&mut self, scan_own: bool) { + self.scan_own = Some(scan_own); + } + + pub fn with_scan_own(mut self, scan_own: bool) -> Repository { + self.scan_own = Some(scan_own); + self + } + + pub fn scan_own(&self) -> Option<&bool> { + self.scan_own.as_ref() + } + + pub fn reset_scan_own(&mut self) { + self.scan_own = None; + } + + pub fn set_scan_packages(&mut self, scan_packages: String) { + self.scan_packages = Some(scan_packages); + } + + pub fn with_scan_packages(mut self, scan_packages: String) -> Repository { + self.scan_packages = Some(scan_packages); + self + } + + pub fn scan_packages(&self) -> Option<&String> { + self.scan_packages.as_ref() + } + + pub fn reset_scan_packages(&mut self) { + self.scan_packages = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> Repository { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> Repository { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_show_setup_all(&mut self, show_setup_all: bool) { + self.show_setup_all = Some(show_setup_all); + } + + pub fn with_show_setup_all(mut self, show_setup_all: bool) -> Repository { + self.show_setup_all = Some(show_setup_all); + self + } + + pub fn show_setup_all(&self) -> Option<&bool> { + self.show_setup_all.as_ref() + } + + pub fn reset_show_setup_all(&mut self) { + self.show_setup_all = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> Repository { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_size_str(&mut self, size_str: String) { + self.size_str = Some(size_str); + } + + pub fn with_size_str(mut self, size_str: String) -> Repository { + self.size_str = Some(size_str); + self + } + + pub fn size_str(&self) -> Option<&String> { + self.size_str.as_ref() + } + + pub fn reset_size_str(&mut self) { + self.size_str = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> Repository { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> Repository { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_storage_region(&mut self, storage_region: String) { + self.storage_region = Some(storage_region); + } + + pub fn with_storage_region(mut self, storage_region: String) -> Repository { + self.storage_region = Some(storage_region); + self + } + + pub fn storage_region(&self) -> Option<&String> { + self.storage_region.as_ref() + } + + pub fn reset_storage_region(&mut self) { + self.storage_region = None; + } + + pub fn set_strict_npm_validation(&mut self, strict_npm_validation: bool) { + self.strict_npm_validation = Some(strict_npm_validation); + } + + pub fn with_strict_npm_validation(mut self, strict_npm_validation: bool) -> Repository { + self.strict_npm_validation = Some(strict_npm_validation); + self + } + + pub fn strict_npm_validation(&self) -> Option<&bool> { + self.strict_npm_validation.as_ref() + } + + pub fn reset_strict_npm_validation(&mut self) { + self.strict_npm_validation = None; + } + + pub fn set_tag_pre_releases_as_latest(&mut self, tag_pre_releases_as_latest: bool) { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + } + + pub fn with_tag_pre_releases_as_latest(mut self, tag_pre_releases_as_latest: bool) -> Repository { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + self + } + + pub fn tag_pre_releases_as_latest(&self) -> Option<&bool> { + self.tag_pre_releases_as_latest.as_ref() + } + + pub fn reset_tag_pre_releases_as_latest(&mut self) { + self.tag_pre_releases_as_latest = None; + } + + pub fn set_use_debian_labels(&mut self, use_debian_labels: bool) { + self.use_debian_labels = Some(use_debian_labels); + } + + pub fn with_use_debian_labels(mut self, use_debian_labels: bool) -> Repository { + self.use_debian_labels = Some(use_debian_labels); + self + } + + pub fn use_debian_labels(&self) -> Option<&bool> { + self.use_debian_labels.as_ref() + } + + pub fn reset_use_debian_labels(&mut self) { + self.use_debian_labels = None; + } + + pub fn set_use_default_cargo_upstream(&mut self, use_default_cargo_upstream: bool) { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + } + + pub fn with_use_default_cargo_upstream(mut self, use_default_cargo_upstream: bool) -> Repository { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + self + } + + pub fn use_default_cargo_upstream(&self) -> Option<&bool> { + self.use_default_cargo_upstream.as_ref() + } + + pub fn reset_use_default_cargo_upstream(&mut self) { + self.use_default_cargo_upstream = None; + } + + pub fn set_use_entitlements_privilege(&mut self, use_entitlements_privilege: String) { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + } + + pub fn with_use_entitlements_privilege(mut self, use_entitlements_privilege: String) -> Repository { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + self + } + + pub fn use_entitlements_privilege(&self) -> Option<&String> { + self.use_entitlements_privilege.as_ref() + } + + pub fn reset_use_entitlements_privilege(&mut self) { + self.use_entitlements_privilege = None; + } + + pub fn set_use_noarch_packages(&mut self, use_noarch_packages: bool) { + self.use_noarch_packages = Some(use_noarch_packages); + } + + pub fn with_use_noarch_packages(mut self, use_noarch_packages: bool) -> Repository { + self.use_noarch_packages = Some(use_noarch_packages); + self + } + + pub fn use_noarch_packages(&self) -> Option<&bool> { + self.use_noarch_packages.as_ref() + } + + pub fn reset_use_noarch_packages(&mut self) { + self.use_noarch_packages = None; + } + + pub fn set_use_source_packages(&mut self, use_source_packages: bool) { + self.use_source_packages = Some(use_source_packages); + } + + pub fn with_use_source_packages(mut self, use_source_packages: bool) -> Repository { + self.use_source_packages = Some(use_source_packages); + self + } + + pub fn use_source_packages(&self) -> Option<&bool> { + self.use_source_packages.as_ref() + } + + pub fn reset_use_source_packages(&mut self) { + self.use_source_packages = None; + } + + pub fn set_use_vulnerability_scanning(&mut self, use_vulnerability_scanning: bool) { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + } + + pub fn with_use_vulnerability_scanning(mut self, use_vulnerability_scanning: bool) -> Repository { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + self + } + + pub fn use_vulnerability_scanning(&self) -> Option<&bool> { + self.use_vulnerability_scanning.as_ref() + } + + pub fn reset_use_vulnerability_scanning(&mut self) { + self.use_vulnerability_scanning = None; + } + + pub fn set_user_entitlements_enabled(&mut self, user_entitlements_enabled: bool) { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + } + + pub fn with_user_entitlements_enabled(mut self, user_entitlements_enabled: bool) -> Repository { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + self + } + + pub fn user_entitlements_enabled(&self) -> Option<&bool> { + self.user_entitlements_enabled.as_ref() + } + + pub fn reset_user_entitlements_enabled(&mut self) { + self.user_entitlements_enabled = None; + } + + pub fn set_view_statistics(&mut self, view_statistics: String) { + self.view_statistics = Some(view_statistics); + } + + pub fn with_view_statistics(mut self, view_statistics: String) -> Repository { + self.view_statistics = Some(view_statistics); + self + } + + pub fn view_statistics(&self) -> Option<&String> { + self.view_statistics.as_ref() + } + + pub fn reset_view_statistics(&mut self) { + self.view_statistics = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_audit_log.rs b/bindings/rust/src/src/models/repository_audit_log.rs new file mode 100644 index 00000000..9b47c7e0 --- /dev/null +++ b/bindings/rust/src/src/models/repository_audit_log.rs @@ -0,0 +1,258 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryAuditLog { + #[serde(rename = "actor")] + actor: String, + #[serde(rename = "actor_ip_address")] + actor_ip_address: String, + #[serde(rename = "actor_kind")] + actor_kind: Option, + #[serde(rename = "actor_location")] + actor_location: ::models::GeoIpLocation, + #[serde(rename = "actor_slug_perm")] + actor_slug_perm: String, + #[serde(rename = "actor_url")] + actor_url: Option, + #[serde(rename = "context")] + context: String, + #[serde(rename = "event")] + event: String, + #[serde(rename = "event_at")] + event_at: String, + #[serde(rename = "object")] + object: String, + #[serde(rename = "object_kind")] + object_kind: String, + #[serde(rename = "object_slug_perm")] + object_slug_perm: String, + #[serde(rename = "uuid")] + uuid: Option +} + +impl RepositoryAuditLog { + pub fn new(actor: String, actor_ip_address: String, actor_location: ::models::GeoIpLocation, actor_slug_perm: String, context: String, event: String, event_at: String, object: String, object_kind: String, object_slug_perm: String) -> RepositoryAuditLog { + RepositoryAuditLog { + actor: actor, + actor_ip_address: actor_ip_address, + actor_kind: None, + actor_location: actor_location, + actor_slug_perm: actor_slug_perm, + actor_url: None, + context: context, + event: event, + event_at: event_at, + object: object, + object_kind: object_kind, + object_slug_perm: object_slug_perm, + uuid: None + } + } + + pub fn set_actor(&mut self, actor: String) { + self.actor = actor; + } + + pub fn with_actor(mut self, actor: String) -> RepositoryAuditLog { + self.actor = actor; + self + } + + pub fn actor(&self) -> &String { + &self.actor + } + + + pub fn set_actor_ip_address(&mut self, actor_ip_address: String) { + self.actor_ip_address = actor_ip_address; + } + + pub fn with_actor_ip_address(mut self, actor_ip_address: String) -> RepositoryAuditLog { + self.actor_ip_address = actor_ip_address; + self + } + + pub fn actor_ip_address(&self) -> &String { + &self.actor_ip_address + } + + + pub fn set_actor_kind(&mut self, actor_kind: String) { + self.actor_kind = Some(actor_kind); + } + + pub fn with_actor_kind(mut self, actor_kind: String) -> RepositoryAuditLog { + self.actor_kind = Some(actor_kind); + self + } + + pub fn actor_kind(&self) -> Option<&String> { + self.actor_kind.as_ref() + } + + pub fn reset_actor_kind(&mut self) { + self.actor_kind = None; + } + + pub fn set_actor_location(&mut self, actor_location: ::models::GeoIpLocation) { + self.actor_location = actor_location; + } + + pub fn with_actor_location(mut self, actor_location: ::models::GeoIpLocation) -> RepositoryAuditLog { + self.actor_location = actor_location; + self + } + + pub fn actor_location(&self) -> &::models::GeoIpLocation { + &self.actor_location + } + + + pub fn set_actor_slug_perm(&mut self, actor_slug_perm: String) { + self.actor_slug_perm = actor_slug_perm; + } + + pub fn with_actor_slug_perm(mut self, actor_slug_perm: String) -> RepositoryAuditLog { + self.actor_slug_perm = actor_slug_perm; + self + } + + pub fn actor_slug_perm(&self) -> &String { + &self.actor_slug_perm + } + + + pub fn set_actor_url(&mut self, actor_url: String) { + self.actor_url = Some(actor_url); + } + + pub fn with_actor_url(mut self, actor_url: String) -> RepositoryAuditLog { + self.actor_url = Some(actor_url); + self + } + + pub fn actor_url(&self) -> Option<&String> { + self.actor_url.as_ref() + } + + pub fn reset_actor_url(&mut self) { + self.actor_url = None; + } + + pub fn set_context(&mut self, context: String) { + self.context = context; + } + + pub fn with_context(mut self, context: String) -> RepositoryAuditLog { + self.context = context; + self + } + + pub fn context(&self) -> &String { + &self.context + } + + + pub fn set_event(&mut self, event: String) { + self.event = event; + } + + pub fn with_event(mut self, event: String) -> RepositoryAuditLog { + self.event = event; + self + } + + pub fn event(&self) -> &String { + &self.event + } + + + pub fn set_event_at(&mut self, event_at: String) { + self.event_at = event_at; + } + + pub fn with_event_at(mut self, event_at: String) -> RepositoryAuditLog { + self.event_at = event_at; + self + } + + pub fn event_at(&self) -> &String { + &self.event_at + } + + + pub fn set_object(&mut self, object: String) { + self.object = object; + } + + pub fn with_object(mut self, object: String) -> RepositoryAuditLog { + self.object = object; + self + } + + pub fn object(&self) -> &String { + &self.object + } + + + pub fn set_object_kind(&mut self, object_kind: String) { + self.object_kind = object_kind; + } + + pub fn with_object_kind(mut self, object_kind: String) -> RepositoryAuditLog { + self.object_kind = object_kind; + self + } + + pub fn object_kind(&self) -> &String { + &self.object_kind + } + + + pub fn set_object_slug_perm(&mut self, object_slug_perm: String) { + self.object_slug_perm = object_slug_perm; + } + + pub fn with_object_slug_perm(mut self, object_slug_perm: String) -> RepositoryAuditLog { + self.object_slug_perm = object_slug_perm; + self + } + + pub fn object_slug_perm(&self) -> &String { + &self.object_slug_perm + } + + + pub fn set_uuid(&mut self, uuid: String) { + self.uuid = Some(uuid); + } + + pub fn with_uuid(mut self, uuid: String) -> RepositoryAuditLog { + self.uuid = Some(uuid); + self + } + + pub fn uuid(&self) -> Option<&String> { + self.uuid.as_ref() + } + + pub fn reset_uuid(&mut self) { + self.uuid = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_create.rs b/bindings/rust/src/src/models/repository_create.rs new file mode 100644 index 00000000..8afeacd4 --- /dev/null +++ b/bindings/rust/src/src/models/repository_create.rs @@ -0,0 +1,1363 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryCreate { + /// Base URL from which packages and other artifacts are downloaded. + #[serde(rename = "cdn_url")] + cdn_url: Option, + /// The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. + #[serde(rename = "content_kind")] + content_kind: Option, + /// If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. + #[serde(rename = "contextual_auth_realm")] + contextual_auth_realm: Option, + /// If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "copy_own")] + copy_own: Option, + /// This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. + #[serde(rename = "copy_packages")] + copy_packages: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. + #[serde(rename = "default_privilege")] + default_privilege: Option, + /// If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "delete_own")] + delete_own: Option, + /// This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. + #[serde(rename = "delete_packages")] + delete_packages: Option, + /// The datetime the repository was manually deleted at. + #[serde(rename = "deleted_at")] + deleted_at: Option, + /// A description of the repository's purpose/contents. + #[serde(rename = "description")] + description: Option, + /// The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. + #[serde(rename = "distributes")] + distributes: Option>, + /// If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. + #[serde(rename = "docker_refresh_tokens_enabled")] + docker_refresh_tokens_enabled: Option, + #[serde(rename = "ecdsa_keys")] + ecdsa_keys: Option>, + /// If checked, downloads will explicitly require acceptance of an EULA. + #[serde(rename = "enforce_eula")] + enforce_eula: Option, + #[serde(rename = "gpg_keys")] + gpg_keys: Option>, + /// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. + #[serde(rename = "index_files")] + index_files: Option, + #[serde(rename = "is_open_source")] + is_open_source: Option, + #[serde(rename = "is_private")] + is_private: Option, + #[serde(rename = "is_public")] + is_public: Option, + /// This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. + #[serde(rename = "manage_entitlements_privilege")] + manage_entitlements_privilege: Option, + /// If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "move_own")] + move_own: Option, + /// This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. + #[serde(rename = "move_packages")] + move_packages: Option, + /// A descriptive name for the repository. + #[serde(rename = "name")] + name: String, + /// Namespace to which this repository belongs. + #[serde(rename = "namespace")] + namespace: Option, + /// API endpoint where data about this namespace can be retrieved. + #[serde(rename = "namespace_url")] + namespace_url: Option, + /// When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. + #[serde(rename = "nuget_native_signing_enabled")] + nuget_native_signing_enabled: Option, + /// The number of downloads for packages in the repository. + #[serde(rename = "num_downloads")] + num_downloads: Option, + /// Number of packages with policy violations in a repository. + #[serde(rename = "num_policy_violated_packages")] + num_policy_violated_packages: Option, + /// Number of quarantined packages in a repository. + #[serde(rename = "num_quarantined_packages")] + num_quarantined_packages: Option, + /// The SPDX identifier of the open source license. + #[serde(rename = "open_source_license")] + open_source_license: Option, + /// The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. + #[serde(rename = "open_source_project_url")] + open_source_project_url: Option, + /// The number of packages in the repository. + #[serde(rename = "package_count")] + package_count: Option, + /// The number of groups in the repository. + #[serde(rename = "package_group_count")] + package_group_count: Option, + /// If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_npmjs")] + proxy_npmjs: Option, + /// If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_pypi")] + proxy_pypi: Option, + /// If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. + #[serde(rename = "raw_package_index_enabled")] + raw_package_index_enabled: Option, + /// If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. + #[serde(rename = "raw_package_index_signatures_enabled")] + raw_package_index_signatures_enabled: Option, + /// This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. + #[serde(rename = "replace_packages")] + replace_packages: Option, + /// If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. + #[serde(rename = "replace_packages_by_default")] + replace_packages_by_default: Option, + /// The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time. + #[serde(rename = "repository_type")] + repository_type: Option, + /// The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. + #[serde(rename = "repository_type_str")] + repository_type_str: Option, + /// If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "resync_own")] + resync_own: Option, + /// This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. + #[serde(rename = "resync_packages")] + resync_packages: Option, + /// If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "scan_own")] + scan_own: Option, + /// This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. + #[serde(rename = "scan_packages")] + scan_packages: Option, + /// Website URL for this repository. + #[serde(rename = "self_html_url")] + self_html_url: Option, + /// API endpoint where data about this repository can be retrieved. + #[serde(rename = "self_url")] + self_url: Option, + /// If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. + #[serde(rename = "show_setup_all")] + show_setup_all: Option, + /// The calculated size of the repository. + #[serde(rename = "size")] + size: Option, + /// The calculated size of the repository (human readable). + #[serde(rename = "size_str")] + size_str: Option, + /// The slug identifies the repository in URIs. + #[serde(rename = "slug")] + slug: Option, + /// The slug_perm immutably identifies the repository. It will never change once a repository has been created. + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The Cloudsmith region in which package files are stored. + #[serde(rename = "storage_region")] + storage_region: Option, + /// If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. + #[serde(rename = "strict_npm_validation")] + strict_npm_validation: Option, + /// If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools + #[serde(rename = "tag_pre_releases_as_latest")] + tag_pre_releases_as_latest: Option, + /// If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-'; or 'source=none' if no token was used. You can use this to help with pinning. + #[serde(rename = "use_debian_labels")] + use_debian_labels: Option, + /// If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. + #[serde(rename = "use_default_cargo_upstream")] + use_default_cargo_upstream: Option, + /// This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). + #[serde(rename = "use_entitlements_privilege")] + use_entitlements_privilege: Option, + /// If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). + #[serde(rename = "use_noarch_packages")] + use_noarch_packages: Option, + /// If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. + #[serde(rename = "use_source_packages")] + use_source_packages: Option, + /// If checked, vulnerability scanning will be enabled for all supported packages within this repository. + #[serde(rename = "use_vulnerability_scanning")] + use_vulnerability_scanning: Option, + /// If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. + #[serde(rename = "user_entitlements_enabled")] + user_entitlements_enabled: Option, + /// This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. + #[serde(rename = "view_statistics")] + view_statistics: Option +} + +impl RepositoryCreate { + pub fn new(name: String) -> RepositoryCreate { + RepositoryCreate { + cdn_url: None, + content_kind: None, + contextual_auth_realm: None, + copy_own: None, + copy_packages: None, + created_at: None, + default_privilege: None, + delete_own: None, + delete_packages: None, + deleted_at: None, + description: None, + distributes: None, + docker_refresh_tokens_enabled: None, + ecdsa_keys: None, + enforce_eula: None, + gpg_keys: None, + index_files: None, + is_open_source: None, + is_private: None, + is_public: None, + manage_entitlements_privilege: None, + move_own: None, + move_packages: None, + name: name, + namespace: None, + namespace_url: None, + nuget_native_signing_enabled: None, + num_downloads: None, + num_policy_violated_packages: None, + num_quarantined_packages: None, + open_source_license: None, + open_source_project_url: None, + package_count: None, + package_group_count: None, + proxy_npmjs: None, + proxy_pypi: None, + raw_package_index_enabled: None, + raw_package_index_signatures_enabled: None, + replace_packages: None, + replace_packages_by_default: None, + repository_type: None, + repository_type_str: None, + resync_own: None, + resync_packages: None, + scan_own: None, + scan_packages: None, + self_html_url: None, + self_url: None, + show_setup_all: None, + size: None, + size_str: None, + slug: None, + slug_perm: None, + storage_region: None, + strict_npm_validation: None, + tag_pre_releases_as_latest: None, + use_debian_labels: None, + use_default_cargo_upstream: None, + use_entitlements_privilege: None, + use_noarch_packages: None, + use_source_packages: None, + use_vulnerability_scanning: None, + user_entitlements_enabled: None, + view_statistics: None + } + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> RepositoryCreate { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_content_kind(&mut self, content_kind: String) { + self.content_kind = Some(content_kind); + } + + pub fn with_content_kind(mut self, content_kind: String) -> RepositoryCreate { + self.content_kind = Some(content_kind); + self + } + + pub fn content_kind(&self) -> Option<&String> { + self.content_kind.as_ref() + } + + pub fn reset_content_kind(&mut self) { + self.content_kind = None; + } + + pub fn set_contextual_auth_realm(&mut self, contextual_auth_realm: bool) { + self.contextual_auth_realm = Some(contextual_auth_realm); + } + + pub fn with_contextual_auth_realm(mut self, contextual_auth_realm: bool) -> RepositoryCreate { + self.contextual_auth_realm = Some(contextual_auth_realm); + self + } + + pub fn contextual_auth_realm(&self) -> Option<&bool> { + self.contextual_auth_realm.as_ref() + } + + pub fn reset_contextual_auth_realm(&mut self) { + self.contextual_auth_realm = None; + } + + pub fn set_copy_own(&mut self, copy_own: bool) { + self.copy_own = Some(copy_own); + } + + pub fn with_copy_own(mut self, copy_own: bool) -> RepositoryCreate { + self.copy_own = Some(copy_own); + self + } + + pub fn copy_own(&self) -> Option<&bool> { + self.copy_own.as_ref() + } + + pub fn reset_copy_own(&mut self) { + self.copy_own = None; + } + + pub fn set_copy_packages(&mut self, copy_packages: String) { + self.copy_packages = Some(copy_packages); + } + + pub fn with_copy_packages(mut self, copy_packages: String) -> RepositoryCreate { + self.copy_packages = Some(copy_packages); + self + } + + pub fn copy_packages(&self) -> Option<&String> { + self.copy_packages.as_ref() + } + + pub fn reset_copy_packages(&mut self) { + self.copy_packages = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryCreate { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default_privilege(&mut self, default_privilege: String) { + self.default_privilege = Some(default_privilege); + } + + pub fn with_default_privilege(mut self, default_privilege: String) -> RepositoryCreate { + self.default_privilege = Some(default_privilege); + self + } + + pub fn default_privilege(&self) -> Option<&String> { + self.default_privilege.as_ref() + } + + pub fn reset_default_privilege(&mut self) { + self.default_privilege = None; + } + + pub fn set_delete_own(&mut self, delete_own: bool) { + self.delete_own = Some(delete_own); + } + + pub fn with_delete_own(mut self, delete_own: bool) -> RepositoryCreate { + self.delete_own = Some(delete_own); + self + } + + pub fn delete_own(&self) -> Option<&bool> { + self.delete_own.as_ref() + } + + pub fn reset_delete_own(&mut self) { + self.delete_own = None; + } + + pub fn set_delete_packages(&mut self, delete_packages: String) { + self.delete_packages = Some(delete_packages); + } + + pub fn with_delete_packages(mut self, delete_packages: String) -> RepositoryCreate { + self.delete_packages = Some(delete_packages); + self + } + + pub fn delete_packages(&self) -> Option<&String> { + self.delete_packages.as_ref() + } + + pub fn reset_delete_packages(&mut self) { + self.delete_packages = None; + } + + pub fn set_deleted_at(&mut self, deleted_at: String) { + self.deleted_at = Some(deleted_at); + } + + pub fn with_deleted_at(mut self, deleted_at: String) -> RepositoryCreate { + self.deleted_at = Some(deleted_at); + self + } + + pub fn deleted_at(&self) -> Option<&String> { + self.deleted_at.as_ref() + } + + pub fn reset_deleted_at(&mut self) { + self.deleted_at = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RepositoryCreate { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_distributes(&mut self, distributes: Vec) { + self.distributes = Some(distributes); + } + + pub fn with_distributes(mut self, distributes: Vec) -> RepositoryCreate { + self.distributes = Some(distributes); + self + } + + pub fn distributes(&self) -> Option<&Vec> { + self.distributes.as_ref() + } + + pub fn reset_distributes(&mut self) { + self.distributes = None; + } + + pub fn set_docker_refresh_tokens_enabled(&mut self, docker_refresh_tokens_enabled: bool) { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + } + + pub fn with_docker_refresh_tokens_enabled(mut self, docker_refresh_tokens_enabled: bool) -> RepositoryCreate { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + self + } + + pub fn docker_refresh_tokens_enabled(&self) -> Option<&bool> { + self.docker_refresh_tokens_enabled.as_ref() + } + + pub fn reset_docker_refresh_tokens_enabled(&mut self) { + self.docker_refresh_tokens_enabled = None; + } + + pub fn set_ecdsa_keys(&mut self, ecdsa_keys: Vec<::models::RepositoryEcdsaKey>) { + self.ecdsa_keys = Some(ecdsa_keys); + } + + pub fn with_ecdsa_keys(mut self, ecdsa_keys: Vec<::models::RepositoryEcdsaKey>) -> RepositoryCreate { + self.ecdsa_keys = Some(ecdsa_keys); + self + } + + pub fn ecdsa_keys(&self) -> Option<&Vec<::models::RepositoryEcdsaKey>> { + self.ecdsa_keys.as_ref() + } + + pub fn reset_ecdsa_keys(&mut self) { + self.ecdsa_keys = None; + } + + pub fn set_enforce_eula(&mut self, enforce_eula: bool) { + self.enforce_eula = Some(enforce_eula); + } + + pub fn with_enforce_eula(mut self, enforce_eula: bool) -> RepositoryCreate { + self.enforce_eula = Some(enforce_eula); + self + } + + pub fn enforce_eula(&self) -> Option<&bool> { + self.enforce_eula.as_ref() + } + + pub fn reset_enforce_eula(&mut self) { + self.enforce_eula = None; + } + + pub fn set_gpg_keys(&mut self, gpg_keys: Vec<::models::RepositoryGpgKey>) { + self.gpg_keys = Some(gpg_keys); + } + + pub fn with_gpg_keys(mut self, gpg_keys: Vec<::models::RepositoryGpgKey>) -> RepositoryCreate { + self.gpg_keys = Some(gpg_keys); + self + } + + pub fn gpg_keys(&self) -> Option<&Vec<::models::RepositoryGpgKey>> { + self.gpg_keys.as_ref() + } + + pub fn reset_gpg_keys(&mut self) { + self.gpg_keys = None; + } + + pub fn set_index_files(&mut self, index_files: bool) { + self.index_files = Some(index_files); + } + + pub fn with_index_files(mut self, index_files: bool) -> RepositoryCreate { + self.index_files = Some(index_files); + self + } + + pub fn index_files(&self) -> Option<&bool> { + self.index_files.as_ref() + } + + pub fn reset_index_files(&mut self) { + self.index_files = None; + } + + pub fn set_is_open_source(&mut self, is_open_source: bool) { + self.is_open_source = Some(is_open_source); + } + + pub fn with_is_open_source(mut self, is_open_source: bool) -> RepositoryCreate { + self.is_open_source = Some(is_open_source); + self + } + + pub fn is_open_source(&self) -> Option<&bool> { + self.is_open_source.as_ref() + } + + pub fn reset_is_open_source(&mut self) { + self.is_open_source = None; + } + + pub fn set_is_private(&mut self, is_private: bool) { + self.is_private = Some(is_private); + } + + pub fn with_is_private(mut self, is_private: bool) -> RepositoryCreate { + self.is_private = Some(is_private); + self + } + + pub fn is_private(&self) -> Option<&bool> { + self.is_private.as_ref() + } + + pub fn reset_is_private(&mut self) { + self.is_private = None; + } + + pub fn set_is_public(&mut self, is_public: bool) { + self.is_public = Some(is_public); + } + + pub fn with_is_public(mut self, is_public: bool) -> RepositoryCreate { + self.is_public = Some(is_public); + self + } + + pub fn is_public(&self) -> Option<&bool> { + self.is_public.as_ref() + } + + pub fn reset_is_public(&mut self) { + self.is_public = None; + } + + pub fn set_manage_entitlements_privilege(&mut self, manage_entitlements_privilege: String) { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + } + + pub fn with_manage_entitlements_privilege(mut self, manage_entitlements_privilege: String) -> RepositoryCreate { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + self + } + + pub fn manage_entitlements_privilege(&self) -> Option<&String> { + self.manage_entitlements_privilege.as_ref() + } + + pub fn reset_manage_entitlements_privilege(&mut self) { + self.manage_entitlements_privilege = None; + } + + pub fn set_move_own(&mut self, move_own: bool) { + self.move_own = Some(move_own); + } + + pub fn with_move_own(mut self, move_own: bool) -> RepositoryCreate { + self.move_own = Some(move_own); + self + } + + pub fn move_own(&self) -> Option<&bool> { + self.move_own.as_ref() + } + + pub fn reset_move_own(&mut self) { + self.move_own = None; + } + + pub fn set_move_packages(&mut self, move_packages: String) { + self.move_packages = Some(move_packages); + } + + pub fn with_move_packages(mut self, move_packages: String) -> RepositoryCreate { + self.move_packages = Some(move_packages); + self + } + + pub fn move_packages(&self) -> Option<&String> { + self.move_packages.as_ref() + } + + pub fn reset_move_packages(&mut self) { + self.move_packages = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RepositoryCreate { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> RepositoryCreate { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> RepositoryCreate { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_nuget_native_signing_enabled(&mut self, nuget_native_signing_enabled: bool) { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + } + + pub fn with_nuget_native_signing_enabled(mut self, nuget_native_signing_enabled: bool) -> RepositoryCreate { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + self + } + + pub fn nuget_native_signing_enabled(&self) -> Option<&bool> { + self.nuget_native_signing_enabled.as_ref() + } + + pub fn reset_nuget_native_signing_enabled(&mut self) { + self.nuget_native_signing_enabled = None; + } + + pub fn set_num_downloads(&mut self, num_downloads: i32) { + self.num_downloads = Some(num_downloads); + } + + pub fn with_num_downloads(mut self, num_downloads: i32) -> RepositoryCreate { + self.num_downloads = Some(num_downloads); + self + } + + pub fn num_downloads(&self) -> Option<&i32> { + self.num_downloads.as_ref() + } + + pub fn reset_num_downloads(&mut self) { + self.num_downloads = None; + } + + pub fn set_num_policy_violated_packages(&mut self, num_policy_violated_packages: i32) { + self.num_policy_violated_packages = Some(num_policy_violated_packages); + } + + pub fn with_num_policy_violated_packages(mut self, num_policy_violated_packages: i32) -> RepositoryCreate { + self.num_policy_violated_packages = Some(num_policy_violated_packages); + self + } + + pub fn num_policy_violated_packages(&self) -> Option<&i32> { + self.num_policy_violated_packages.as_ref() + } + + pub fn reset_num_policy_violated_packages(&mut self) { + self.num_policy_violated_packages = None; + } + + pub fn set_num_quarantined_packages(&mut self, num_quarantined_packages: i32) { + self.num_quarantined_packages = Some(num_quarantined_packages); + } + + pub fn with_num_quarantined_packages(mut self, num_quarantined_packages: i32) -> RepositoryCreate { + self.num_quarantined_packages = Some(num_quarantined_packages); + self + } + + pub fn num_quarantined_packages(&self) -> Option<&i32> { + self.num_quarantined_packages.as_ref() + } + + pub fn reset_num_quarantined_packages(&mut self) { + self.num_quarantined_packages = None; + } + + pub fn set_open_source_license(&mut self, open_source_license: String) { + self.open_source_license = Some(open_source_license); + } + + pub fn with_open_source_license(mut self, open_source_license: String) -> RepositoryCreate { + self.open_source_license = Some(open_source_license); + self + } + + pub fn open_source_license(&self) -> Option<&String> { + self.open_source_license.as_ref() + } + + pub fn reset_open_source_license(&mut self) { + self.open_source_license = None; + } + + pub fn set_open_source_project_url(&mut self, open_source_project_url: String) { + self.open_source_project_url = Some(open_source_project_url); + } + + pub fn with_open_source_project_url(mut self, open_source_project_url: String) -> RepositoryCreate { + self.open_source_project_url = Some(open_source_project_url); + self + } + + pub fn open_source_project_url(&self) -> Option<&String> { + self.open_source_project_url.as_ref() + } + + pub fn reset_open_source_project_url(&mut self) { + self.open_source_project_url = None; + } + + pub fn set_package_count(&mut self, package_count: i32) { + self.package_count = Some(package_count); + } + + pub fn with_package_count(mut self, package_count: i32) -> RepositoryCreate { + self.package_count = Some(package_count); + self + } + + pub fn package_count(&self) -> Option<&i32> { + self.package_count.as_ref() + } + + pub fn reset_package_count(&mut self) { + self.package_count = None; + } + + pub fn set_package_group_count(&mut self, package_group_count: i32) { + self.package_group_count = Some(package_group_count); + } + + pub fn with_package_group_count(mut self, package_group_count: i32) -> RepositoryCreate { + self.package_group_count = Some(package_group_count); + self + } + + pub fn package_group_count(&self) -> Option<&i32> { + self.package_group_count.as_ref() + } + + pub fn reset_package_group_count(&mut self) { + self.package_group_count = None; + } + + pub fn set_proxy_npmjs(&mut self, proxy_npmjs: bool) { + self.proxy_npmjs = Some(proxy_npmjs); + } + + pub fn with_proxy_npmjs(mut self, proxy_npmjs: bool) -> RepositoryCreate { + self.proxy_npmjs = Some(proxy_npmjs); + self + } + + pub fn proxy_npmjs(&self) -> Option<&bool> { + self.proxy_npmjs.as_ref() + } + + pub fn reset_proxy_npmjs(&mut self) { + self.proxy_npmjs = None; + } + + pub fn set_proxy_pypi(&mut self, proxy_pypi: bool) { + self.proxy_pypi = Some(proxy_pypi); + } + + pub fn with_proxy_pypi(mut self, proxy_pypi: bool) -> RepositoryCreate { + self.proxy_pypi = Some(proxy_pypi); + self + } + + pub fn proxy_pypi(&self) -> Option<&bool> { + self.proxy_pypi.as_ref() + } + + pub fn reset_proxy_pypi(&mut self) { + self.proxy_pypi = None; + } + + pub fn set_raw_package_index_enabled(&mut self, raw_package_index_enabled: bool) { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + } + + pub fn with_raw_package_index_enabled(mut self, raw_package_index_enabled: bool) -> RepositoryCreate { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + self + } + + pub fn raw_package_index_enabled(&self) -> Option<&bool> { + self.raw_package_index_enabled.as_ref() + } + + pub fn reset_raw_package_index_enabled(&mut self) { + self.raw_package_index_enabled = None; + } + + pub fn set_raw_package_index_signatures_enabled(&mut self, raw_package_index_signatures_enabled: bool) { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + } + + pub fn with_raw_package_index_signatures_enabled(mut self, raw_package_index_signatures_enabled: bool) -> RepositoryCreate { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + self + } + + pub fn raw_package_index_signatures_enabled(&self) -> Option<&bool> { + self.raw_package_index_signatures_enabled.as_ref() + } + + pub fn reset_raw_package_index_signatures_enabled(&mut self) { + self.raw_package_index_signatures_enabled = None; + } + + pub fn set_replace_packages(&mut self, replace_packages: String) { + self.replace_packages = Some(replace_packages); + } + + pub fn with_replace_packages(mut self, replace_packages: String) -> RepositoryCreate { + self.replace_packages = Some(replace_packages); + self + } + + pub fn replace_packages(&self) -> Option<&String> { + self.replace_packages.as_ref() + } + + pub fn reset_replace_packages(&mut self) { + self.replace_packages = None; + } + + pub fn set_replace_packages_by_default(&mut self, replace_packages_by_default: bool) { + self.replace_packages_by_default = Some(replace_packages_by_default); + } + + pub fn with_replace_packages_by_default(mut self, replace_packages_by_default: bool) -> RepositoryCreate { + self.replace_packages_by_default = Some(replace_packages_by_default); + self + } + + pub fn replace_packages_by_default(&self) -> Option<&bool> { + self.replace_packages_by_default.as_ref() + } + + pub fn reset_replace_packages_by_default(&mut self) { + self.replace_packages_by_default = None; + } + + pub fn set_repository_type(&mut self, repository_type: i32) { + self.repository_type = Some(repository_type); + } + + pub fn with_repository_type(mut self, repository_type: i32) -> RepositoryCreate { + self.repository_type = Some(repository_type); + self + } + + pub fn repository_type(&self) -> Option<&i32> { + self.repository_type.as_ref() + } + + pub fn reset_repository_type(&mut self) { + self.repository_type = None; + } + + pub fn set_repository_type_str(&mut self, repository_type_str: String) { + self.repository_type_str = Some(repository_type_str); + } + + pub fn with_repository_type_str(mut self, repository_type_str: String) -> RepositoryCreate { + self.repository_type_str = Some(repository_type_str); + self + } + + pub fn repository_type_str(&self) -> Option<&String> { + self.repository_type_str.as_ref() + } + + pub fn reset_repository_type_str(&mut self) { + self.repository_type_str = None; + } + + pub fn set_resync_own(&mut self, resync_own: bool) { + self.resync_own = Some(resync_own); + } + + pub fn with_resync_own(mut self, resync_own: bool) -> RepositoryCreate { + self.resync_own = Some(resync_own); + self + } + + pub fn resync_own(&self) -> Option<&bool> { + self.resync_own.as_ref() + } + + pub fn reset_resync_own(&mut self) { + self.resync_own = None; + } + + pub fn set_resync_packages(&mut self, resync_packages: String) { + self.resync_packages = Some(resync_packages); + } + + pub fn with_resync_packages(mut self, resync_packages: String) -> RepositoryCreate { + self.resync_packages = Some(resync_packages); + self + } + + pub fn resync_packages(&self) -> Option<&String> { + self.resync_packages.as_ref() + } + + pub fn reset_resync_packages(&mut self) { + self.resync_packages = None; + } + + pub fn set_scan_own(&mut self, scan_own: bool) { + self.scan_own = Some(scan_own); + } + + pub fn with_scan_own(mut self, scan_own: bool) -> RepositoryCreate { + self.scan_own = Some(scan_own); + self + } + + pub fn scan_own(&self) -> Option<&bool> { + self.scan_own.as_ref() + } + + pub fn reset_scan_own(&mut self) { + self.scan_own = None; + } + + pub fn set_scan_packages(&mut self, scan_packages: String) { + self.scan_packages = Some(scan_packages); + } + + pub fn with_scan_packages(mut self, scan_packages: String) -> RepositoryCreate { + self.scan_packages = Some(scan_packages); + self + } + + pub fn scan_packages(&self) -> Option<&String> { + self.scan_packages.as_ref() + } + + pub fn reset_scan_packages(&mut self) { + self.scan_packages = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> RepositoryCreate { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RepositoryCreate { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_show_setup_all(&mut self, show_setup_all: bool) { + self.show_setup_all = Some(show_setup_all); + } + + pub fn with_show_setup_all(mut self, show_setup_all: bool) -> RepositoryCreate { + self.show_setup_all = Some(show_setup_all); + self + } + + pub fn show_setup_all(&self) -> Option<&bool> { + self.show_setup_all.as_ref() + } + + pub fn reset_show_setup_all(&mut self) { + self.show_setup_all = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> RepositoryCreate { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_size_str(&mut self, size_str: String) { + self.size_str = Some(size_str); + } + + pub fn with_size_str(mut self, size_str: String) -> RepositoryCreate { + self.size_str = Some(size_str); + self + } + + pub fn size_str(&self) -> Option<&String> { + self.size_str.as_ref() + } + + pub fn reset_size_str(&mut self) { + self.size_str = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> RepositoryCreate { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RepositoryCreate { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_storage_region(&mut self, storage_region: String) { + self.storage_region = Some(storage_region); + } + + pub fn with_storage_region(mut self, storage_region: String) -> RepositoryCreate { + self.storage_region = Some(storage_region); + self + } + + pub fn storage_region(&self) -> Option<&String> { + self.storage_region.as_ref() + } + + pub fn reset_storage_region(&mut self) { + self.storage_region = None; + } + + pub fn set_strict_npm_validation(&mut self, strict_npm_validation: bool) { + self.strict_npm_validation = Some(strict_npm_validation); + } + + pub fn with_strict_npm_validation(mut self, strict_npm_validation: bool) -> RepositoryCreate { + self.strict_npm_validation = Some(strict_npm_validation); + self + } + + pub fn strict_npm_validation(&self) -> Option<&bool> { + self.strict_npm_validation.as_ref() + } + + pub fn reset_strict_npm_validation(&mut self) { + self.strict_npm_validation = None; + } + + pub fn set_tag_pre_releases_as_latest(&mut self, tag_pre_releases_as_latest: bool) { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + } + + pub fn with_tag_pre_releases_as_latest(mut self, tag_pre_releases_as_latest: bool) -> RepositoryCreate { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + self + } + + pub fn tag_pre_releases_as_latest(&self) -> Option<&bool> { + self.tag_pre_releases_as_latest.as_ref() + } + + pub fn reset_tag_pre_releases_as_latest(&mut self) { + self.tag_pre_releases_as_latest = None; + } + + pub fn set_use_debian_labels(&mut self, use_debian_labels: bool) { + self.use_debian_labels = Some(use_debian_labels); + } + + pub fn with_use_debian_labels(mut self, use_debian_labels: bool) -> RepositoryCreate { + self.use_debian_labels = Some(use_debian_labels); + self + } + + pub fn use_debian_labels(&self) -> Option<&bool> { + self.use_debian_labels.as_ref() + } + + pub fn reset_use_debian_labels(&mut self) { + self.use_debian_labels = None; + } + + pub fn set_use_default_cargo_upstream(&mut self, use_default_cargo_upstream: bool) { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + } + + pub fn with_use_default_cargo_upstream(mut self, use_default_cargo_upstream: bool) -> RepositoryCreate { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + self + } + + pub fn use_default_cargo_upstream(&self) -> Option<&bool> { + self.use_default_cargo_upstream.as_ref() + } + + pub fn reset_use_default_cargo_upstream(&mut self) { + self.use_default_cargo_upstream = None; + } + + pub fn set_use_entitlements_privilege(&mut self, use_entitlements_privilege: String) { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + } + + pub fn with_use_entitlements_privilege(mut self, use_entitlements_privilege: String) -> RepositoryCreate { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + self + } + + pub fn use_entitlements_privilege(&self) -> Option<&String> { + self.use_entitlements_privilege.as_ref() + } + + pub fn reset_use_entitlements_privilege(&mut self) { + self.use_entitlements_privilege = None; + } + + pub fn set_use_noarch_packages(&mut self, use_noarch_packages: bool) { + self.use_noarch_packages = Some(use_noarch_packages); + } + + pub fn with_use_noarch_packages(mut self, use_noarch_packages: bool) -> RepositoryCreate { + self.use_noarch_packages = Some(use_noarch_packages); + self + } + + pub fn use_noarch_packages(&self) -> Option<&bool> { + self.use_noarch_packages.as_ref() + } + + pub fn reset_use_noarch_packages(&mut self) { + self.use_noarch_packages = None; + } + + pub fn set_use_source_packages(&mut self, use_source_packages: bool) { + self.use_source_packages = Some(use_source_packages); + } + + pub fn with_use_source_packages(mut self, use_source_packages: bool) -> RepositoryCreate { + self.use_source_packages = Some(use_source_packages); + self + } + + pub fn use_source_packages(&self) -> Option<&bool> { + self.use_source_packages.as_ref() + } + + pub fn reset_use_source_packages(&mut self) { + self.use_source_packages = None; + } + + pub fn set_use_vulnerability_scanning(&mut self, use_vulnerability_scanning: bool) { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + } + + pub fn with_use_vulnerability_scanning(mut self, use_vulnerability_scanning: bool) -> RepositoryCreate { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + self + } + + pub fn use_vulnerability_scanning(&self) -> Option<&bool> { + self.use_vulnerability_scanning.as_ref() + } + + pub fn reset_use_vulnerability_scanning(&mut self) { + self.use_vulnerability_scanning = None; + } + + pub fn set_user_entitlements_enabled(&mut self, user_entitlements_enabled: bool) { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + } + + pub fn with_user_entitlements_enabled(mut self, user_entitlements_enabled: bool) -> RepositoryCreate { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + self + } + + pub fn user_entitlements_enabled(&self) -> Option<&bool> { + self.user_entitlements_enabled.as_ref() + } + + pub fn reset_user_entitlements_enabled(&mut self) { + self.user_entitlements_enabled = None; + } + + pub fn set_view_statistics(&mut self, view_statistics: String) { + self.view_statistics = Some(view_statistics); + } + + pub fn with_view_statistics(mut self, view_statistics: String) -> RepositoryCreate { + self.view_statistics = Some(view_statistics); + self + } + + pub fn view_statistics(&self) -> Option<&String> { + self.view_statistics.as_ref() + } + + pub fn reset_view_statistics(&mut self) { + self.view_statistics = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_create_request.rs b/bindings/rust/src/src/models/repository_create_request.rs new file mode 100644 index 00000000..4f0f33ff --- /dev/null +++ b/bindings/rust/src/src/models/repository_create_request.rs @@ -0,0 +1,928 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryCreateRequest { + /// The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. + #[serde(rename = "content_kind")] + content_kind: Option, + /// If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. + #[serde(rename = "contextual_auth_realm")] + contextual_auth_realm: Option, + /// If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "copy_own")] + copy_own: Option, + /// This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. + #[serde(rename = "copy_packages")] + copy_packages: Option, + /// This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. + #[serde(rename = "default_privilege")] + default_privilege: Option, + /// If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "delete_own")] + delete_own: Option, + /// This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. + #[serde(rename = "delete_packages")] + delete_packages: Option, + /// A description of the repository's purpose/contents. + #[serde(rename = "description")] + description: Option, + /// The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. + #[serde(rename = "distributes")] + distributes: Option>, + /// If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. + #[serde(rename = "docker_refresh_tokens_enabled")] + docker_refresh_tokens_enabled: Option, + /// If checked, downloads will explicitly require acceptance of an EULA. + #[serde(rename = "enforce_eula")] + enforce_eula: Option, + /// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. + #[serde(rename = "index_files")] + index_files: Option, + /// This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. + #[serde(rename = "manage_entitlements_privilege")] + manage_entitlements_privilege: Option, + /// If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "move_own")] + move_own: Option, + /// This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. + #[serde(rename = "move_packages")] + move_packages: Option, + /// A descriptive name for the repository. + #[serde(rename = "name")] + name: String, + /// When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. + #[serde(rename = "nuget_native_signing_enabled")] + nuget_native_signing_enabled: Option, + /// The SPDX identifier of the open source license. + #[serde(rename = "open_source_license")] + open_source_license: Option, + /// The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. + #[serde(rename = "open_source_project_url")] + open_source_project_url: Option, + /// If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_npmjs")] + proxy_npmjs: Option, + /// If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_pypi")] + proxy_pypi: Option, + /// If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. + #[serde(rename = "raw_package_index_enabled")] + raw_package_index_enabled: Option, + /// If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. + #[serde(rename = "raw_package_index_signatures_enabled")] + raw_package_index_signatures_enabled: Option, + /// This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. + #[serde(rename = "replace_packages")] + replace_packages: Option, + /// If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. + #[serde(rename = "replace_packages_by_default")] + replace_packages_by_default: Option, + /// The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. + #[serde(rename = "repository_type_str")] + repository_type_str: Option, + /// If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "resync_own")] + resync_own: Option, + /// This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. + #[serde(rename = "resync_packages")] + resync_packages: Option, + /// If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "scan_own")] + scan_own: Option, + /// This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. + #[serde(rename = "scan_packages")] + scan_packages: Option, + /// If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. + #[serde(rename = "show_setup_all")] + show_setup_all: Option, + /// The slug identifies the repository in URIs. + #[serde(rename = "slug")] + slug: Option, + /// The Cloudsmith region in which package files are stored. + #[serde(rename = "storage_region")] + storage_region: Option, + /// If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. + #[serde(rename = "strict_npm_validation")] + strict_npm_validation: Option, + /// If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools + #[serde(rename = "tag_pre_releases_as_latest")] + tag_pre_releases_as_latest: Option, + /// If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-'; or 'source=none' if no token was used. You can use this to help with pinning. + #[serde(rename = "use_debian_labels")] + use_debian_labels: Option, + /// If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. + #[serde(rename = "use_default_cargo_upstream")] + use_default_cargo_upstream: Option, + /// This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). + #[serde(rename = "use_entitlements_privilege")] + use_entitlements_privilege: Option, + /// If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). + #[serde(rename = "use_noarch_packages")] + use_noarch_packages: Option, + /// If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. + #[serde(rename = "use_source_packages")] + use_source_packages: Option, + /// If checked, vulnerability scanning will be enabled for all supported packages within this repository. + #[serde(rename = "use_vulnerability_scanning")] + use_vulnerability_scanning: Option, + /// If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. + #[serde(rename = "user_entitlements_enabled")] + user_entitlements_enabled: Option, + /// This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. + #[serde(rename = "view_statistics")] + view_statistics: Option +} + +impl RepositoryCreateRequest { + pub fn new(name: String) -> RepositoryCreateRequest { + RepositoryCreateRequest { + content_kind: None, + contextual_auth_realm: None, + copy_own: None, + copy_packages: None, + default_privilege: None, + delete_own: None, + delete_packages: None, + description: None, + distributes: None, + docker_refresh_tokens_enabled: None, + enforce_eula: None, + index_files: None, + manage_entitlements_privilege: None, + move_own: None, + move_packages: None, + name: name, + nuget_native_signing_enabled: None, + open_source_license: None, + open_source_project_url: None, + proxy_npmjs: None, + proxy_pypi: None, + raw_package_index_enabled: None, + raw_package_index_signatures_enabled: None, + replace_packages: None, + replace_packages_by_default: None, + repository_type_str: None, + resync_own: None, + resync_packages: None, + scan_own: None, + scan_packages: None, + show_setup_all: None, + slug: None, + storage_region: None, + strict_npm_validation: None, + tag_pre_releases_as_latest: None, + use_debian_labels: None, + use_default_cargo_upstream: None, + use_entitlements_privilege: None, + use_noarch_packages: None, + use_source_packages: None, + use_vulnerability_scanning: None, + user_entitlements_enabled: None, + view_statistics: None + } + } + + pub fn set_content_kind(&mut self, content_kind: String) { + self.content_kind = Some(content_kind); + } + + pub fn with_content_kind(mut self, content_kind: String) -> RepositoryCreateRequest { + self.content_kind = Some(content_kind); + self + } + + pub fn content_kind(&self) -> Option<&String> { + self.content_kind.as_ref() + } + + pub fn reset_content_kind(&mut self) { + self.content_kind = None; + } + + pub fn set_contextual_auth_realm(&mut self, contextual_auth_realm: bool) { + self.contextual_auth_realm = Some(contextual_auth_realm); + } + + pub fn with_contextual_auth_realm(mut self, contextual_auth_realm: bool) -> RepositoryCreateRequest { + self.contextual_auth_realm = Some(contextual_auth_realm); + self + } + + pub fn contextual_auth_realm(&self) -> Option<&bool> { + self.contextual_auth_realm.as_ref() + } + + pub fn reset_contextual_auth_realm(&mut self) { + self.contextual_auth_realm = None; + } + + pub fn set_copy_own(&mut self, copy_own: bool) { + self.copy_own = Some(copy_own); + } + + pub fn with_copy_own(mut self, copy_own: bool) -> RepositoryCreateRequest { + self.copy_own = Some(copy_own); + self + } + + pub fn copy_own(&self) -> Option<&bool> { + self.copy_own.as_ref() + } + + pub fn reset_copy_own(&mut self) { + self.copy_own = None; + } + + pub fn set_copy_packages(&mut self, copy_packages: String) { + self.copy_packages = Some(copy_packages); + } + + pub fn with_copy_packages(mut self, copy_packages: String) -> RepositoryCreateRequest { + self.copy_packages = Some(copy_packages); + self + } + + pub fn copy_packages(&self) -> Option<&String> { + self.copy_packages.as_ref() + } + + pub fn reset_copy_packages(&mut self) { + self.copy_packages = None; + } + + pub fn set_default_privilege(&mut self, default_privilege: String) { + self.default_privilege = Some(default_privilege); + } + + pub fn with_default_privilege(mut self, default_privilege: String) -> RepositoryCreateRequest { + self.default_privilege = Some(default_privilege); + self + } + + pub fn default_privilege(&self) -> Option<&String> { + self.default_privilege.as_ref() + } + + pub fn reset_default_privilege(&mut self) { + self.default_privilege = None; + } + + pub fn set_delete_own(&mut self, delete_own: bool) { + self.delete_own = Some(delete_own); + } + + pub fn with_delete_own(mut self, delete_own: bool) -> RepositoryCreateRequest { + self.delete_own = Some(delete_own); + self + } + + pub fn delete_own(&self) -> Option<&bool> { + self.delete_own.as_ref() + } + + pub fn reset_delete_own(&mut self) { + self.delete_own = None; + } + + pub fn set_delete_packages(&mut self, delete_packages: String) { + self.delete_packages = Some(delete_packages); + } + + pub fn with_delete_packages(mut self, delete_packages: String) -> RepositoryCreateRequest { + self.delete_packages = Some(delete_packages); + self + } + + pub fn delete_packages(&self) -> Option<&String> { + self.delete_packages.as_ref() + } + + pub fn reset_delete_packages(&mut self) { + self.delete_packages = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RepositoryCreateRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_distributes(&mut self, distributes: Vec) { + self.distributes = Some(distributes); + } + + pub fn with_distributes(mut self, distributes: Vec) -> RepositoryCreateRequest { + self.distributes = Some(distributes); + self + } + + pub fn distributes(&self) -> Option<&Vec> { + self.distributes.as_ref() + } + + pub fn reset_distributes(&mut self) { + self.distributes = None; + } + + pub fn set_docker_refresh_tokens_enabled(&mut self, docker_refresh_tokens_enabled: bool) { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + } + + pub fn with_docker_refresh_tokens_enabled(mut self, docker_refresh_tokens_enabled: bool) -> RepositoryCreateRequest { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + self + } + + pub fn docker_refresh_tokens_enabled(&self) -> Option<&bool> { + self.docker_refresh_tokens_enabled.as_ref() + } + + pub fn reset_docker_refresh_tokens_enabled(&mut self) { + self.docker_refresh_tokens_enabled = None; + } + + pub fn set_enforce_eula(&mut self, enforce_eula: bool) { + self.enforce_eula = Some(enforce_eula); + } + + pub fn with_enforce_eula(mut self, enforce_eula: bool) -> RepositoryCreateRequest { + self.enforce_eula = Some(enforce_eula); + self + } + + pub fn enforce_eula(&self) -> Option<&bool> { + self.enforce_eula.as_ref() + } + + pub fn reset_enforce_eula(&mut self) { + self.enforce_eula = None; + } + + pub fn set_index_files(&mut self, index_files: bool) { + self.index_files = Some(index_files); + } + + pub fn with_index_files(mut self, index_files: bool) -> RepositoryCreateRequest { + self.index_files = Some(index_files); + self + } + + pub fn index_files(&self) -> Option<&bool> { + self.index_files.as_ref() + } + + pub fn reset_index_files(&mut self) { + self.index_files = None; + } + + pub fn set_manage_entitlements_privilege(&mut self, manage_entitlements_privilege: String) { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + } + + pub fn with_manage_entitlements_privilege(mut self, manage_entitlements_privilege: String) -> RepositoryCreateRequest { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + self + } + + pub fn manage_entitlements_privilege(&self) -> Option<&String> { + self.manage_entitlements_privilege.as_ref() + } + + pub fn reset_manage_entitlements_privilege(&mut self) { + self.manage_entitlements_privilege = None; + } + + pub fn set_move_own(&mut self, move_own: bool) { + self.move_own = Some(move_own); + } + + pub fn with_move_own(mut self, move_own: bool) -> RepositoryCreateRequest { + self.move_own = Some(move_own); + self + } + + pub fn move_own(&self) -> Option<&bool> { + self.move_own.as_ref() + } + + pub fn reset_move_own(&mut self) { + self.move_own = None; + } + + pub fn set_move_packages(&mut self, move_packages: String) { + self.move_packages = Some(move_packages); + } + + pub fn with_move_packages(mut self, move_packages: String) -> RepositoryCreateRequest { + self.move_packages = Some(move_packages); + self + } + + pub fn move_packages(&self) -> Option<&String> { + self.move_packages.as_ref() + } + + pub fn reset_move_packages(&mut self) { + self.move_packages = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RepositoryCreateRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_nuget_native_signing_enabled(&mut self, nuget_native_signing_enabled: bool) { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + } + + pub fn with_nuget_native_signing_enabled(mut self, nuget_native_signing_enabled: bool) -> RepositoryCreateRequest { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + self + } + + pub fn nuget_native_signing_enabled(&self) -> Option<&bool> { + self.nuget_native_signing_enabled.as_ref() + } + + pub fn reset_nuget_native_signing_enabled(&mut self) { + self.nuget_native_signing_enabled = None; + } + + pub fn set_open_source_license(&mut self, open_source_license: String) { + self.open_source_license = Some(open_source_license); + } + + pub fn with_open_source_license(mut self, open_source_license: String) -> RepositoryCreateRequest { + self.open_source_license = Some(open_source_license); + self + } + + pub fn open_source_license(&self) -> Option<&String> { + self.open_source_license.as_ref() + } + + pub fn reset_open_source_license(&mut self) { + self.open_source_license = None; + } + + pub fn set_open_source_project_url(&mut self, open_source_project_url: String) { + self.open_source_project_url = Some(open_source_project_url); + } + + pub fn with_open_source_project_url(mut self, open_source_project_url: String) -> RepositoryCreateRequest { + self.open_source_project_url = Some(open_source_project_url); + self + } + + pub fn open_source_project_url(&self) -> Option<&String> { + self.open_source_project_url.as_ref() + } + + pub fn reset_open_source_project_url(&mut self) { + self.open_source_project_url = None; + } + + pub fn set_proxy_npmjs(&mut self, proxy_npmjs: bool) { + self.proxy_npmjs = Some(proxy_npmjs); + } + + pub fn with_proxy_npmjs(mut self, proxy_npmjs: bool) -> RepositoryCreateRequest { + self.proxy_npmjs = Some(proxy_npmjs); + self + } + + pub fn proxy_npmjs(&self) -> Option<&bool> { + self.proxy_npmjs.as_ref() + } + + pub fn reset_proxy_npmjs(&mut self) { + self.proxy_npmjs = None; + } + + pub fn set_proxy_pypi(&mut self, proxy_pypi: bool) { + self.proxy_pypi = Some(proxy_pypi); + } + + pub fn with_proxy_pypi(mut self, proxy_pypi: bool) -> RepositoryCreateRequest { + self.proxy_pypi = Some(proxy_pypi); + self + } + + pub fn proxy_pypi(&self) -> Option<&bool> { + self.proxy_pypi.as_ref() + } + + pub fn reset_proxy_pypi(&mut self) { + self.proxy_pypi = None; + } + + pub fn set_raw_package_index_enabled(&mut self, raw_package_index_enabled: bool) { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + } + + pub fn with_raw_package_index_enabled(mut self, raw_package_index_enabled: bool) -> RepositoryCreateRequest { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + self + } + + pub fn raw_package_index_enabled(&self) -> Option<&bool> { + self.raw_package_index_enabled.as_ref() + } + + pub fn reset_raw_package_index_enabled(&mut self) { + self.raw_package_index_enabled = None; + } + + pub fn set_raw_package_index_signatures_enabled(&mut self, raw_package_index_signatures_enabled: bool) { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + } + + pub fn with_raw_package_index_signatures_enabled(mut self, raw_package_index_signatures_enabled: bool) -> RepositoryCreateRequest { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + self + } + + pub fn raw_package_index_signatures_enabled(&self) -> Option<&bool> { + self.raw_package_index_signatures_enabled.as_ref() + } + + pub fn reset_raw_package_index_signatures_enabled(&mut self) { + self.raw_package_index_signatures_enabled = None; + } + + pub fn set_replace_packages(&mut self, replace_packages: String) { + self.replace_packages = Some(replace_packages); + } + + pub fn with_replace_packages(mut self, replace_packages: String) -> RepositoryCreateRequest { + self.replace_packages = Some(replace_packages); + self + } + + pub fn replace_packages(&self) -> Option<&String> { + self.replace_packages.as_ref() + } + + pub fn reset_replace_packages(&mut self) { + self.replace_packages = None; + } + + pub fn set_replace_packages_by_default(&mut self, replace_packages_by_default: bool) { + self.replace_packages_by_default = Some(replace_packages_by_default); + } + + pub fn with_replace_packages_by_default(mut self, replace_packages_by_default: bool) -> RepositoryCreateRequest { + self.replace_packages_by_default = Some(replace_packages_by_default); + self + } + + pub fn replace_packages_by_default(&self) -> Option<&bool> { + self.replace_packages_by_default.as_ref() + } + + pub fn reset_replace_packages_by_default(&mut self) { + self.replace_packages_by_default = None; + } + + pub fn set_repository_type_str(&mut self, repository_type_str: String) { + self.repository_type_str = Some(repository_type_str); + } + + pub fn with_repository_type_str(mut self, repository_type_str: String) -> RepositoryCreateRequest { + self.repository_type_str = Some(repository_type_str); + self + } + + pub fn repository_type_str(&self) -> Option<&String> { + self.repository_type_str.as_ref() + } + + pub fn reset_repository_type_str(&mut self) { + self.repository_type_str = None; + } + + pub fn set_resync_own(&mut self, resync_own: bool) { + self.resync_own = Some(resync_own); + } + + pub fn with_resync_own(mut self, resync_own: bool) -> RepositoryCreateRequest { + self.resync_own = Some(resync_own); + self + } + + pub fn resync_own(&self) -> Option<&bool> { + self.resync_own.as_ref() + } + + pub fn reset_resync_own(&mut self) { + self.resync_own = None; + } + + pub fn set_resync_packages(&mut self, resync_packages: String) { + self.resync_packages = Some(resync_packages); + } + + pub fn with_resync_packages(mut self, resync_packages: String) -> RepositoryCreateRequest { + self.resync_packages = Some(resync_packages); + self + } + + pub fn resync_packages(&self) -> Option<&String> { + self.resync_packages.as_ref() + } + + pub fn reset_resync_packages(&mut self) { + self.resync_packages = None; + } + + pub fn set_scan_own(&mut self, scan_own: bool) { + self.scan_own = Some(scan_own); + } + + pub fn with_scan_own(mut self, scan_own: bool) -> RepositoryCreateRequest { + self.scan_own = Some(scan_own); + self + } + + pub fn scan_own(&self) -> Option<&bool> { + self.scan_own.as_ref() + } + + pub fn reset_scan_own(&mut self) { + self.scan_own = None; + } + + pub fn set_scan_packages(&mut self, scan_packages: String) { + self.scan_packages = Some(scan_packages); + } + + pub fn with_scan_packages(mut self, scan_packages: String) -> RepositoryCreateRequest { + self.scan_packages = Some(scan_packages); + self + } + + pub fn scan_packages(&self) -> Option<&String> { + self.scan_packages.as_ref() + } + + pub fn reset_scan_packages(&mut self) { + self.scan_packages = None; + } + + pub fn set_show_setup_all(&mut self, show_setup_all: bool) { + self.show_setup_all = Some(show_setup_all); + } + + pub fn with_show_setup_all(mut self, show_setup_all: bool) -> RepositoryCreateRequest { + self.show_setup_all = Some(show_setup_all); + self + } + + pub fn show_setup_all(&self) -> Option<&bool> { + self.show_setup_all.as_ref() + } + + pub fn reset_show_setup_all(&mut self) { + self.show_setup_all = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> RepositoryCreateRequest { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_storage_region(&mut self, storage_region: String) { + self.storage_region = Some(storage_region); + } + + pub fn with_storage_region(mut self, storage_region: String) -> RepositoryCreateRequest { + self.storage_region = Some(storage_region); + self + } + + pub fn storage_region(&self) -> Option<&String> { + self.storage_region.as_ref() + } + + pub fn reset_storage_region(&mut self) { + self.storage_region = None; + } + + pub fn set_strict_npm_validation(&mut self, strict_npm_validation: bool) { + self.strict_npm_validation = Some(strict_npm_validation); + } + + pub fn with_strict_npm_validation(mut self, strict_npm_validation: bool) -> RepositoryCreateRequest { + self.strict_npm_validation = Some(strict_npm_validation); + self + } + + pub fn strict_npm_validation(&self) -> Option<&bool> { + self.strict_npm_validation.as_ref() + } + + pub fn reset_strict_npm_validation(&mut self) { + self.strict_npm_validation = None; + } + + pub fn set_tag_pre_releases_as_latest(&mut self, tag_pre_releases_as_latest: bool) { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + } + + pub fn with_tag_pre_releases_as_latest(mut self, tag_pre_releases_as_latest: bool) -> RepositoryCreateRequest { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + self + } + + pub fn tag_pre_releases_as_latest(&self) -> Option<&bool> { + self.tag_pre_releases_as_latest.as_ref() + } + + pub fn reset_tag_pre_releases_as_latest(&mut self) { + self.tag_pre_releases_as_latest = None; + } + + pub fn set_use_debian_labels(&mut self, use_debian_labels: bool) { + self.use_debian_labels = Some(use_debian_labels); + } + + pub fn with_use_debian_labels(mut self, use_debian_labels: bool) -> RepositoryCreateRequest { + self.use_debian_labels = Some(use_debian_labels); + self + } + + pub fn use_debian_labels(&self) -> Option<&bool> { + self.use_debian_labels.as_ref() + } + + pub fn reset_use_debian_labels(&mut self) { + self.use_debian_labels = None; + } + + pub fn set_use_default_cargo_upstream(&mut self, use_default_cargo_upstream: bool) { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + } + + pub fn with_use_default_cargo_upstream(mut self, use_default_cargo_upstream: bool) -> RepositoryCreateRequest { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + self + } + + pub fn use_default_cargo_upstream(&self) -> Option<&bool> { + self.use_default_cargo_upstream.as_ref() + } + + pub fn reset_use_default_cargo_upstream(&mut self) { + self.use_default_cargo_upstream = None; + } + + pub fn set_use_entitlements_privilege(&mut self, use_entitlements_privilege: String) { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + } + + pub fn with_use_entitlements_privilege(mut self, use_entitlements_privilege: String) -> RepositoryCreateRequest { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + self + } + + pub fn use_entitlements_privilege(&self) -> Option<&String> { + self.use_entitlements_privilege.as_ref() + } + + pub fn reset_use_entitlements_privilege(&mut self) { + self.use_entitlements_privilege = None; + } + + pub fn set_use_noarch_packages(&mut self, use_noarch_packages: bool) { + self.use_noarch_packages = Some(use_noarch_packages); + } + + pub fn with_use_noarch_packages(mut self, use_noarch_packages: bool) -> RepositoryCreateRequest { + self.use_noarch_packages = Some(use_noarch_packages); + self + } + + pub fn use_noarch_packages(&self) -> Option<&bool> { + self.use_noarch_packages.as_ref() + } + + pub fn reset_use_noarch_packages(&mut self) { + self.use_noarch_packages = None; + } + + pub fn set_use_source_packages(&mut self, use_source_packages: bool) { + self.use_source_packages = Some(use_source_packages); + } + + pub fn with_use_source_packages(mut self, use_source_packages: bool) -> RepositoryCreateRequest { + self.use_source_packages = Some(use_source_packages); + self + } + + pub fn use_source_packages(&self) -> Option<&bool> { + self.use_source_packages.as_ref() + } + + pub fn reset_use_source_packages(&mut self) { + self.use_source_packages = None; + } + + pub fn set_use_vulnerability_scanning(&mut self, use_vulnerability_scanning: bool) { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + } + + pub fn with_use_vulnerability_scanning(mut self, use_vulnerability_scanning: bool) -> RepositoryCreateRequest { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + self + } + + pub fn use_vulnerability_scanning(&self) -> Option<&bool> { + self.use_vulnerability_scanning.as_ref() + } + + pub fn reset_use_vulnerability_scanning(&mut self) { + self.use_vulnerability_scanning = None; + } + + pub fn set_user_entitlements_enabled(&mut self, user_entitlements_enabled: bool) { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + } + + pub fn with_user_entitlements_enabled(mut self, user_entitlements_enabled: bool) -> RepositoryCreateRequest { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + self + } + + pub fn user_entitlements_enabled(&self) -> Option<&bool> { + self.user_entitlements_enabled.as_ref() + } + + pub fn reset_user_entitlements_enabled(&mut self) { + self.user_entitlements_enabled = None; + } + + pub fn set_view_statistics(&mut self, view_statistics: String) { + self.view_statistics = Some(view_statistics); + } + + pub fn with_view_statistics(mut self, view_statistics: String) -> RepositoryCreateRequest { + self.view_statistics = Some(view_statistics); + self + } + + pub fn view_statistics(&self) -> Option<&String> { + self.view_statistics.as_ref() + } + + pub fn reset_view_statistics(&mut self) { + self.view_statistics = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_ecdsa_key.rs b/bindings/rust/src/src/models/repository_ecdsa_key.rs new file mode 100644 index 00000000..5c23389d --- /dev/null +++ b/bindings/rust/src/src/models/repository_ecdsa_key.rs @@ -0,0 +1,173 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryEcdsaKey { + /// If selected this is the active key for this repository. + #[serde(rename = "active")] + active: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// If selected this is the default key for this repository. + #[serde(rename = "default")] + default: Option, + /// The long identifier used by ECDSA for this key. + #[serde(rename = "fingerprint")] + fingerprint: Option, + #[serde(rename = "fingerprint_short")] + fingerprint_short: Option, + /// The public key given to repository users. + #[serde(rename = "public_key")] + public_key: Option, + /// The SSH fingerprint used by ECDSA for this key. + #[serde(rename = "ssh_fingerprint")] + ssh_fingerprint: Option +} + +impl RepositoryEcdsaKey { + pub fn new() -> RepositoryEcdsaKey { + RepositoryEcdsaKey { + active: None, + created_at: None, + default: None, + fingerprint: None, + fingerprint_short: None, + public_key: None, + ssh_fingerprint: None + } + } + + pub fn set_active(&mut self, active: bool) { + self.active = Some(active); + } + + pub fn with_active(mut self, active: bool) -> RepositoryEcdsaKey { + self.active = Some(active); + self + } + + pub fn active(&self) -> Option<&bool> { + self.active.as_ref() + } + + pub fn reset_active(&mut self) { + self.active = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryEcdsaKey { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryEcdsaKey { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_fingerprint(&mut self, fingerprint: String) { + self.fingerprint = Some(fingerprint); + } + + pub fn with_fingerprint(mut self, fingerprint: String) -> RepositoryEcdsaKey { + self.fingerprint = Some(fingerprint); + self + } + + pub fn fingerprint(&self) -> Option<&String> { + self.fingerprint.as_ref() + } + + pub fn reset_fingerprint(&mut self) { + self.fingerprint = None; + } + + pub fn set_fingerprint_short(&mut self, fingerprint_short: String) { + self.fingerprint_short = Some(fingerprint_short); + } + + pub fn with_fingerprint_short(mut self, fingerprint_short: String) -> RepositoryEcdsaKey { + self.fingerprint_short = Some(fingerprint_short); + self + } + + pub fn fingerprint_short(&self) -> Option<&String> { + self.fingerprint_short.as_ref() + } + + pub fn reset_fingerprint_short(&mut self) { + self.fingerprint_short = None; + } + + pub fn set_public_key(&mut self, public_key: String) { + self.public_key = Some(public_key); + } + + pub fn with_public_key(mut self, public_key: String) -> RepositoryEcdsaKey { + self.public_key = Some(public_key); + self + } + + pub fn public_key(&self) -> Option<&String> { + self.public_key.as_ref() + } + + pub fn reset_public_key(&mut self) { + self.public_key = None; + } + + pub fn set_ssh_fingerprint(&mut self, ssh_fingerprint: String) { + self.ssh_fingerprint = Some(ssh_fingerprint); + } + + pub fn with_ssh_fingerprint(mut self, ssh_fingerprint: String) -> RepositoryEcdsaKey { + self.ssh_fingerprint = Some(ssh_fingerprint); + self + } + + pub fn ssh_fingerprint(&self) -> Option<&String> { + self.ssh_fingerprint.as_ref() + } + + pub fn reset_ssh_fingerprint(&mut self) { + self.ssh_fingerprint = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_ecdsa_key_create.rs b/bindings/rust/src/src/models/repository_ecdsa_key_create.rs new file mode 100644 index 00000000..69d5bffc --- /dev/null +++ b/bindings/rust/src/src/models/repository_ecdsa_key_create.rs @@ -0,0 +1,67 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryEcdsaKeyCreate { + /// The ECDSA passphrase used for signing. + #[serde(rename = "ecdsa_passphrase")] + ecdsa_passphrase: Option, + /// The ECDSA private key. + #[serde(rename = "ecdsa_private_key")] + ecdsa_private_key: String +} + +impl RepositoryEcdsaKeyCreate { + pub fn new(ecdsa_private_key: String) -> RepositoryEcdsaKeyCreate { + RepositoryEcdsaKeyCreate { + ecdsa_passphrase: None, + ecdsa_private_key: ecdsa_private_key + } + } + + pub fn set_ecdsa_passphrase(&mut self, ecdsa_passphrase: String) { + self.ecdsa_passphrase = Some(ecdsa_passphrase); + } + + pub fn with_ecdsa_passphrase(mut self, ecdsa_passphrase: String) -> RepositoryEcdsaKeyCreate { + self.ecdsa_passphrase = Some(ecdsa_passphrase); + self + } + + pub fn ecdsa_passphrase(&self) -> Option<&String> { + self.ecdsa_passphrase.as_ref() + } + + pub fn reset_ecdsa_passphrase(&mut self) { + self.ecdsa_passphrase = None; + } + + pub fn set_ecdsa_private_key(&mut self, ecdsa_private_key: String) { + self.ecdsa_private_key = ecdsa_private_key; + } + + pub fn with_ecdsa_private_key(mut self, ecdsa_private_key: String) -> RepositoryEcdsaKeyCreate { + self.ecdsa_private_key = ecdsa_private_key; + self + } + + pub fn ecdsa_private_key(&self) -> &String { + &self.ecdsa_private_key + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_cidr.rs b/bindings/rust/src/src/models/repository_geo_ip_cidr.rs new file mode 100644 index 00000000..cf01fe3c --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_cidr.rs @@ -0,0 +1,64 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpCidr { + /// The allowed CIDRs for this repository + #[serde(rename = "allow")] + allow: Vec, + /// The denied CIDRs for this repository + #[serde(rename = "deny")] + deny: Vec +} + +impl RepositoryGeoIpCidr { + pub fn new(allow: Vec, deny: Vec) -> RepositoryGeoIpCidr { + RepositoryGeoIpCidr { + allow: allow, + deny: deny + } + } + + pub fn set_allow(&mut self, allow: Vec) { + self.allow = allow; + } + + pub fn with_allow(mut self, allow: Vec) -> RepositoryGeoIpCidr { + self.allow = allow; + self + } + + pub fn allow(&self) -> &Vec { + &self.allow + } + + + pub fn set_deny(&mut self, deny: Vec) { + self.deny = deny; + } + + pub fn with_deny(mut self, deny: Vec) -> RepositoryGeoIpCidr { + self.deny = deny; + self + } + + pub fn deny(&self) -> &Vec { + &self.deny + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_country_code.rs b/bindings/rust/src/src/models/repository_geo_ip_country_code.rs new file mode 100644 index 00000000..2398dbd3 --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_country_code.rs @@ -0,0 +1,64 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpCountryCode { + /// The allowed country codes for this repository + #[serde(rename = "allow")] + allow: Vec, + /// The denied country codes for this repository + #[serde(rename = "deny")] + deny: Vec +} + +impl RepositoryGeoIpCountryCode { + pub fn new(allow: Vec, deny: Vec) -> RepositoryGeoIpCountryCode { + RepositoryGeoIpCountryCode { + allow: allow, + deny: deny + } + } + + pub fn set_allow(&mut self, allow: Vec) { + self.allow = allow; + } + + pub fn with_allow(mut self, allow: Vec) -> RepositoryGeoIpCountryCode { + self.allow = allow; + self + } + + pub fn allow(&self) -> &Vec { + &self.allow + } + + + pub fn set_deny(&mut self, deny: Vec) { + self.deny = deny; + } + + pub fn with_deny(mut self, deny: Vec) -> RepositoryGeoIpCountryCode { + self.deny = deny; + self + } + + pub fn deny(&self) -> &Vec { + &self.deny + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_rules.rs b/bindings/rust/src/src/models/repository_geo_ip_rules.rs new file mode 100644 index 00000000..f2abe2d9 --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_rules.rs @@ -0,0 +1,62 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpRules { + #[serde(rename = "cidr")] + cidr: ::models::RepositoryGeoIpCidr, + #[serde(rename = "country_code")] + country_code: ::models::RepositoryGeoIpCountryCode +} + +impl RepositoryGeoIpRules { + pub fn new(cidr: ::models::RepositoryGeoIpCidr, country_code: ::models::RepositoryGeoIpCountryCode) -> RepositoryGeoIpRules { + RepositoryGeoIpRules { + cidr: cidr, + country_code: country_code + } + } + + pub fn set_cidr(&mut self, cidr: ::models::RepositoryGeoIpCidr) { + self.cidr = cidr; + } + + pub fn with_cidr(mut self, cidr: ::models::RepositoryGeoIpCidr) -> RepositoryGeoIpRules { + self.cidr = cidr; + self + } + + pub fn cidr(&self) -> &::models::RepositoryGeoIpCidr { + &self.cidr + } + + + pub fn set_country_code(&mut self, country_code: ::models::RepositoryGeoIpCountryCode) { + self.country_code = country_code; + } + + pub fn with_country_code(mut self, country_code: ::models::RepositoryGeoIpCountryCode) -> RepositoryGeoIpRules { + self.country_code = country_code; + self + } + + pub fn country_code(&self) -> &::models::RepositoryGeoIpCountryCode { + &self.country_code + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_rules_request.rs b/bindings/rust/src/src/models/repository_geo_ip_rules_request.rs new file mode 100644 index 00000000..bd016f1a --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_rules_request.rs @@ -0,0 +1,62 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpRulesRequest { + #[serde(rename = "cidr")] + cidr: ::models::RepositoryGeoIpCidr, + #[serde(rename = "country_code")] + country_code: ::models::RepositoryGeoIpCountryCode +} + +impl RepositoryGeoIpRulesRequest { + pub fn new(cidr: ::models::RepositoryGeoIpCidr, country_code: ::models::RepositoryGeoIpCountryCode) -> RepositoryGeoIpRulesRequest { + RepositoryGeoIpRulesRequest { + cidr: cidr, + country_code: country_code + } + } + + pub fn set_cidr(&mut self, cidr: ::models::RepositoryGeoIpCidr) { + self.cidr = cidr; + } + + pub fn with_cidr(mut self, cidr: ::models::RepositoryGeoIpCidr) -> RepositoryGeoIpRulesRequest { + self.cidr = cidr; + self + } + + pub fn cidr(&self) -> &::models::RepositoryGeoIpCidr { + &self.cidr + } + + + pub fn set_country_code(&mut self, country_code: ::models::RepositoryGeoIpCountryCode) { + self.country_code = country_code; + } + + pub fn with_country_code(mut self, country_code: ::models::RepositoryGeoIpCountryCode) -> RepositoryGeoIpRulesRequest { + self.country_code = country_code; + self + } + + pub fn country_code(&self) -> &::models::RepositoryGeoIpCountryCode { + &self.country_code + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_rules_request_patch.rs b/bindings/rust/src/src/models/repository_geo_ip_rules_request_patch.rs new file mode 100644 index 00000000..5ea18b29 --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_rules_request_patch.rs @@ -0,0 +1,68 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpRulesRequestPatch { + #[serde(rename = "cidr")] + cidr: Option<::models::RepositoryGeoIpCidr>, + #[serde(rename = "country_code")] + country_code: Option<::models::RepositoryGeoIpCountryCode> +} + +impl RepositoryGeoIpRulesRequestPatch { + pub fn new() -> RepositoryGeoIpRulesRequestPatch { + RepositoryGeoIpRulesRequestPatch { + cidr: None, + country_code: None + } + } + + pub fn set_cidr(&mut self, cidr: ::models::RepositoryGeoIpCidr) { + self.cidr = Some(cidr); + } + + pub fn with_cidr(mut self, cidr: ::models::RepositoryGeoIpCidr) -> RepositoryGeoIpRulesRequestPatch { + self.cidr = Some(cidr); + self + } + + pub fn cidr(&self) -> Option<&::models::RepositoryGeoIpCidr> { + self.cidr.as_ref() + } + + pub fn reset_cidr(&mut self) { + self.cidr = None; + } + + pub fn set_country_code(&mut self, country_code: ::models::RepositoryGeoIpCountryCode) { + self.country_code = Some(country_code); + } + + pub fn with_country_code(mut self, country_code: ::models::RepositoryGeoIpCountryCode) -> RepositoryGeoIpRulesRequestPatch { + self.country_code = Some(country_code); + self + } + + pub fn country_code(&self) -> Option<&::models::RepositoryGeoIpCountryCode> { + self.country_code.as_ref() + } + + pub fn reset_country_code(&mut self) { + self.country_code = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_status.rs b/bindings/rust/src/src/models/repository_geo_ip_status.rs new file mode 100644 index 00000000..c3bf1a16 --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_status.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpStatus { + /// If checked, any access to the website or downloads for this repository is allowed/denied according to the configured Geo/IP restriction rules. + #[serde(rename = "geoip_enabled")] + geoip_enabled: Option +} + +impl RepositoryGeoIpStatus { + pub fn new() -> RepositoryGeoIpStatus { + RepositoryGeoIpStatus { + geoip_enabled: None + } + } + + pub fn set_geoip_enabled(&mut self, geoip_enabled: bool) { + self.geoip_enabled = Some(geoip_enabled); + } + + pub fn with_geoip_enabled(mut self, geoip_enabled: bool) -> RepositoryGeoIpStatus { + self.geoip_enabled = Some(geoip_enabled); + self + } + + pub fn geoip_enabled(&self) -> Option<&bool> { + self.geoip_enabled.as_ref() + } + + pub fn reset_geoip_enabled(&mut self) { + self.geoip_enabled = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_test_address.rs b/bindings/rust/src/src/models/repository_geo_ip_test_address.rs new file mode 100644 index 00000000..5cdba18a --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_test_address.rs @@ -0,0 +1,46 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpTestAddress { + /// The IP addresses to test against this repository + #[serde(rename = "addresses")] + addresses: Vec +} + +impl RepositoryGeoIpTestAddress { + pub fn new(addresses: Vec) -> RepositoryGeoIpTestAddress { + RepositoryGeoIpTestAddress { + addresses: addresses + } + } + + pub fn set_addresses(&mut self, addresses: Vec) { + self.addresses = addresses; + } + + pub fn with_addresses(mut self, addresses: Vec) -> RepositoryGeoIpTestAddress { + self.addresses = addresses; + self + } + + pub fn addresses(&self) -> &Vec { + &self.addresses + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_test_address_response.rs b/bindings/rust/src/src/models/repository_geo_ip_test_address_response.rs new file mode 100644 index 00000000..08903869 --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_test_address_response.rs @@ -0,0 +1,46 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpTestAddressResponse { + /// The IP address test results ordered by allowed + #[serde(rename = "addresses")] + addresses: Vec<::models::RepositoryGeoIpTestAddressResponseDict> +} + +impl RepositoryGeoIpTestAddressResponse { + pub fn new(addresses: Vec<::models::RepositoryGeoIpTestAddressResponseDict>) -> RepositoryGeoIpTestAddressResponse { + RepositoryGeoIpTestAddressResponse { + addresses: addresses + } + } + + pub fn set_addresses(&mut self, addresses: Vec<::models::RepositoryGeoIpTestAddressResponseDict>) { + self.addresses = addresses; + } + + pub fn with_addresses(mut self, addresses: Vec<::models::RepositoryGeoIpTestAddressResponseDict>) -> RepositoryGeoIpTestAddressResponse { + self.addresses = addresses; + self + } + + pub fn addresses(&self) -> &Vec<::models::RepositoryGeoIpTestAddressResponseDict> { + &self.addresses + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_geo_ip_test_address_response_dict.rs b/bindings/rust/src/src/models/repository_geo_ip_test_address_response_dict.rs new file mode 100644 index 00000000..d12bd16c --- /dev/null +++ b/bindings/rust/src/src/models/repository_geo_ip_test_address_response_dict.rs @@ -0,0 +1,100 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGeoIpTestAddressResponseDict { + /// The result of the IP test + #[serde(rename = "allowed")] + allowed: bool, + /// The country code of the tested IP address + #[serde(rename = "country_code")] + country_code: String, + /// The IP address that was tested + #[serde(rename = "ip_address")] + ip_address: String, + /// The reason for the result + #[serde(rename = "reason")] + reason: String +} + +impl RepositoryGeoIpTestAddressResponseDict { + pub fn new(allowed: bool, country_code: String, ip_address: String, reason: String) -> RepositoryGeoIpTestAddressResponseDict { + RepositoryGeoIpTestAddressResponseDict { + allowed: allowed, + country_code: country_code, + ip_address: ip_address, + reason: reason + } + } + + pub fn set_allowed(&mut self, allowed: bool) { + self.allowed = allowed; + } + + pub fn with_allowed(mut self, allowed: bool) -> RepositoryGeoIpTestAddressResponseDict { + self.allowed = allowed; + self + } + + pub fn allowed(&self) -> &bool { + &self.allowed + } + + + pub fn set_country_code(&mut self, country_code: String) { + self.country_code = country_code; + } + + pub fn with_country_code(mut self, country_code: String) -> RepositoryGeoIpTestAddressResponseDict { + self.country_code = country_code; + self + } + + pub fn country_code(&self) -> &String { + &self.country_code + } + + + pub fn set_ip_address(&mut self, ip_address: String) { + self.ip_address = ip_address; + } + + pub fn with_ip_address(mut self, ip_address: String) -> RepositoryGeoIpTestAddressResponseDict { + self.ip_address = ip_address; + self + } + + pub fn ip_address(&self) -> &String { + &self.ip_address + } + + + pub fn set_reason(&mut self, reason: String) { + self.reason = reason; + } + + pub fn with_reason(mut self, reason: String) -> RepositoryGeoIpTestAddressResponseDict { + self.reason = reason; + self + } + + pub fn reason(&self) -> &String { + &self.reason + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_gpg_key.rs b/bindings/rust/src/src/models/repository_gpg_key.rs new file mode 100644 index 00000000..07c31eb9 --- /dev/null +++ b/bindings/rust/src/src/models/repository_gpg_key.rs @@ -0,0 +1,169 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGpgKey { + /// If selected this is the active key for this repository. + #[serde(rename = "active")] + active: Option, + #[serde(rename = "comment")] + comment: String, + #[serde(rename = "created_at")] + created_at: Option, + /// If selected this is the default key for this repository. + #[serde(rename = "default")] + default: Option, + /// The long identifier used by GPG for this key. + #[serde(rename = "fingerprint")] + fingerprint: Option, + #[serde(rename = "fingerprint_short")] + fingerprint_short: Option, + /// The public key given to repository users. + #[serde(rename = "public_key")] + public_key: Option +} + +impl RepositoryGpgKey { + pub fn new(comment: String) -> RepositoryGpgKey { + RepositoryGpgKey { + active: None, + comment: comment, + created_at: None, + default: None, + fingerprint: None, + fingerprint_short: None, + public_key: None + } + } + + pub fn set_active(&mut self, active: bool) { + self.active = Some(active); + } + + pub fn with_active(mut self, active: bool) -> RepositoryGpgKey { + self.active = Some(active); + self + } + + pub fn active(&self) -> Option<&bool> { + self.active.as_ref() + } + + pub fn reset_active(&mut self) { + self.active = None; + } + + pub fn set_comment(&mut self, comment: String) { + self.comment = comment; + } + + pub fn with_comment(mut self, comment: String) -> RepositoryGpgKey { + self.comment = comment; + self + } + + pub fn comment(&self) -> &String { + &self.comment + } + + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryGpgKey { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryGpgKey { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_fingerprint(&mut self, fingerprint: String) { + self.fingerprint = Some(fingerprint); + } + + pub fn with_fingerprint(mut self, fingerprint: String) -> RepositoryGpgKey { + self.fingerprint = Some(fingerprint); + self + } + + pub fn fingerprint(&self) -> Option<&String> { + self.fingerprint.as_ref() + } + + pub fn reset_fingerprint(&mut self) { + self.fingerprint = None; + } + + pub fn set_fingerprint_short(&mut self, fingerprint_short: String) { + self.fingerprint_short = Some(fingerprint_short); + } + + pub fn with_fingerprint_short(mut self, fingerprint_short: String) -> RepositoryGpgKey { + self.fingerprint_short = Some(fingerprint_short); + self + } + + pub fn fingerprint_short(&self) -> Option<&String> { + self.fingerprint_short.as_ref() + } + + pub fn reset_fingerprint_short(&mut self) { + self.fingerprint_short = None; + } + + pub fn set_public_key(&mut self, public_key: String) { + self.public_key = Some(public_key); + } + + pub fn with_public_key(mut self, public_key: String) -> RepositoryGpgKey { + self.public_key = Some(public_key); + self + } + + pub fn public_key(&self) -> Option<&String> { + self.public_key.as_ref() + } + + pub fn reset_public_key(&mut self) { + self.public_key = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_gpg_key_create.rs b/bindings/rust/src/src/models/repository_gpg_key_create.rs new file mode 100644 index 00000000..20c71437 --- /dev/null +++ b/bindings/rust/src/src/models/repository_gpg_key_create.rs @@ -0,0 +1,67 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryGpgKeyCreate { + /// The GPG passphrase used for signing. + #[serde(rename = "gpg_passphrase")] + gpg_passphrase: Option, + /// The GPG private key. + #[serde(rename = "gpg_private_key")] + gpg_private_key: String +} + +impl RepositoryGpgKeyCreate { + pub fn new(gpg_private_key: String) -> RepositoryGpgKeyCreate { + RepositoryGpgKeyCreate { + gpg_passphrase: None, + gpg_private_key: gpg_private_key + } + } + + pub fn set_gpg_passphrase(&mut self, gpg_passphrase: String) { + self.gpg_passphrase = Some(gpg_passphrase); + } + + pub fn with_gpg_passphrase(mut self, gpg_passphrase: String) -> RepositoryGpgKeyCreate { + self.gpg_passphrase = Some(gpg_passphrase); + self + } + + pub fn gpg_passphrase(&self) -> Option<&String> { + self.gpg_passphrase.as_ref() + } + + pub fn reset_gpg_passphrase(&mut self) { + self.gpg_passphrase = None; + } + + pub fn set_gpg_private_key(&mut self, gpg_private_key: String) { + self.gpg_private_key = gpg_private_key; + } + + pub fn with_gpg_private_key(mut self, gpg_private_key: String) -> RepositoryGpgKeyCreate { + self.gpg_private_key = gpg_private_key; + self + } + + pub fn gpg_private_key(&self) -> &String { + &self.gpg_private_key + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_privilege_dict.rs b/bindings/rust/src/src/models/repository_privilege_dict.rs new file mode 100644 index 00000000..fd92588a --- /dev/null +++ b/bindings/rust/src/src/models/repository_privilege_dict.rs @@ -0,0 +1,109 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryPrivilegeDict { + /// The level of privilege that the user or team should be granted to the specified repository. + #[serde(rename = "privilege")] + privilege: String, + /// The service identifier (slug). + #[serde(rename = "service")] + service: Option, + /// The team identifier (slug). + #[serde(rename = "team")] + team: Option, + /// The user identifier (slug). + #[serde(rename = "user")] + user: Option +} + +impl RepositoryPrivilegeDict { + pub fn new(privilege: String) -> RepositoryPrivilegeDict { + RepositoryPrivilegeDict { + privilege: privilege, + service: None, + team: None, + user: None + } + } + + pub fn set_privilege(&mut self, privilege: String) { + self.privilege = privilege; + } + + pub fn with_privilege(mut self, privilege: String) -> RepositoryPrivilegeDict { + self.privilege = privilege; + self + } + + pub fn privilege(&self) -> &String { + &self.privilege + } + + + pub fn set_service(&mut self, service: String) { + self.service = Some(service); + } + + pub fn with_service(mut self, service: String) -> RepositoryPrivilegeDict { + self.service = Some(service); + self + } + + pub fn service(&self) -> Option<&String> { + self.service.as_ref() + } + + pub fn reset_service(&mut self) { + self.service = None; + } + + pub fn set_team(&mut self, team: String) { + self.team = Some(team); + } + + pub fn with_team(mut self, team: String) -> RepositoryPrivilegeDict { + self.team = Some(team); + self + } + + pub fn team(&self) -> Option<&String> { + self.team.as_ref() + } + + pub fn reset_team(&mut self) { + self.team = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> RepositoryPrivilegeDict { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_privilege_input.rs b/bindings/rust/src/src/models/repository_privilege_input.rs new file mode 100644 index 00000000..c6fddb32 --- /dev/null +++ b/bindings/rust/src/src/models/repository_privilege_input.rs @@ -0,0 +1,46 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryPrivilegeInput { + /// List of objects with explicit privileges to the repository. + #[serde(rename = "privileges")] + privileges: Vec<::models::RepositoryPrivilegeDict> +} + +impl RepositoryPrivilegeInput { + pub fn new(privileges: Vec<::models::RepositoryPrivilegeDict>) -> RepositoryPrivilegeInput { + RepositoryPrivilegeInput { + privileges: privileges + } + } + + pub fn set_privileges(&mut self, privileges: Vec<::models::RepositoryPrivilegeDict>) { + self.privileges = privileges; + } + + pub fn with_privileges(mut self, privileges: Vec<::models::RepositoryPrivilegeDict>) -> RepositoryPrivilegeInput { + self.privileges = privileges; + self + } + + pub fn privileges(&self) -> &Vec<::models::RepositoryPrivilegeDict> { + &self.privileges + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_privilege_input_request.rs b/bindings/rust/src/src/models/repository_privilege_input_request.rs new file mode 100644 index 00000000..024898f4 --- /dev/null +++ b/bindings/rust/src/src/models/repository_privilege_input_request.rs @@ -0,0 +1,46 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryPrivilegeInputRequest { + /// List of objects with explicit privileges to the repository. + #[serde(rename = "privileges")] + privileges: Vec<::models::RepositoryPrivilegeDict> +} + +impl RepositoryPrivilegeInputRequest { + pub fn new(privileges: Vec<::models::RepositoryPrivilegeDict>) -> RepositoryPrivilegeInputRequest { + RepositoryPrivilegeInputRequest { + privileges: privileges + } + } + + pub fn set_privileges(&mut self, privileges: Vec<::models::RepositoryPrivilegeDict>) { + self.privileges = privileges; + } + + pub fn with_privileges(mut self, privileges: Vec<::models::RepositoryPrivilegeDict>) -> RepositoryPrivilegeInputRequest { + self.privileges = privileges; + self + } + + pub fn privileges(&self) -> &Vec<::models::RepositoryPrivilegeDict> { + &self.privileges + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_privilege_input_request_patch.rs b/bindings/rust/src/src/models/repository_privilege_input_request_patch.rs new file mode 100644 index 00000000..de8552eb --- /dev/null +++ b/bindings/rust/src/src/models/repository_privilege_input_request_patch.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryPrivilegeInputRequestPatch { + /// List of objects with explicit privileges to the repository. + #[serde(rename = "privileges")] + privileges: Option> +} + +impl RepositoryPrivilegeInputRequestPatch { + pub fn new() -> RepositoryPrivilegeInputRequestPatch { + RepositoryPrivilegeInputRequestPatch { + privileges: None + } + } + + pub fn set_privileges(&mut self, privileges: Vec<::models::RepositoryPrivilegeDict>) { + self.privileges = Some(privileges); + } + + pub fn with_privileges(mut self, privileges: Vec<::models::RepositoryPrivilegeDict>) -> RepositoryPrivilegeInputRequestPatch { + self.privileges = Some(privileges); + self + } + + pub fn privileges(&self) -> Option<&Vec<::models::RepositoryPrivilegeDict>> { + self.privileges.as_ref() + } + + pub fn reset_privileges(&mut self) { + self.privileges = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_request_patch.rs b/bindings/rust/src/src/models/repository_request_patch.rs new file mode 100644 index 00000000..2cc7752f --- /dev/null +++ b/bindings/rust/src/src/models/repository_request_patch.rs @@ -0,0 +1,910 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryRequestPatch { + /// The repository content kind determines whether this repository contains packages, or provides a distribution of packages from other repositories. You can only select the content kind at repository creation time. + #[serde(rename = "content_kind")] + content_kind: Option, + /// If checked, missing credentials for this repository where basic authentication is required shall present an enriched value in the 'WWW-Authenticate' header containing the namespace and repository. This can be useful for tooling such as SBT where the authentication realm is used to distinguish and disambiguate credentials. + #[serde(rename = "contextual_auth_realm")] + contextual_auth_realm: Option, + /// If checked, users can copy any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "copy_own")] + copy_own: Option, + /// This defines the minimum level of privilege required for a user to copy packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific copy setting. + #[serde(rename = "copy_packages")] + copy_packages: Option, + /// This defines the default level of privilege that all of your organization members have for this repository. This does not include collaborators, but applies to any member of the org regardless of their own membership role (i.e. it applies to owners, managers and members). Be careful if setting this to admin, because any member will be able to change settings. + #[serde(rename = "default_privilege")] + default_privilege: Option, + /// If checked, users can delete any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "delete_own")] + delete_own: Option, + /// This defines the minimum level of privilege required for a user to delete packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific delete setting. + #[serde(rename = "delete_packages")] + delete_packages: Option, + /// A description of the repository's purpose/contents. + #[serde(rename = "description")] + description: Option, + /// The repositories distributed through this repo. Adding repos here is only valid if the content_kind is DISTRIBUTION. + #[serde(rename = "distributes")] + distributes: Option>, + /// If checked, refresh tokens will be issued in addition to access tokens for Docker authentication. This allows unlimited extension of the lifetime of access tokens. + #[serde(rename = "docker_refresh_tokens_enabled")] + docker_refresh_tokens_enabled: Option, + /// If checked, downloads will explicitly require acceptance of an EULA. + #[serde(rename = "enforce_eula")] + enforce_eula: Option, + /// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. + #[serde(rename = "index_files")] + index_files: Option, + /// This defines the minimum level of privilege required for a user to manage entitlement tokens with private repositories. Management is the ability to create, alter, enable, disable or delete all tokens without a repository. + #[serde(rename = "manage_entitlements_privilege")] + manage_entitlements_privilege: Option, + /// If checked, users can move any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "move_own")] + move_own: Option, + /// This defines the minimum level of privilege required for a user to move packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific move setting. + #[serde(rename = "move_packages")] + move_packages: Option, + /// A descriptive name for the repository. + #[serde(rename = "name")] + name: Option, + /// When enabled, all pushed (or pulled from upstream) nuget packages and artifacts will be signed using the repository's X.509 RSA certificate. Additionally, the nuget RepositorySignature index will list all of the repository's signing certificates including the ones from configured upstreams. + #[serde(rename = "nuget_native_signing_enabled")] + nuget_native_signing_enabled: Option, + /// The SPDX identifier of the open source license. + #[serde(rename = "open_source_license")] + open_source_license: Option, + /// The URL to the Open-Source project, used for validating that the project meets the requirements for Open-Source. + #[serde(rename = "open_source_project_url")] + open_source_project_url: Option, + /// If checked, Npm packages that are not in the repository when requested by clients will automatically be proxied from the public npmjs.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_npmjs")] + proxy_npmjs: Option, + /// If checked, Python packages that are not in the repository when requested by clients will automatically be proxied from the public pypi.python.org registry. If there is at least one version for a package, others will not be proxied. + #[serde(rename = "proxy_pypi")] + proxy_pypi: Option, + /// If checked, HTML and JSON indexes will be generated that list all available raw packages in the repository. + #[serde(rename = "raw_package_index_enabled")] + raw_package_index_enabled: Option, + /// If checked, the HTML and JSON indexes will display raw package GPG signatures alongside the index packages. + #[serde(rename = "raw_package_index_signatures_enabled")] + raw_package_index_signatures_enabled: Option, + /// This defines the minimum level of privilege required for a user to republish packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific republish setting. Please note that the user still requires the privilege to delete packages that will be replaced by the new package; otherwise the republish will fail. + #[serde(rename = "replace_packages")] + replace_packages: Option, + /// If checked, uploaded packages will overwrite/replace any others with the same attributes (e.g. same version) by default. This only applies if the user has the required privilege for the republishing AND has the required privilege to delete existing packages that they don't own. + #[serde(rename = "replace_packages_by_default")] + replace_packages_by_default: Option, + /// The repository type changes how it is accessed and billed. Private repositories are visible only to you or authorized delegates. Public repositories are visible to all Cloudsmith users. + #[serde(rename = "repository_type_str")] + repository_type_str: Option, + /// If checked, users can resync any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "resync_own")] + resync_own: Option, + /// This defines the minimum level of privilege required for a user to resync packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific resync setting. + #[serde(rename = "resync_packages")] + resync_packages: Option, + /// If checked, users can scan any of their own packages that they have uploaded, assuming that they still have write privilege for the repository. This takes precedence over privileges configured in the 'Access Controls' section of the repository, and any inherited from the org. + #[serde(rename = "scan_own")] + scan_own: Option, + /// This defines the minimum level of privilege required for a user to scan packages. Unless the package was uploaded by that user, in which the permission may be overridden by the user-specific scan setting. + #[serde(rename = "scan_packages")] + scan_packages: Option, + /// If checked, the Set Me Up help for all formats will always be shown, even if you don't have packages of that type uploaded. Otherwise, help will only be shown for packages that are in the repository. For example, if you have uploaded only NuGet packages, then the Set Me Up help for NuGet packages will be shown only. + #[serde(rename = "show_setup_all")] + show_setup_all: Option, + /// The slug identifies the repository in URIs. + #[serde(rename = "slug")] + slug: Option, + /// If checked, npm packages will be validated strictly to ensure the package matches specifcation. You can turn this on if you want to guarantee that the packages will work with npm-cli and other tools correctly. + #[serde(rename = "strict_npm_validation")] + strict_npm_validation: Option, + /// If checked, packages pushed with a pre-release component on that version will be marked with the 'latest' tag. Note that if unchecked, a repository containing ONLY pre-release versions, will have no version marked latest which may cause incompatibility with native tools + #[serde(rename = "tag_pre_releases_as_latest")] + tag_pre_releases_as_latest: Option, + /// If checked, a 'Label' field will be present in Debian-based repositories. It will contain a string that identifies the entitlement token used to authenticate the repository, in the form of 'source=t-'; or 'source=none' if no token was used. You can use this to help with pinning. + #[serde(rename = "use_debian_labels")] + use_debian_labels: Option, + /// If checked, dependencies of uploaded Cargo crates which do not set an explicit value for \"registry\" will be assumed to be available from crates.io. If unchecked, dependencies with unspecified \"registry\" values will be assumed to be available in the registry being uploaded to. Uncheck this if you want to ensure that dependencies are only ever installed from Cloudsmith unless explicitly specified as belong to another registry. + #[serde(rename = "use_default_cargo_upstream")] + use_default_cargo_upstream: Option, + /// This defines the minimum level of privilege required for a user to see/use entitlement tokens with private repositories. If a user does not have the permission, they will only be able to download packages using other credentials, such as email/password via basic authentication. Use this if you want to force users to only use their user-based token, which is tied to their access (if removed, they can't use it). + #[serde(rename = "use_entitlements_privilege")] + use_entitlements_privilege: Option, + /// If checked, noarch packages (if supported) are enabled in installations/configurations. A noarch package is one that is not tied to specific system architecture (like i686). + #[serde(rename = "use_noarch_packages")] + use_noarch_packages: Option, + /// If checked, source packages (if supported) are enabled in installations/configurations. A source package is one that contains source code rather than built binaries. + #[serde(rename = "use_source_packages")] + use_source_packages: Option, + /// If checked, vulnerability scanning will be enabled for all supported packages within this repository. + #[serde(rename = "use_vulnerability_scanning")] + use_vulnerability_scanning: Option, + /// If checked, users can use and manage their own user-specific entitlement token for the repository (if private). Otherwise, user-specific entitlements are disabled for all users. + #[serde(rename = "user_entitlements_enabled")] + user_entitlements_enabled: Option, + /// This defines the minimum level of privilege required for a user to view repository statistics, to include entitlement-based usage, if applicable. If a user does not have the permission, they won't be able to view any statistics, either via the UI, API or CLI. + #[serde(rename = "view_statistics")] + view_statistics: Option +} + +impl RepositoryRequestPatch { + pub fn new() -> RepositoryRequestPatch { + RepositoryRequestPatch { + content_kind: None, + contextual_auth_realm: None, + copy_own: None, + copy_packages: None, + default_privilege: None, + delete_own: None, + delete_packages: None, + description: None, + distributes: None, + docker_refresh_tokens_enabled: None, + enforce_eula: None, + index_files: None, + manage_entitlements_privilege: None, + move_own: None, + move_packages: None, + name: None, + nuget_native_signing_enabled: None, + open_source_license: None, + open_source_project_url: None, + proxy_npmjs: None, + proxy_pypi: None, + raw_package_index_enabled: None, + raw_package_index_signatures_enabled: None, + replace_packages: None, + replace_packages_by_default: None, + repository_type_str: None, + resync_own: None, + resync_packages: None, + scan_own: None, + scan_packages: None, + show_setup_all: None, + slug: None, + strict_npm_validation: None, + tag_pre_releases_as_latest: None, + use_debian_labels: None, + use_default_cargo_upstream: None, + use_entitlements_privilege: None, + use_noarch_packages: None, + use_source_packages: None, + use_vulnerability_scanning: None, + user_entitlements_enabled: None, + view_statistics: None + } + } + + pub fn set_content_kind(&mut self, content_kind: String) { + self.content_kind = Some(content_kind); + } + + pub fn with_content_kind(mut self, content_kind: String) -> RepositoryRequestPatch { + self.content_kind = Some(content_kind); + self + } + + pub fn content_kind(&self) -> Option<&String> { + self.content_kind.as_ref() + } + + pub fn reset_content_kind(&mut self) { + self.content_kind = None; + } + + pub fn set_contextual_auth_realm(&mut self, contextual_auth_realm: bool) { + self.contextual_auth_realm = Some(contextual_auth_realm); + } + + pub fn with_contextual_auth_realm(mut self, contextual_auth_realm: bool) -> RepositoryRequestPatch { + self.contextual_auth_realm = Some(contextual_auth_realm); + self + } + + pub fn contextual_auth_realm(&self) -> Option<&bool> { + self.contextual_auth_realm.as_ref() + } + + pub fn reset_contextual_auth_realm(&mut self) { + self.contextual_auth_realm = None; + } + + pub fn set_copy_own(&mut self, copy_own: bool) { + self.copy_own = Some(copy_own); + } + + pub fn with_copy_own(mut self, copy_own: bool) -> RepositoryRequestPatch { + self.copy_own = Some(copy_own); + self + } + + pub fn copy_own(&self) -> Option<&bool> { + self.copy_own.as_ref() + } + + pub fn reset_copy_own(&mut self) { + self.copy_own = None; + } + + pub fn set_copy_packages(&mut self, copy_packages: String) { + self.copy_packages = Some(copy_packages); + } + + pub fn with_copy_packages(mut self, copy_packages: String) -> RepositoryRequestPatch { + self.copy_packages = Some(copy_packages); + self + } + + pub fn copy_packages(&self) -> Option<&String> { + self.copy_packages.as_ref() + } + + pub fn reset_copy_packages(&mut self) { + self.copy_packages = None; + } + + pub fn set_default_privilege(&mut self, default_privilege: String) { + self.default_privilege = Some(default_privilege); + } + + pub fn with_default_privilege(mut self, default_privilege: String) -> RepositoryRequestPatch { + self.default_privilege = Some(default_privilege); + self + } + + pub fn default_privilege(&self) -> Option<&String> { + self.default_privilege.as_ref() + } + + pub fn reset_default_privilege(&mut self) { + self.default_privilege = None; + } + + pub fn set_delete_own(&mut self, delete_own: bool) { + self.delete_own = Some(delete_own); + } + + pub fn with_delete_own(mut self, delete_own: bool) -> RepositoryRequestPatch { + self.delete_own = Some(delete_own); + self + } + + pub fn delete_own(&self) -> Option<&bool> { + self.delete_own.as_ref() + } + + pub fn reset_delete_own(&mut self) { + self.delete_own = None; + } + + pub fn set_delete_packages(&mut self, delete_packages: String) { + self.delete_packages = Some(delete_packages); + } + + pub fn with_delete_packages(mut self, delete_packages: String) -> RepositoryRequestPatch { + self.delete_packages = Some(delete_packages); + self + } + + pub fn delete_packages(&self) -> Option<&String> { + self.delete_packages.as_ref() + } + + pub fn reset_delete_packages(&mut self) { + self.delete_packages = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RepositoryRequestPatch { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_distributes(&mut self, distributes: Vec) { + self.distributes = Some(distributes); + } + + pub fn with_distributes(mut self, distributes: Vec) -> RepositoryRequestPatch { + self.distributes = Some(distributes); + self + } + + pub fn distributes(&self) -> Option<&Vec> { + self.distributes.as_ref() + } + + pub fn reset_distributes(&mut self) { + self.distributes = None; + } + + pub fn set_docker_refresh_tokens_enabled(&mut self, docker_refresh_tokens_enabled: bool) { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + } + + pub fn with_docker_refresh_tokens_enabled(mut self, docker_refresh_tokens_enabled: bool) -> RepositoryRequestPatch { + self.docker_refresh_tokens_enabled = Some(docker_refresh_tokens_enabled); + self + } + + pub fn docker_refresh_tokens_enabled(&self) -> Option<&bool> { + self.docker_refresh_tokens_enabled.as_ref() + } + + pub fn reset_docker_refresh_tokens_enabled(&mut self) { + self.docker_refresh_tokens_enabled = None; + } + + pub fn set_enforce_eula(&mut self, enforce_eula: bool) { + self.enforce_eula = Some(enforce_eula); + } + + pub fn with_enforce_eula(mut self, enforce_eula: bool) -> RepositoryRequestPatch { + self.enforce_eula = Some(enforce_eula); + self + } + + pub fn enforce_eula(&self) -> Option<&bool> { + self.enforce_eula.as_ref() + } + + pub fn reset_enforce_eula(&mut self) { + self.enforce_eula = None; + } + + pub fn set_index_files(&mut self, index_files: bool) { + self.index_files = Some(index_files); + } + + pub fn with_index_files(mut self, index_files: bool) -> RepositoryRequestPatch { + self.index_files = Some(index_files); + self + } + + pub fn index_files(&self) -> Option<&bool> { + self.index_files.as_ref() + } + + pub fn reset_index_files(&mut self) { + self.index_files = None; + } + + pub fn set_manage_entitlements_privilege(&mut self, manage_entitlements_privilege: String) { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + } + + pub fn with_manage_entitlements_privilege(mut self, manage_entitlements_privilege: String) -> RepositoryRequestPatch { + self.manage_entitlements_privilege = Some(manage_entitlements_privilege); + self + } + + pub fn manage_entitlements_privilege(&self) -> Option<&String> { + self.manage_entitlements_privilege.as_ref() + } + + pub fn reset_manage_entitlements_privilege(&mut self) { + self.manage_entitlements_privilege = None; + } + + pub fn set_move_own(&mut self, move_own: bool) { + self.move_own = Some(move_own); + } + + pub fn with_move_own(mut self, move_own: bool) -> RepositoryRequestPatch { + self.move_own = Some(move_own); + self + } + + pub fn move_own(&self) -> Option<&bool> { + self.move_own.as_ref() + } + + pub fn reset_move_own(&mut self) { + self.move_own = None; + } + + pub fn set_move_packages(&mut self, move_packages: String) { + self.move_packages = Some(move_packages); + } + + pub fn with_move_packages(mut self, move_packages: String) -> RepositoryRequestPatch { + self.move_packages = Some(move_packages); + self + } + + pub fn move_packages(&self) -> Option<&String> { + self.move_packages.as_ref() + } + + pub fn reset_move_packages(&mut self) { + self.move_packages = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RepositoryRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_nuget_native_signing_enabled(&mut self, nuget_native_signing_enabled: bool) { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + } + + pub fn with_nuget_native_signing_enabled(mut self, nuget_native_signing_enabled: bool) -> RepositoryRequestPatch { + self.nuget_native_signing_enabled = Some(nuget_native_signing_enabled); + self + } + + pub fn nuget_native_signing_enabled(&self) -> Option<&bool> { + self.nuget_native_signing_enabled.as_ref() + } + + pub fn reset_nuget_native_signing_enabled(&mut self) { + self.nuget_native_signing_enabled = None; + } + + pub fn set_open_source_license(&mut self, open_source_license: String) { + self.open_source_license = Some(open_source_license); + } + + pub fn with_open_source_license(mut self, open_source_license: String) -> RepositoryRequestPatch { + self.open_source_license = Some(open_source_license); + self + } + + pub fn open_source_license(&self) -> Option<&String> { + self.open_source_license.as_ref() + } + + pub fn reset_open_source_license(&mut self) { + self.open_source_license = None; + } + + pub fn set_open_source_project_url(&mut self, open_source_project_url: String) { + self.open_source_project_url = Some(open_source_project_url); + } + + pub fn with_open_source_project_url(mut self, open_source_project_url: String) -> RepositoryRequestPatch { + self.open_source_project_url = Some(open_source_project_url); + self + } + + pub fn open_source_project_url(&self) -> Option<&String> { + self.open_source_project_url.as_ref() + } + + pub fn reset_open_source_project_url(&mut self) { + self.open_source_project_url = None; + } + + pub fn set_proxy_npmjs(&mut self, proxy_npmjs: bool) { + self.proxy_npmjs = Some(proxy_npmjs); + } + + pub fn with_proxy_npmjs(mut self, proxy_npmjs: bool) -> RepositoryRequestPatch { + self.proxy_npmjs = Some(proxy_npmjs); + self + } + + pub fn proxy_npmjs(&self) -> Option<&bool> { + self.proxy_npmjs.as_ref() + } + + pub fn reset_proxy_npmjs(&mut self) { + self.proxy_npmjs = None; + } + + pub fn set_proxy_pypi(&mut self, proxy_pypi: bool) { + self.proxy_pypi = Some(proxy_pypi); + } + + pub fn with_proxy_pypi(mut self, proxy_pypi: bool) -> RepositoryRequestPatch { + self.proxy_pypi = Some(proxy_pypi); + self + } + + pub fn proxy_pypi(&self) -> Option<&bool> { + self.proxy_pypi.as_ref() + } + + pub fn reset_proxy_pypi(&mut self) { + self.proxy_pypi = None; + } + + pub fn set_raw_package_index_enabled(&mut self, raw_package_index_enabled: bool) { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + } + + pub fn with_raw_package_index_enabled(mut self, raw_package_index_enabled: bool) -> RepositoryRequestPatch { + self.raw_package_index_enabled = Some(raw_package_index_enabled); + self + } + + pub fn raw_package_index_enabled(&self) -> Option<&bool> { + self.raw_package_index_enabled.as_ref() + } + + pub fn reset_raw_package_index_enabled(&mut self) { + self.raw_package_index_enabled = None; + } + + pub fn set_raw_package_index_signatures_enabled(&mut self, raw_package_index_signatures_enabled: bool) { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + } + + pub fn with_raw_package_index_signatures_enabled(mut self, raw_package_index_signatures_enabled: bool) -> RepositoryRequestPatch { + self.raw_package_index_signatures_enabled = Some(raw_package_index_signatures_enabled); + self + } + + pub fn raw_package_index_signatures_enabled(&self) -> Option<&bool> { + self.raw_package_index_signatures_enabled.as_ref() + } + + pub fn reset_raw_package_index_signatures_enabled(&mut self) { + self.raw_package_index_signatures_enabled = None; + } + + pub fn set_replace_packages(&mut self, replace_packages: String) { + self.replace_packages = Some(replace_packages); + } + + pub fn with_replace_packages(mut self, replace_packages: String) -> RepositoryRequestPatch { + self.replace_packages = Some(replace_packages); + self + } + + pub fn replace_packages(&self) -> Option<&String> { + self.replace_packages.as_ref() + } + + pub fn reset_replace_packages(&mut self) { + self.replace_packages = None; + } + + pub fn set_replace_packages_by_default(&mut self, replace_packages_by_default: bool) { + self.replace_packages_by_default = Some(replace_packages_by_default); + } + + pub fn with_replace_packages_by_default(mut self, replace_packages_by_default: bool) -> RepositoryRequestPatch { + self.replace_packages_by_default = Some(replace_packages_by_default); + self + } + + pub fn replace_packages_by_default(&self) -> Option<&bool> { + self.replace_packages_by_default.as_ref() + } + + pub fn reset_replace_packages_by_default(&mut self) { + self.replace_packages_by_default = None; + } + + pub fn set_repository_type_str(&mut self, repository_type_str: String) { + self.repository_type_str = Some(repository_type_str); + } + + pub fn with_repository_type_str(mut self, repository_type_str: String) -> RepositoryRequestPatch { + self.repository_type_str = Some(repository_type_str); + self + } + + pub fn repository_type_str(&self) -> Option<&String> { + self.repository_type_str.as_ref() + } + + pub fn reset_repository_type_str(&mut self) { + self.repository_type_str = None; + } + + pub fn set_resync_own(&mut self, resync_own: bool) { + self.resync_own = Some(resync_own); + } + + pub fn with_resync_own(mut self, resync_own: bool) -> RepositoryRequestPatch { + self.resync_own = Some(resync_own); + self + } + + pub fn resync_own(&self) -> Option<&bool> { + self.resync_own.as_ref() + } + + pub fn reset_resync_own(&mut self) { + self.resync_own = None; + } + + pub fn set_resync_packages(&mut self, resync_packages: String) { + self.resync_packages = Some(resync_packages); + } + + pub fn with_resync_packages(mut self, resync_packages: String) -> RepositoryRequestPatch { + self.resync_packages = Some(resync_packages); + self + } + + pub fn resync_packages(&self) -> Option<&String> { + self.resync_packages.as_ref() + } + + pub fn reset_resync_packages(&mut self) { + self.resync_packages = None; + } + + pub fn set_scan_own(&mut self, scan_own: bool) { + self.scan_own = Some(scan_own); + } + + pub fn with_scan_own(mut self, scan_own: bool) -> RepositoryRequestPatch { + self.scan_own = Some(scan_own); + self + } + + pub fn scan_own(&self) -> Option<&bool> { + self.scan_own.as_ref() + } + + pub fn reset_scan_own(&mut self) { + self.scan_own = None; + } + + pub fn set_scan_packages(&mut self, scan_packages: String) { + self.scan_packages = Some(scan_packages); + } + + pub fn with_scan_packages(mut self, scan_packages: String) -> RepositoryRequestPatch { + self.scan_packages = Some(scan_packages); + self + } + + pub fn scan_packages(&self) -> Option<&String> { + self.scan_packages.as_ref() + } + + pub fn reset_scan_packages(&mut self) { + self.scan_packages = None; + } + + pub fn set_show_setup_all(&mut self, show_setup_all: bool) { + self.show_setup_all = Some(show_setup_all); + } + + pub fn with_show_setup_all(mut self, show_setup_all: bool) -> RepositoryRequestPatch { + self.show_setup_all = Some(show_setup_all); + self + } + + pub fn show_setup_all(&self) -> Option<&bool> { + self.show_setup_all.as_ref() + } + + pub fn reset_show_setup_all(&mut self) { + self.show_setup_all = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> RepositoryRequestPatch { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_strict_npm_validation(&mut self, strict_npm_validation: bool) { + self.strict_npm_validation = Some(strict_npm_validation); + } + + pub fn with_strict_npm_validation(mut self, strict_npm_validation: bool) -> RepositoryRequestPatch { + self.strict_npm_validation = Some(strict_npm_validation); + self + } + + pub fn strict_npm_validation(&self) -> Option<&bool> { + self.strict_npm_validation.as_ref() + } + + pub fn reset_strict_npm_validation(&mut self) { + self.strict_npm_validation = None; + } + + pub fn set_tag_pre_releases_as_latest(&mut self, tag_pre_releases_as_latest: bool) { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + } + + pub fn with_tag_pre_releases_as_latest(mut self, tag_pre_releases_as_latest: bool) -> RepositoryRequestPatch { + self.tag_pre_releases_as_latest = Some(tag_pre_releases_as_latest); + self + } + + pub fn tag_pre_releases_as_latest(&self) -> Option<&bool> { + self.tag_pre_releases_as_latest.as_ref() + } + + pub fn reset_tag_pre_releases_as_latest(&mut self) { + self.tag_pre_releases_as_latest = None; + } + + pub fn set_use_debian_labels(&mut self, use_debian_labels: bool) { + self.use_debian_labels = Some(use_debian_labels); + } + + pub fn with_use_debian_labels(mut self, use_debian_labels: bool) -> RepositoryRequestPatch { + self.use_debian_labels = Some(use_debian_labels); + self + } + + pub fn use_debian_labels(&self) -> Option<&bool> { + self.use_debian_labels.as_ref() + } + + pub fn reset_use_debian_labels(&mut self) { + self.use_debian_labels = None; + } + + pub fn set_use_default_cargo_upstream(&mut self, use_default_cargo_upstream: bool) { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + } + + pub fn with_use_default_cargo_upstream(mut self, use_default_cargo_upstream: bool) -> RepositoryRequestPatch { + self.use_default_cargo_upstream = Some(use_default_cargo_upstream); + self + } + + pub fn use_default_cargo_upstream(&self) -> Option<&bool> { + self.use_default_cargo_upstream.as_ref() + } + + pub fn reset_use_default_cargo_upstream(&mut self) { + self.use_default_cargo_upstream = None; + } + + pub fn set_use_entitlements_privilege(&mut self, use_entitlements_privilege: String) { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + } + + pub fn with_use_entitlements_privilege(mut self, use_entitlements_privilege: String) -> RepositoryRequestPatch { + self.use_entitlements_privilege = Some(use_entitlements_privilege); + self + } + + pub fn use_entitlements_privilege(&self) -> Option<&String> { + self.use_entitlements_privilege.as_ref() + } + + pub fn reset_use_entitlements_privilege(&mut self) { + self.use_entitlements_privilege = None; + } + + pub fn set_use_noarch_packages(&mut self, use_noarch_packages: bool) { + self.use_noarch_packages = Some(use_noarch_packages); + } + + pub fn with_use_noarch_packages(mut self, use_noarch_packages: bool) -> RepositoryRequestPatch { + self.use_noarch_packages = Some(use_noarch_packages); + self + } + + pub fn use_noarch_packages(&self) -> Option<&bool> { + self.use_noarch_packages.as_ref() + } + + pub fn reset_use_noarch_packages(&mut self) { + self.use_noarch_packages = None; + } + + pub fn set_use_source_packages(&mut self, use_source_packages: bool) { + self.use_source_packages = Some(use_source_packages); + } + + pub fn with_use_source_packages(mut self, use_source_packages: bool) -> RepositoryRequestPatch { + self.use_source_packages = Some(use_source_packages); + self + } + + pub fn use_source_packages(&self) -> Option<&bool> { + self.use_source_packages.as_ref() + } + + pub fn reset_use_source_packages(&mut self) { + self.use_source_packages = None; + } + + pub fn set_use_vulnerability_scanning(&mut self, use_vulnerability_scanning: bool) { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + } + + pub fn with_use_vulnerability_scanning(mut self, use_vulnerability_scanning: bool) -> RepositoryRequestPatch { + self.use_vulnerability_scanning = Some(use_vulnerability_scanning); + self + } + + pub fn use_vulnerability_scanning(&self) -> Option<&bool> { + self.use_vulnerability_scanning.as_ref() + } + + pub fn reset_use_vulnerability_scanning(&mut self) { + self.use_vulnerability_scanning = None; + } + + pub fn set_user_entitlements_enabled(&mut self, user_entitlements_enabled: bool) { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + } + + pub fn with_user_entitlements_enabled(mut self, user_entitlements_enabled: bool) -> RepositoryRequestPatch { + self.user_entitlements_enabled = Some(user_entitlements_enabled); + self + } + + pub fn user_entitlements_enabled(&self) -> Option<&bool> { + self.user_entitlements_enabled.as_ref() + } + + pub fn reset_user_entitlements_enabled(&mut self) { + self.user_entitlements_enabled = None; + } + + pub fn set_view_statistics(&mut self, view_statistics: String) { + self.view_statistics = Some(view_statistics); + } + + pub fn with_view_statistics(mut self, view_statistics: String) -> RepositoryRequestPatch { + self.view_statistics = Some(view_statistics); + self + } + + pub fn view_statistics(&self) -> Option<&String> { + self.view_statistics.as_ref() + } + + pub fn reset_view_statistics(&mut self) { + self.view_statistics = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_retention_rules.rs b/bindings/rust/src/src/models/repository_retention_rules.rs new file mode 100644 index 00000000..8c6ab243 --- /dev/null +++ b/bindings/rust/src/src/models/repository_retention_rules.rs @@ -0,0 +1,175 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryRetentionRules { + /// The maximum X number of packages to retain. + #[serde(rename = "retention_count_limit")] + retention_count_limit: Option, + /// The X number of days of packages to retain. + #[serde(rename = "retention_days_limit")] + retention_days_limit: Option, + /// If checked, the retention lifecycle rules will be activated for the repository. Any packages that don't match will be deleted automatically, and the rest are retained. + #[serde(rename = "retention_enabled")] + retention_enabled: Option, + /// If checked, retention will apply to packages by package formats rather than across all package formats.For example, when retaining by a limit of 1 and you upload PythonPkg 1.0 and RubyPkg 1.0, no packages are deleted because they are different formats. + #[serde(rename = "retention_group_by_format")] + retention_group_by_format: Option, + /// If checked, retention will apply to groups of packages by name rather than all packages.
For example, when retaining by a limit of 1 and you upload PkgA 1.0, PkgB 1.0 and PkgB 1.1; only PkgB 1.0 is deleted because there are two (2) PkgBs and one (1) PkgA. + #[serde(rename = "retention_group_by_name")] + retention_group_by_name: Option, + /// If checked, retention will apply to packages by package type (e.g. by binary, by source, etc.), rather than across all package types for one or more formats.
For example, when retaining by a limit of 1 and you upload DebPackage 1.0 and DebSourcePackage 1.0, no packages are deleted because they are different package types, binary and source respectively. + #[serde(rename = "retention_group_by_package_type")] + retention_group_by_package_type: Option, + /// The maximum X total size (in bytes) of packages to retain. + #[serde(rename = "retention_size_limit")] + retention_size_limit: Option +} + +impl RepositoryRetentionRules { + pub fn new() -> RepositoryRetentionRules { + RepositoryRetentionRules { + retention_count_limit: None, + retention_days_limit: None, + retention_enabled: None, + retention_group_by_format: None, + retention_group_by_name: None, + retention_group_by_package_type: None, + retention_size_limit: None + } + } + + pub fn set_retention_count_limit(&mut self, retention_count_limit: i32) { + self.retention_count_limit = Some(retention_count_limit); + } + + pub fn with_retention_count_limit(mut self, retention_count_limit: i32) -> RepositoryRetentionRules { + self.retention_count_limit = Some(retention_count_limit); + self + } + + pub fn retention_count_limit(&self) -> Option<&i32> { + self.retention_count_limit.as_ref() + } + + pub fn reset_retention_count_limit(&mut self) { + self.retention_count_limit = None; + } + + pub fn set_retention_days_limit(&mut self, retention_days_limit: i32) { + self.retention_days_limit = Some(retention_days_limit); + } + + pub fn with_retention_days_limit(mut self, retention_days_limit: i32) -> RepositoryRetentionRules { + self.retention_days_limit = Some(retention_days_limit); + self + } + + pub fn retention_days_limit(&self) -> Option<&i32> { + self.retention_days_limit.as_ref() + } + + pub fn reset_retention_days_limit(&mut self) { + self.retention_days_limit = None; + } + + pub fn set_retention_enabled(&mut self, retention_enabled: bool) { + self.retention_enabled = Some(retention_enabled); + } + + pub fn with_retention_enabled(mut self, retention_enabled: bool) -> RepositoryRetentionRules { + self.retention_enabled = Some(retention_enabled); + self + } + + pub fn retention_enabled(&self) -> Option<&bool> { + self.retention_enabled.as_ref() + } + + pub fn reset_retention_enabled(&mut self) { + self.retention_enabled = None; + } + + pub fn set_retention_group_by_format(&mut self, retention_group_by_format: bool) { + self.retention_group_by_format = Some(retention_group_by_format); + } + + pub fn with_retention_group_by_format(mut self, retention_group_by_format: bool) -> RepositoryRetentionRules { + self.retention_group_by_format = Some(retention_group_by_format); + self + } + + pub fn retention_group_by_format(&self) -> Option<&bool> { + self.retention_group_by_format.as_ref() + } + + pub fn reset_retention_group_by_format(&mut self) { + self.retention_group_by_format = None; + } + + pub fn set_retention_group_by_name(&mut self, retention_group_by_name: bool) { + self.retention_group_by_name = Some(retention_group_by_name); + } + + pub fn with_retention_group_by_name(mut self, retention_group_by_name: bool) -> RepositoryRetentionRules { + self.retention_group_by_name = Some(retention_group_by_name); + self + } + + pub fn retention_group_by_name(&self) -> Option<&bool> { + self.retention_group_by_name.as_ref() + } + + pub fn reset_retention_group_by_name(&mut self) { + self.retention_group_by_name = None; + } + + pub fn set_retention_group_by_package_type(&mut self, retention_group_by_package_type: bool) { + self.retention_group_by_package_type = Some(retention_group_by_package_type); + } + + pub fn with_retention_group_by_package_type(mut self, retention_group_by_package_type: bool) -> RepositoryRetentionRules { + self.retention_group_by_package_type = Some(retention_group_by_package_type); + self + } + + pub fn retention_group_by_package_type(&self) -> Option<&bool> { + self.retention_group_by_package_type.as_ref() + } + + pub fn reset_retention_group_by_package_type(&mut self) { + self.retention_group_by_package_type = None; + } + + pub fn set_retention_size_limit(&mut self, retention_size_limit: i32) { + self.retention_size_limit = Some(retention_size_limit); + } + + pub fn with_retention_size_limit(mut self, retention_size_limit: i32) -> RepositoryRetentionRules { + self.retention_size_limit = Some(retention_size_limit); + self + } + + pub fn retention_size_limit(&self) -> Option<&i32> { + self.retention_size_limit.as_ref() + } + + pub fn reset_retention_size_limit(&mut self) { + self.retention_size_limit = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_retention_rules_request_patch.rs b/bindings/rust/src/src/models/repository_retention_rules_request_patch.rs new file mode 100644 index 00000000..e7a11c06 --- /dev/null +++ b/bindings/rust/src/src/models/repository_retention_rules_request_patch.rs @@ -0,0 +1,175 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryRetentionRulesRequestPatch { + /// The maximum X number of packages to retain. + #[serde(rename = "retention_count_limit")] + retention_count_limit: Option, + /// The X number of days of packages to retain. + #[serde(rename = "retention_days_limit")] + retention_days_limit: Option, + /// If checked, the retention lifecycle rules will be activated for the repository. Any packages that don't match will be deleted automatically, and the rest are retained. + #[serde(rename = "retention_enabled")] + retention_enabled: Option, + /// If checked, retention will apply to packages by package formats rather than across all package formats.For example, when retaining by a limit of 1 and you upload PythonPkg 1.0 and RubyPkg 1.0, no packages are deleted because they are different formats. + #[serde(rename = "retention_group_by_format")] + retention_group_by_format: Option, + /// If checked, retention will apply to groups of packages by name rather than all packages.
For example, when retaining by a limit of 1 and you upload PkgA 1.0, PkgB 1.0 and PkgB 1.1; only PkgB 1.0 is deleted because there are two (2) PkgBs and one (1) PkgA. + #[serde(rename = "retention_group_by_name")] + retention_group_by_name: Option, + /// If checked, retention will apply to packages by package type (e.g. by binary, by source, etc.), rather than across all package types for one or more formats.
For example, when retaining by a limit of 1 and you upload DebPackage 1.0 and DebSourcePackage 1.0, no packages are deleted because they are different package types, binary and source respectively. + #[serde(rename = "retention_group_by_package_type")] + retention_group_by_package_type: Option, + /// The maximum X total size (in bytes) of packages to retain. + #[serde(rename = "retention_size_limit")] + retention_size_limit: Option +} + +impl RepositoryRetentionRulesRequestPatch { + pub fn new() -> RepositoryRetentionRulesRequestPatch { + RepositoryRetentionRulesRequestPatch { + retention_count_limit: None, + retention_days_limit: None, + retention_enabled: None, + retention_group_by_format: None, + retention_group_by_name: None, + retention_group_by_package_type: None, + retention_size_limit: None + } + } + + pub fn set_retention_count_limit(&mut self, retention_count_limit: i32) { + self.retention_count_limit = Some(retention_count_limit); + } + + pub fn with_retention_count_limit(mut self, retention_count_limit: i32) -> RepositoryRetentionRulesRequestPatch { + self.retention_count_limit = Some(retention_count_limit); + self + } + + pub fn retention_count_limit(&self) -> Option<&i32> { + self.retention_count_limit.as_ref() + } + + pub fn reset_retention_count_limit(&mut self) { + self.retention_count_limit = None; + } + + pub fn set_retention_days_limit(&mut self, retention_days_limit: i32) { + self.retention_days_limit = Some(retention_days_limit); + } + + pub fn with_retention_days_limit(mut self, retention_days_limit: i32) -> RepositoryRetentionRulesRequestPatch { + self.retention_days_limit = Some(retention_days_limit); + self + } + + pub fn retention_days_limit(&self) -> Option<&i32> { + self.retention_days_limit.as_ref() + } + + pub fn reset_retention_days_limit(&mut self) { + self.retention_days_limit = None; + } + + pub fn set_retention_enabled(&mut self, retention_enabled: bool) { + self.retention_enabled = Some(retention_enabled); + } + + pub fn with_retention_enabled(mut self, retention_enabled: bool) -> RepositoryRetentionRulesRequestPatch { + self.retention_enabled = Some(retention_enabled); + self + } + + pub fn retention_enabled(&self) -> Option<&bool> { + self.retention_enabled.as_ref() + } + + pub fn reset_retention_enabled(&mut self) { + self.retention_enabled = None; + } + + pub fn set_retention_group_by_format(&mut self, retention_group_by_format: bool) { + self.retention_group_by_format = Some(retention_group_by_format); + } + + pub fn with_retention_group_by_format(mut self, retention_group_by_format: bool) -> RepositoryRetentionRulesRequestPatch { + self.retention_group_by_format = Some(retention_group_by_format); + self + } + + pub fn retention_group_by_format(&self) -> Option<&bool> { + self.retention_group_by_format.as_ref() + } + + pub fn reset_retention_group_by_format(&mut self) { + self.retention_group_by_format = None; + } + + pub fn set_retention_group_by_name(&mut self, retention_group_by_name: bool) { + self.retention_group_by_name = Some(retention_group_by_name); + } + + pub fn with_retention_group_by_name(mut self, retention_group_by_name: bool) -> RepositoryRetentionRulesRequestPatch { + self.retention_group_by_name = Some(retention_group_by_name); + self + } + + pub fn retention_group_by_name(&self) -> Option<&bool> { + self.retention_group_by_name.as_ref() + } + + pub fn reset_retention_group_by_name(&mut self) { + self.retention_group_by_name = None; + } + + pub fn set_retention_group_by_package_type(&mut self, retention_group_by_package_type: bool) { + self.retention_group_by_package_type = Some(retention_group_by_package_type); + } + + pub fn with_retention_group_by_package_type(mut self, retention_group_by_package_type: bool) -> RepositoryRetentionRulesRequestPatch { + self.retention_group_by_package_type = Some(retention_group_by_package_type); + self + } + + pub fn retention_group_by_package_type(&self) -> Option<&bool> { + self.retention_group_by_package_type.as_ref() + } + + pub fn reset_retention_group_by_package_type(&mut self) { + self.retention_group_by_package_type = None; + } + + pub fn set_retention_size_limit(&mut self, retention_size_limit: i32) { + self.retention_size_limit = Some(retention_size_limit); + } + + pub fn with_retention_size_limit(mut self, retention_size_limit: i32) -> RepositoryRetentionRulesRequestPatch { + self.retention_size_limit = Some(retention_size_limit); + self + } + + pub fn retention_size_limit(&self) -> Option<&i32> { + self.retention_size_limit.as_ref() + } + + pub fn reset_retention_size_limit(&mut self) { + self.retention_size_limit = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_rsa_key.rs b/bindings/rust/src/src/models/repository_rsa_key.rs new file mode 100644 index 00000000..d0c08119 --- /dev/null +++ b/bindings/rust/src/src/models/repository_rsa_key.rs @@ -0,0 +1,173 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryRsaKey { + /// If selected this is the active key for this repository. + #[serde(rename = "active")] + active: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// If selected this is the default key for this repository. + #[serde(rename = "default")] + default: Option, + /// The long identifier used by RSA for this key. + #[serde(rename = "fingerprint")] + fingerprint: Option, + #[serde(rename = "fingerprint_short")] + fingerprint_short: Option, + /// The public key given to repository users. + #[serde(rename = "public_key")] + public_key: Option, + /// The SSH fingerprint used by RSA for this key. + #[serde(rename = "ssh_fingerprint")] + ssh_fingerprint: Option +} + +impl RepositoryRsaKey { + pub fn new() -> RepositoryRsaKey { + RepositoryRsaKey { + active: None, + created_at: None, + default: None, + fingerprint: None, + fingerprint_short: None, + public_key: None, + ssh_fingerprint: None + } + } + + pub fn set_active(&mut self, active: bool) { + self.active = Some(active); + } + + pub fn with_active(mut self, active: bool) -> RepositoryRsaKey { + self.active = Some(active); + self + } + + pub fn active(&self) -> Option<&bool> { + self.active.as_ref() + } + + pub fn reset_active(&mut self) { + self.active = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryRsaKey { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryRsaKey { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_fingerprint(&mut self, fingerprint: String) { + self.fingerprint = Some(fingerprint); + } + + pub fn with_fingerprint(mut self, fingerprint: String) -> RepositoryRsaKey { + self.fingerprint = Some(fingerprint); + self + } + + pub fn fingerprint(&self) -> Option<&String> { + self.fingerprint.as_ref() + } + + pub fn reset_fingerprint(&mut self) { + self.fingerprint = None; + } + + pub fn set_fingerprint_short(&mut self, fingerprint_short: String) { + self.fingerprint_short = Some(fingerprint_short); + } + + pub fn with_fingerprint_short(mut self, fingerprint_short: String) -> RepositoryRsaKey { + self.fingerprint_short = Some(fingerprint_short); + self + } + + pub fn fingerprint_short(&self) -> Option<&String> { + self.fingerprint_short.as_ref() + } + + pub fn reset_fingerprint_short(&mut self) { + self.fingerprint_short = None; + } + + pub fn set_public_key(&mut self, public_key: String) { + self.public_key = Some(public_key); + } + + pub fn with_public_key(mut self, public_key: String) -> RepositoryRsaKey { + self.public_key = Some(public_key); + self + } + + pub fn public_key(&self) -> Option<&String> { + self.public_key.as_ref() + } + + pub fn reset_public_key(&mut self) { + self.public_key = None; + } + + pub fn set_ssh_fingerprint(&mut self, ssh_fingerprint: String) { + self.ssh_fingerprint = Some(ssh_fingerprint); + } + + pub fn with_ssh_fingerprint(mut self, ssh_fingerprint: String) -> RepositoryRsaKey { + self.ssh_fingerprint = Some(ssh_fingerprint); + self + } + + pub fn ssh_fingerprint(&self) -> Option<&String> { + self.ssh_fingerprint.as_ref() + } + + pub fn reset_ssh_fingerprint(&mut self) { + self.ssh_fingerprint = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_rsa_key_create.rs b/bindings/rust/src/src/models/repository_rsa_key_create.rs new file mode 100644 index 00000000..3c097745 --- /dev/null +++ b/bindings/rust/src/src/models/repository_rsa_key_create.rs @@ -0,0 +1,67 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryRsaKeyCreate { + /// The RSA passphrase used for signing. + #[serde(rename = "rsa_passphrase")] + rsa_passphrase: Option, + /// The RSA private key. + #[serde(rename = "rsa_private_key")] + rsa_private_key: String +} + +impl RepositoryRsaKeyCreate { + pub fn new(rsa_private_key: String) -> RepositoryRsaKeyCreate { + RepositoryRsaKeyCreate { + rsa_passphrase: None, + rsa_private_key: rsa_private_key + } + } + + pub fn set_rsa_passphrase(&mut self, rsa_passphrase: String) { + self.rsa_passphrase = Some(rsa_passphrase); + } + + pub fn with_rsa_passphrase(mut self, rsa_passphrase: String) -> RepositoryRsaKeyCreate { + self.rsa_passphrase = Some(rsa_passphrase); + self + } + + pub fn rsa_passphrase(&self) -> Option<&String> { + self.rsa_passphrase.as_ref() + } + + pub fn reset_rsa_passphrase(&mut self) { + self.rsa_passphrase = None; + } + + pub fn set_rsa_private_key(&mut self, rsa_private_key: String) { + self.rsa_private_key = rsa_private_key; + } + + pub fn with_rsa_private_key(mut self, rsa_private_key: String) -> RepositoryRsaKeyCreate { + self.rsa_private_key = rsa_private_key; + self + } + + pub fn rsa_private_key(&self) -> &String { + &self.rsa_private_key + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_token.rs b/bindings/rust/src/src/models/repository_token.rs new file mode 100644 index 00000000..1d066d3f --- /dev/null +++ b/bindings/rust/src/src/models/repository_token.rs @@ -0,0 +1,820 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryToken { + #[serde(rename = "clients")] + clients: Option, + /// The datetime the token was updated at. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "created_by")] + created_by: Option, + #[serde(rename = "created_by_url")] + created_by_url: Option, + /// If selected this is the default token for this repository. + #[serde(rename = "default")] + default: Option, + #[serde(rename = "disable_url")] + disable_url: Option, + #[serde(rename = "downloads")] + downloads: Option, + #[serde(rename = "enable_url")] + enable_url: Option, + #[serde(rename = "eula_accepted")] + eula_accepted: Option<::models::Eula>, + /// The datetime the EULA was accepted at. + #[serde(rename = "eula_accepted_at")] + eula_accepted_at: Option, + #[serde(rename = "eula_accepted_from")] + eula_accepted_from: Option, + /// If checked, a EULA acceptance is required for this token. + #[serde(rename = "eula_required")] + eula_required: Option, + #[serde(rename = "has_limits")] + has_limits: Option, + /// Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified an entitlement within a repository. + #[serde(rename = "identifier")] + identifier: Option, + /// If enabled, the token will allow downloads based on configured restrictions (if any). + #[serde(rename = "is_active")] + is_active: Option, + #[serde(rename = "is_limited")] + is_limited: Option, + /// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_bandwidth")] + limit_bandwidth: Option, + #[serde(rename = "limit_bandwidth_unit")] + limit_bandwidth_unit: Option, + /// The starting date/time the token is allowed to be used from. + #[serde(rename = "limit_date_range_from")] + limit_date_range_from: Option, + /// The ending date/time the token is allowed to be used until. + #[serde(rename = "limit_date_range_to")] + limit_date_range_to: Option, + /// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_clients")] + limit_num_clients: Option, + /// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_downloads")] + limit_num_downloads: Option, + /// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. + #[serde(rename = "limit_package_query")] + limit_package_query: Option, + /// THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. + #[serde(rename = "limit_path_query")] + limit_path_query: Option, + #[serde(rename = "metadata")] + metadata: Option, + #[serde(rename = "name")] + name: String, + #[serde(rename = "refresh_url")] + refresh_url: Option, + #[serde(rename = "reset_url")] + reset_url: Option, + /// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. + #[serde(rename = "scheduled_reset_at")] + scheduled_reset_at: Option, + #[serde(rename = "scheduled_reset_period")] + scheduled_reset_period: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "token")] + token: Option, + /// The datetime the token was updated at. + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "updated_by")] + updated_by: Option, + #[serde(rename = "updated_by_url")] + updated_by_url: Option, + #[serde(rename = "usage")] + usage: Option, + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_url")] + user_url: Option +} + +impl RepositoryToken { + pub fn new(name: String) -> RepositoryToken { + RepositoryToken { + clients: None, + created_at: None, + created_by: None, + created_by_url: None, + default: None, + disable_url: None, + downloads: None, + enable_url: None, + eula_accepted: None, + eula_accepted_at: None, + eula_accepted_from: None, + eula_required: None, + has_limits: None, + identifier: None, + is_active: None, + is_limited: None, + limit_bandwidth: None, + limit_bandwidth_unit: None, + limit_date_range_from: None, + limit_date_range_to: None, + limit_num_clients: None, + limit_num_downloads: None, + limit_package_query: None, + limit_path_query: None, + metadata: None, + name: name, + refresh_url: None, + reset_url: None, + scheduled_reset_at: None, + scheduled_reset_period: None, + self_url: None, + slug_perm: None, + token: None, + updated_at: None, + updated_by: None, + updated_by_url: None, + usage: None, + user: None, + user_url: None + } + } + + pub fn set_clients(&mut self, clients: i32) { + self.clients = Some(clients); + } + + pub fn with_clients(mut self, clients: i32) -> RepositoryToken { + self.clients = Some(clients); + self + } + + pub fn clients(&self) -> Option<&i32> { + self.clients.as_ref() + } + + pub fn reset_clients(&mut self) { + self.clients = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryToken { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_created_by(&mut self, created_by: String) { + self.created_by = Some(created_by); + } + + pub fn with_created_by(mut self, created_by: String) -> RepositoryToken { + self.created_by = Some(created_by); + self + } + + pub fn created_by(&self) -> Option<&String> { + self.created_by.as_ref() + } + + pub fn reset_created_by(&mut self) { + self.created_by = None; + } + + pub fn set_created_by_url(&mut self, created_by_url: String) { + self.created_by_url = Some(created_by_url); + } + + pub fn with_created_by_url(mut self, created_by_url: String) -> RepositoryToken { + self.created_by_url = Some(created_by_url); + self + } + + pub fn created_by_url(&self) -> Option<&String> { + self.created_by_url.as_ref() + } + + pub fn reset_created_by_url(&mut self) { + self.created_by_url = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryToken { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_disable_url(&mut self, disable_url: String) { + self.disable_url = Some(disable_url); + } + + pub fn with_disable_url(mut self, disable_url: String) -> RepositoryToken { + self.disable_url = Some(disable_url); + self + } + + pub fn disable_url(&self) -> Option<&String> { + self.disable_url.as_ref() + } + + pub fn reset_disable_url(&mut self) { + self.disable_url = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> RepositoryToken { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_enable_url(&mut self, enable_url: String) { + self.enable_url = Some(enable_url); + } + + pub fn with_enable_url(mut self, enable_url: String) -> RepositoryToken { + self.enable_url = Some(enable_url); + self + } + + pub fn enable_url(&self) -> Option<&String> { + self.enable_url.as_ref() + } + + pub fn reset_enable_url(&mut self) { + self.enable_url = None; + } + + pub fn set_eula_accepted(&mut self, eula_accepted: ::models::Eula) { + self.eula_accepted = Some(eula_accepted); + } + + pub fn with_eula_accepted(mut self, eula_accepted: ::models::Eula) -> RepositoryToken { + self.eula_accepted = Some(eula_accepted); + self + } + + pub fn eula_accepted(&self) -> Option<&::models::Eula> { + self.eula_accepted.as_ref() + } + + pub fn reset_eula_accepted(&mut self) { + self.eula_accepted = None; + } + + pub fn set_eula_accepted_at(&mut self, eula_accepted_at: String) { + self.eula_accepted_at = Some(eula_accepted_at); + } + + pub fn with_eula_accepted_at(mut self, eula_accepted_at: String) -> RepositoryToken { + self.eula_accepted_at = Some(eula_accepted_at); + self + } + + pub fn eula_accepted_at(&self) -> Option<&String> { + self.eula_accepted_at.as_ref() + } + + pub fn reset_eula_accepted_at(&mut self) { + self.eula_accepted_at = None; + } + + pub fn set_eula_accepted_from(&mut self, eula_accepted_from: String) { + self.eula_accepted_from = Some(eula_accepted_from); + } + + pub fn with_eula_accepted_from(mut self, eula_accepted_from: String) -> RepositoryToken { + self.eula_accepted_from = Some(eula_accepted_from); + self + } + + pub fn eula_accepted_from(&self) -> Option<&String> { + self.eula_accepted_from.as_ref() + } + + pub fn reset_eula_accepted_from(&mut self) { + self.eula_accepted_from = None; + } + + pub fn set_eula_required(&mut self, eula_required: bool) { + self.eula_required = Some(eula_required); + } + + pub fn with_eula_required(mut self, eula_required: bool) -> RepositoryToken { + self.eula_required = Some(eula_required); + self + } + + pub fn eula_required(&self) -> Option<&bool> { + self.eula_required.as_ref() + } + + pub fn reset_eula_required(&mut self) { + self.eula_required = None; + } + + pub fn set_has_limits(&mut self, has_limits: bool) { + self.has_limits = Some(has_limits); + } + + pub fn with_has_limits(mut self, has_limits: bool) -> RepositoryToken { + self.has_limits = Some(has_limits); + self + } + + pub fn has_limits(&self) -> Option<&bool> { + self.has_limits.as_ref() + } + + pub fn reset_has_limits(&mut self) { + self.has_limits = None; + } + + pub fn set_identifier(&mut self, identifier: i32) { + self.identifier = Some(identifier); + } + + pub fn with_identifier(mut self, identifier: i32) -> RepositoryToken { + self.identifier = Some(identifier); + self + } + + pub fn identifier(&self) -> Option<&i32> { + self.identifier.as_ref() + } + + pub fn reset_identifier(&mut self) { + self.identifier = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryToken { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_is_limited(&mut self, is_limited: bool) { + self.is_limited = Some(is_limited); + } + + pub fn with_is_limited(mut self, is_limited: bool) -> RepositoryToken { + self.is_limited = Some(is_limited); + self + } + + pub fn is_limited(&self) -> Option<&bool> { + self.is_limited.as_ref() + } + + pub fn reset_is_limited(&mut self) { + self.is_limited = None; + } + + pub fn set_limit_bandwidth(&mut self, limit_bandwidth: i32) { + self.limit_bandwidth = Some(limit_bandwidth); + } + + pub fn with_limit_bandwidth(mut self, limit_bandwidth: i32) -> RepositoryToken { + self.limit_bandwidth = Some(limit_bandwidth); + self + } + + pub fn limit_bandwidth(&self) -> Option<&i32> { + self.limit_bandwidth.as_ref() + } + + pub fn reset_limit_bandwidth(&mut self) { + self.limit_bandwidth = None; + } + + pub fn set_limit_bandwidth_unit(&mut self, limit_bandwidth_unit: String) { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + } + + pub fn with_limit_bandwidth_unit(mut self, limit_bandwidth_unit: String) -> RepositoryToken { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + self + } + + pub fn limit_bandwidth_unit(&self) -> Option<&String> { + self.limit_bandwidth_unit.as_ref() + } + + pub fn reset_limit_bandwidth_unit(&mut self) { + self.limit_bandwidth_unit = None; + } + + pub fn set_limit_date_range_from(&mut self, limit_date_range_from: String) { + self.limit_date_range_from = Some(limit_date_range_from); + } + + pub fn with_limit_date_range_from(mut self, limit_date_range_from: String) -> RepositoryToken { + self.limit_date_range_from = Some(limit_date_range_from); + self + } + + pub fn limit_date_range_from(&self) -> Option<&String> { + self.limit_date_range_from.as_ref() + } + + pub fn reset_limit_date_range_from(&mut self) { + self.limit_date_range_from = None; + } + + pub fn set_limit_date_range_to(&mut self, limit_date_range_to: String) { + self.limit_date_range_to = Some(limit_date_range_to); + } + + pub fn with_limit_date_range_to(mut self, limit_date_range_to: String) -> RepositoryToken { + self.limit_date_range_to = Some(limit_date_range_to); + self + } + + pub fn limit_date_range_to(&self) -> Option<&String> { + self.limit_date_range_to.as_ref() + } + + pub fn reset_limit_date_range_to(&mut self) { + self.limit_date_range_to = None; + } + + pub fn set_limit_num_clients(&mut self, limit_num_clients: i32) { + self.limit_num_clients = Some(limit_num_clients); + } + + pub fn with_limit_num_clients(mut self, limit_num_clients: i32) -> RepositoryToken { + self.limit_num_clients = Some(limit_num_clients); + self + } + + pub fn limit_num_clients(&self) -> Option<&i32> { + self.limit_num_clients.as_ref() + } + + pub fn reset_limit_num_clients(&mut self) { + self.limit_num_clients = None; + } + + pub fn set_limit_num_downloads(&mut self, limit_num_downloads: i32) { + self.limit_num_downloads = Some(limit_num_downloads); + } + + pub fn with_limit_num_downloads(mut self, limit_num_downloads: i32) -> RepositoryToken { + self.limit_num_downloads = Some(limit_num_downloads); + self + } + + pub fn limit_num_downloads(&self) -> Option<&i32> { + self.limit_num_downloads.as_ref() + } + + pub fn reset_limit_num_downloads(&mut self) { + self.limit_num_downloads = None; + } + + pub fn set_limit_package_query(&mut self, limit_package_query: String) { + self.limit_package_query = Some(limit_package_query); + } + + pub fn with_limit_package_query(mut self, limit_package_query: String) -> RepositoryToken { + self.limit_package_query = Some(limit_package_query); + self + } + + pub fn limit_package_query(&self) -> Option<&String> { + self.limit_package_query.as_ref() + } + + pub fn reset_limit_package_query(&mut self) { + self.limit_package_query = None; + } + + pub fn set_limit_path_query(&mut self, limit_path_query: String) { + self.limit_path_query = Some(limit_path_query); + } + + pub fn with_limit_path_query(mut self, limit_path_query: String) -> RepositoryToken { + self.limit_path_query = Some(limit_path_query); + self + } + + pub fn limit_path_query(&self) -> Option<&String> { + self.limit_path_query.as_ref() + } + + pub fn reset_limit_path_query(&mut self) { + self.limit_path_query = None; + } + + pub fn set_metadata(&mut self, metadata: Value) { + self.metadata = Some(metadata); + } + + pub fn with_metadata(mut self, metadata: Value) -> RepositoryToken { + self.metadata = Some(metadata); + self + } + + pub fn metadata(&self) -> Option<&Value> { + self.metadata.as_ref() + } + + pub fn reset_metadata(&mut self) { + self.metadata = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RepositoryToken { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_refresh_url(&mut self, refresh_url: String) { + self.refresh_url = Some(refresh_url); + } + + pub fn with_refresh_url(mut self, refresh_url: String) -> RepositoryToken { + self.refresh_url = Some(refresh_url); + self + } + + pub fn refresh_url(&self) -> Option<&String> { + self.refresh_url.as_ref() + } + + pub fn reset_refresh_url(&mut self) { + self.refresh_url = None; + } + + pub fn set_reset_url(&mut self, reset_url: String) { + self.reset_url = Some(reset_url); + } + + pub fn with_reset_url(mut self, reset_url: String) -> RepositoryToken { + self.reset_url = Some(reset_url); + self + } + + pub fn reset_url(&self) -> Option<&String> { + self.reset_url.as_ref() + } + + pub fn reset_reset_url(&mut self) { + self.reset_url = None; + } + + pub fn set_scheduled_reset_at(&mut self, scheduled_reset_at: String) { + self.scheduled_reset_at = Some(scheduled_reset_at); + } + + pub fn with_scheduled_reset_at(mut self, scheduled_reset_at: String) -> RepositoryToken { + self.scheduled_reset_at = Some(scheduled_reset_at); + self + } + + pub fn scheduled_reset_at(&self) -> Option<&String> { + self.scheduled_reset_at.as_ref() + } + + pub fn reset_scheduled_reset_at(&mut self) { + self.scheduled_reset_at = None; + } + + pub fn set_scheduled_reset_period(&mut self, scheduled_reset_period: String) { + self.scheduled_reset_period = Some(scheduled_reset_period); + } + + pub fn with_scheduled_reset_period(mut self, scheduled_reset_period: String) -> RepositoryToken { + self.scheduled_reset_period = Some(scheduled_reset_period); + self + } + + pub fn scheduled_reset_period(&self) -> Option<&String> { + self.scheduled_reset_period.as_ref() + } + + pub fn reset_scheduled_reset_period(&mut self) { + self.scheduled_reset_period = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RepositoryToken { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RepositoryToken { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_token(&mut self, token: String) { + self.token = Some(token); + } + + pub fn with_token(mut self, token: String) -> RepositoryToken { + self.token = Some(token); + self + } + + pub fn token(&self) -> Option<&String> { + self.token.as_ref() + } + + pub fn reset_token(&mut self) { + self.token = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> RepositoryToken { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_updated_by(&mut self, updated_by: String) { + self.updated_by = Some(updated_by); + } + + pub fn with_updated_by(mut self, updated_by: String) -> RepositoryToken { + self.updated_by = Some(updated_by); + self + } + + pub fn updated_by(&self) -> Option<&String> { + self.updated_by.as_ref() + } + + pub fn reset_updated_by(&mut self) { + self.updated_by = None; + } + + pub fn set_updated_by_url(&mut self, updated_by_url: String) { + self.updated_by_url = Some(updated_by_url); + } + + pub fn with_updated_by_url(mut self, updated_by_url: String) -> RepositoryToken { + self.updated_by_url = Some(updated_by_url); + self + } + + pub fn updated_by_url(&self) -> Option<&String> { + self.updated_by_url.as_ref() + } + + pub fn reset_updated_by_url(&mut self) { + self.updated_by_url = None; + } + + pub fn set_usage(&mut self, usage: String) { + self.usage = Some(usage); + } + + pub fn with_usage(mut self, usage: String) -> RepositoryToken { + self.usage = Some(usage); + self + } + + pub fn usage(&self) -> Option<&String> { + self.usage.as_ref() + } + + pub fn reset_usage(&mut self) { + self.usage = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> RepositoryToken { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> RepositoryToken { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_action.rs b/bindings/rust/src/src/models/repository_token_action.rs new file mode 100644 index 00000000..33ad36e1 --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_action.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenAction { +} + +impl RepositoryTokenAction { + pub fn new() -> RepositoryTokenAction { + RepositoryTokenAction { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_refresh.rs b/bindings/rust/src/src/models/repository_token_refresh.rs new file mode 100644 index 00000000..86d23af1 --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_refresh.rs @@ -0,0 +1,823 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenRefresh { + #[serde(rename = "clients")] + clients: Option, + /// The datetime the token was updated at. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "created_by")] + created_by: Option, + #[serde(rename = "created_by_url")] + created_by_url: Option, + /// If selected this is the default token for this repository. + #[serde(rename = "default")] + default: Option, + #[serde(rename = "disable_url")] + disable_url: Option, + #[serde(rename = "downloads")] + downloads: Option, + #[serde(rename = "enable_url")] + enable_url: Option, + #[serde(rename = "eula_accepted")] + eula_accepted: Option<::models::Eula>, + /// The datetime the EULA was accepted at. + #[serde(rename = "eula_accepted_at")] + eula_accepted_at: Option, + #[serde(rename = "eula_accepted_from")] + eula_accepted_from: Option, + /// If checked, a EULA acceptance is required for this token. + #[serde(rename = "eula_required")] + eula_required: Option, + #[serde(rename = "has_limits")] + has_limits: Option, + /// Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified an entitlement within a repository. + #[serde(rename = "identifier")] + identifier: Option, + /// If enabled, the token will allow downloads based on configured restrictions (if any). + #[serde(rename = "is_active")] + is_active: Option, + #[serde(rename = "is_limited")] + is_limited: Option, + /// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_bandwidth")] + limit_bandwidth: Option, + #[serde(rename = "limit_bandwidth_unit")] + limit_bandwidth_unit: Option, + /// The starting date/time the token is allowed to be used from. + #[serde(rename = "limit_date_range_from")] + limit_date_range_from: Option, + /// The ending date/time the token is allowed to be used until. + #[serde(rename = "limit_date_range_to")] + limit_date_range_to: Option, + /// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_clients")] + limit_num_clients: Option, + /// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_downloads")] + limit_num_downloads: Option, + /// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. + #[serde(rename = "limit_package_query")] + limit_package_query: Option, + /// THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. + #[serde(rename = "limit_path_query")] + limit_path_query: Option, + #[serde(rename = "metadata")] + metadata: Option, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "refresh_url")] + refresh_url: Option, + #[serde(rename = "reset_url")] + reset_url: Option, + /// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. + #[serde(rename = "scheduled_reset_at")] + scheduled_reset_at: Option, + #[serde(rename = "scheduled_reset_period")] + scheduled_reset_period: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "token")] + token: Option, + /// The datetime the token was updated at. + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "updated_by")] + updated_by: Option, + #[serde(rename = "updated_by_url")] + updated_by_url: Option, + #[serde(rename = "usage")] + usage: Option, + #[serde(rename = "user")] + user: Option, + #[serde(rename = "user_url")] + user_url: Option +} + +impl RepositoryTokenRefresh { + pub fn new() -> RepositoryTokenRefresh { + RepositoryTokenRefresh { + clients: None, + created_at: None, + created_by: None, + created_by_url: None, + default: None, + disable_url: None, + downloads: None, + enable_url: None, + eula_accepted: None, + eula_accepted_at: None, + eula_accepted_from: None, + eula_required: None, + has_limits: None, + identifier: None, + is_active: None, + is_limited: None, + limit_bandwidth: None, + limit_bandwidth_unit: None, + limit_date_range_from: None, + limit_date_range_to: None, + limit_num_clients: None, + limit_num_downloads: None, + limit_package_query: None, + limit_path_query: None, + metadata: None, + name: None, + refresh_url: None, + reset_url: None, + scheduled_reset_at: None, + scheduled_reset_period: None, + self_url: None, + slug_perm: None, + token: None, + updated_at: None, + updated_by: None, + updated_by_url: None, + usage: None, + user: None, + user_url: None + } + } + + pub fn set_clients(&mut self, clients: i32) { + self.clients = Some(clients); + } + + pub fn with_clients(mut self, clients: i32) -> RepositoryTokenRefresh { + self.clients = Some(clients); + self + } + + pub fn clients(&self) -> Option<&i32> { + self.clients.as_ref() + } + + pub fn reset_clients(&mut self) { + self.clients = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryTokenRefresh { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_created_by(&mut self, created_by: String) { + self.created_by = Some(created_by); + } + + pub fn with_created_by(mut self, created_by: String) -> RepositoryTokenRefresh { + self.created_by = Some(created_by); + self + } + + pub fn created_by(&self) -> Option<&String> { + self.created_by.as_ref() + } + + pub fn reset_created_by(&mut self) { + self.created_by = None; + } + + pub fn set_created_by_url(&mut self, created_by_url: String) { + self.created_by_url = Some(created_by_url); + } + + pub fn with_created_by_url(mut self, created_by_url: String) -> RepositoryTokenRefresh { + self.created_by_url = Some(created_by_url); + self + } + + pub fn created_by_url(&self) -> Option<&String> { + self.created_by_url.as_ref() + } + + pub fn reset_created_by_url(&mut self) { + self.created_by_url = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryTokenRefresh { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_disable_url(&mut self, disable_url: String) { + self.disable_url = Some(disable_url); + } + + pub fn with_disable_url(mut self, disable_url: String) -> RepositoryTokenRefresh { + self.disable_url = Some(disable_url); + self + } + + pub fn disable_url(&self) -> Option<&String> { + self.disable_url.as_ref() + } + + pub fn reset_disable_url(&mut self) { + self.disable_url = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> RepositoryTokenRefresh { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_enable_url(&mut self, enable_url: String) { + self.enable_url = Some(enable_url); + } + + pub fn with_enable_url(mut self, enable_url: String) -> RepositoryTokenRefresh { + self.enable_url = Some(enable_url); + self + } + + pub fn enable_url(&self) -> Option<&String> { + self.enable_url.as_ref() + } + + pub fn reset_enable_url(&mut self) { + self.enable_url = None; + } + + pub fn set_eula_accepted(&mut self, eula_accepted: ::models::Eula) { + self.eula_accepted = Some(eula_accepted); + } + + pub fn with_eula_accepted(mut self, eula_accepted: ::models::Eula) -> RepositoryTokenRefresh { + self.eula_accepted = Some(eula_accepted); + self + } + + pub fn eula_accepted(&self) -> Option<&::models::Eula> { + self.eula_accepted.as_ref() + } + + pub fn reset_eula_accepted(&mut self) { + self.eula_accepted = None; + } + + pub fn set_eula_accepted_at(&mut self, eula_accepted_at: String) { + self.eula_accepted_at = Some(eula_accepted_at); + } + + pub fn with_eula_accepted_at(mut self, eula_accepted_at: String) -> RepositoryTokenRefresh { + self.eula_accepted_at = Some(eula_accepted_at); + self + } + + pub fn eula_accepted_at(&self) -> Option<&String> { + self.eula_accepted_at.as_ref() + } + + pub fn reset_eula_accepted_at(&mut self) { + self.eula_accepted_at = None; + } + + pub fn set_eula_accepted_from(&mut self, eula_accepted_from: String) { + self.eula_accepted_from = Some(eula_accepted_from); + } + + pub fn with_eula_accepted_from(mut self, eula_accepted_from: String) -> RepositoryTokenRefresh { + self.eula_accepted_from = Some(eula_accepted_from); + self + } + + pub fn eula_accepted_from(&self) -> Option<&String> { + self.eula_accepted_from.as_ref() + } + + pub fn reset_eula_accepted_from(&mut self) { + self.eula_accepted_from = None; + } + + pub fn set_eula_required(&mut self, eula_required: bool) { + self.eula_required = Some(eula_required); + } + + pub fn with_eula_required(mut self, eula_required: bool) -> RepositoryTokenRefresh { + self.eula_required = Some(eula_required); + self + } + + pub fn eula_required(&self) -> Option<&bool> { + self.eula_required.as_ref() + } + + pub fn reset_eula_required(&mut self) { + self.eula_required = None; + } + + pub fn set_has_limits(&mut self, has_limits: bool) { + self.has_limits = Some(has_limits); + } + + pub fn with_has_limits(mut self, has_limits: bool) -> RepositoryTokenRefresh { + self.has_limits = Some(has_limits); + self + } + + pub fn has_limits(&self) -> Option<&bool> { + self.has_limits.as_ref() + } + + pub fn reset_has_limits(&mut self) { + self.has_limits = None; + } + + pub fn set_identifier(&mut self, identifier: i32) { + self.identifier = Some(identifier); + } + + pub fn with_identifier(mut self, identifier: i32) -> RepositoryTokenRefresh { + self.identifier = Some(identifier); + self + } + + pub fn identifier(&self) -> Option<&i32> { + self.identifier.as_ref() + } + + pub fn reset_identifier(&mut self) { + self.identifier = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryTokenRefresh { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_is_limited(&mut self, is_limited: bool) { + self.is_limited = Some(is_limited); + } + + pub fn with_is_limited(mut self, is_limited: bool) -> RepositoryTokenRefresh { + self.is_limited = Some(is_limited); + self + } + + pub fn is_limited(&self) -> Option<&bool> { + self.is_limited.as_ref() + } + + pub fn reset_is_limited(&mut self) { + self.is_limited = None; + } + + pub fn set_limit_bandwidth(&mut self, limit_bandwidth: i32) { + self.limit_bandwidth = Some(limit_bandwidth); + } + + pub fn with_limit_bandwidth(mut self, limit_bandwidth: i32) -> RepositoryTokenRefresh { + self.limit_bandwidth = Some(limit_bandwidth); + self + } + + pub fn limit_bandwidth(&self) -> Option<&i32> { + self.limit_bandwidth.as_ref() + } + + pub fn reset_limit_bandwidth(&mut self) { + self.limit_bandwidth = None; + } + + pub fn set_limit_bandwidth_unit(&mut self, limit_bandwidth_unit: String) { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + } + + pub fn with_limit_bandwidth_unit(mut self, limit_bandwidth_unit: String) -> RepositoryTokenRefresh { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + self + } + + pub fn limit_bandwidth_unit(&self) -> Option<&String> { + self.limit_bandwidth_unit.as_ref() + } + + pub fn reset_limit_bandwidth_unit(&mut self) { + self.limit_bandwidth_unit = None; + } + + pub fn set_limit_date_range_from(&mut self, limit_date_range_from: String) { + self.limit_date_range_from = Some(limit_date_range_from); + } + + pub fn with_limit_date_range_from(mut self, limit_date_range_from: String) -> RepositoryTokenRefresh { + self.limit_date_range_from = Some(limit_date_range_from); + self + } + + pub fn limit_date_range_from(&self) -> Option<&String> { + self.limit_date_range_from.as_ref() + } + + pub fn reset_limit_date_range_from(&mut self) { + self.limit_date_range_from = None; + } + + pub fn set_limit_date_range_to(&mut self, limit_date_range_to: String) { + self.limit_date_range_to = Some(limit_date_range_to); + } + + pub fn with_limit_date_range_to(mut self, limit_date_range_to: String) -> RepositoryTokenRefresh { + self.limit_date_range_to = Some(limit_date_range_to); + self + } + + pub fn limit_date_range_to(&self) -> Option<&String> { + self.limit_date_range_to.as_ref() + } + + pub fn reset_limit_date_range_to(&mut self) { + self.limit_date_range_to = None; + } + + pub fn set_limit_num_clients(&mut self, limit_num_clients: i32) { + self.limit_num_clients = Some(limit_num_clients); + } + + pub fn with_limit_num_clients(mut self, limit_num_clients: i32) -> RepositoryTokenRefresh { + self.limit_num_clients = Some(limit_num_clients); + self + } + + pub fn limit_num_clients(&self) -> Option<&i32> { + self.limit_num_clients.as_ref() + } + + pub fn reset_limit_num_clients(&mut self) { + self.limit_num_clients = None; + } + + pub fn set_limit_num_downloads(&mut self, limit_num_downloads: i32) { + self.limit_num_downloads = Some(limit_num_downloads); + } + + pub fn with_limit_num_downloads(mut self, limit_num_downloads: i32) -> RepositoryTokenRefresh { + self.limit_num_downloads = Some(limit_num_downloads); + self + } + + pub fn limit_num_downloads(&self) -> Option<&i32> { + self.limit_num_downloads.as_ref() + } + + pub fn reset_limit_num_downloads(&mut self) { + self.limit_num_downloads = None; + } + + pub fn set_limit_package_query(&mut self, limit_package_query: String) { + self.limit_package_query = Some(limit_package_query); + } + + pub fn with_limit_package_query(mut self, limit_package_query: String) -> RepositoryTokenRefresh { + self.limit_package_query = Some(limit_package_query); + self + } + + pub fn limit_package_query(&self) -> Option<&String> { + self.limit_package_query.as_ref() + } + + pub fn reset_limit_package_query(&mut self) { + self.limit_package_query = None; + } + + pub fn set_limit_path_query(&mut self, limit_path_query: String) { + self.limit_path_query = Some(limit_path_query); + } + + pub fn with_limit_path_query(mut self, limit_path_query: String) -> RepositoryTokenRefresh { + self.limit_path_query = Some(limit_path_query); + self + } + + pub fn limit_path_query(&self) -> Option<&String> { + self.limit_path_query.as_ref() + } + + pub fn reset_limit_path_query(&mut self) { + self.limit_path_query = None; + } + + pub fn set_metadata(&mut self, metadata: Value) { + self.metadata = Some(metadata); + } + + pub fn with_metadata(mut self, metadata: Value) -> RepositoryTokenRefresh { + self.metadata = Some(metadata); + self + } + + pub fn metadata(&self) -> Option<&Value> { + self.metadata.as_ref() + } + + pub fn reset_metadata(&mut self) { + self.metadata = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RepositoryTokenRefresh { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_refresh_url(&mut self, refresh_url: String) { + self.refresh_url = Some(refresh_url); + } + + pub fn with_refresh_url(mut self, refresh_url: String) -> RepositoryTokenRefresh { + self.refresh_url = Some(refresh_url); + self + } + + pub fn refresh_url(&self) -> Option<&String> { + self.refresh_url.as_ref() + } + + pub fn reset_refresh_url(&mut self) { + self.refresh_url = None; + } + + pub fn set_reset_url(&mut self, reset_url: String) { + self.reset_url = Some(reset_url); + } + + pub fn with_reset_url(mut self, reset_url: String) -> RepositoryTokenRefresh { + self.reset_url = Some(reset_url); + self + } + + pub fn reset_url(&self) -> Option<&String> { + self.reset_url.as_ref() + } + + pub fn reset_reset_url(&mut self) { + self.reset_url = None; + } + + pub fn set_scheduled_reset_at(&mut self, scheduled_reset_at: String) { + self.scheduled_reset_at = Some(scheduled_reset_at); + } + + pub fn with_scheduled_reset_at(mut self, scheduled_reset_at: String) -> RepositoryTokenRefresh { + self.scheduled_reset_at = Some(scheduled_reset_at); + self + } + + pub fn scheduled_reset_at(&self) -> Option<&String> { + self.scheduled_reset_at.as_ref() + } + + pub fn reset_scheduled_reset_at(&mut self) { + self.scheduled_reset_at = None; + } + + pub fn set_scheduled_reset_period(&mut self, scheduled_reset_period: String) { + self.scheduled_reset_period = Some(scheduled_reset_period); + } + + pub fn with_scheduled_reset_period(mut self, scheduled_reset_period: String) -> RepositoryTokenRefresh { + self.scheduled_reset_period = Some(scheduled_reset_period); + self + } + + pub fn scheduled_reset_period(&self) -> Option<&String> { + self.scheduled_reset_period.as_ref() + } + + pub fn reset_scheduled_reset_period(&mut self) { + self.scheduled_reset_period = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RepositoryTokenRefresh { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RepositoryTokenRefresh { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_token(&mut self, token: String) { + self.token = Some(token); + } + + pub fn with_token(mut self, token: String) -> RepositoryTokenRefresh { + self.token = Some(token); + self + } + + pub fn token(&self) -> Option<&String> { + self.token.as_ref() + } + + pub fn reset_token(&mut self) { + self.token = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> RepositoryTokenRefresh { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_updated_by(&mut self, updated_by: String) { + self.updated_by = Some(updated_by); + } + + pub fn with_updated_by(mut self, updated_by: String) -> RepositoryTokenRefresh { + self.updated_by = Some(updated_by); + self + } + + pub fn updated_by(&self) -> Option<&String> { + self.updated_by.as_ref() + } + + pub fn reset_updated_by(&mut self) { + self.updated_by = None; + } + + pub fn set_updated_by_url(&mut self, updated_by_url: String) { + self.updated_by_url = Some(updated_by_url); + } + + pub fn with_updated_by_url(mut self, updated_by_url: String) -> RepositoryTokenRefresh { + self.updated_by_url = Some(updated_by_url); + self + } + + pub fn updated_by_url(&self) -> Option<&String> { + self.updated_by_url.as_ref() + } + + pub fn reset_updated_by_url(&mut self) { + self.updated_by_url = None; + } + + pub fn set_usage(&mut self, usage: String) { + self.usage = Some(usage); + } + + pub fn with_usage(mut self, usage: String) -> RepositoryTokenRefresh { + self.usage = Some(usage); + self + } + + pub fn usage(&self) -> Option<&String> { + self.usage.as_ref() + } + + pub fn reset_usage(&mut self) { + self.usage = None; + } + + pub fn set_user(&mut self, user: String) { + self.user = Some(user); + } + + pub fn with_user(mut self, user: String) -> RepositoryTokenRefresh { + self.user = Some(user); + self + } + + pub fn user(&self) -> Option<&String> { + self.user.as_ref() + } + + pub fn reset_user(&mut self) { + self.user = None; + } + + pub fn set_user_url(&mut self, user_url: String) { + self.user_url = Some(user_url); + } + + pub fn with_user_url(mut self, user_url: String) -> RepositoryTokenRefresh { + self.user_url = Some(user_url); + self + } + + pub fn user_url(&self) -> Option<&String> { + self.user_url.as_ref() + } + + pub fn reset_user_url(&mut self) { + self.user_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_refresh_request.rs b/bindings/rust/src/src/models/repository_token_refresh_request.rs new file mode 100644 index 00000000..454b490a --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_refresh_request.rs @@ -0,0 +1,318 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenRefreshRequest { + /// If checked, a EULA acceptance is required for this token. + #[serde(rename = "eula_required")] + eula_required: Option, + /// If enabled, the token will allow downloads based on configured restrictions (if any). + #[serde(rename = "is_active")] + is_active: Option, + /// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_bandwidth")] + limit_bandwidth: Option, + #[serde(rename = "limit_bandwidth_unit")] + limit_bandwidth_unit: Option, + /// The starting date/time the token is allowed to be used from. + #[serde(rename = "limit_date_range_from")] + limit_date_range_from: Option, + /// The ending date/time the token is allowed to be used until. + #[serde(rename = "limit_date_range_to")] + limit_date_range_to: Option, + /// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_clients")] + limit_num_clients: Option, + /// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_downloads")] + limit_num_downloads: Option, + /// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. + #[serde(rename = "limit_package_query")] + limit_package_query: Option, + /// THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. + #[serde(rename = "limit_path_query")] + limit_path_query: Option, + #[serde(rename = "metadata")] + metadata: Option, + /// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. + #[serde(rename = "scheduled_reset_at")] + scheduled_reset_at: Option, + #[serde(rename = "scheduled_reset_period")] + scheduled_reset_period: Option, + #[serde(rename = "token")] + token: Option +} + +impl RepositoryTokenRefreshRequest { + pub fn new() -> RepositoryTokenRefreshRequest { + RepositoryTokenRefreshRequest { + eula_required: None, + is_active: None, + limit_bandwidth: None, + limit_bandwidth_unit: None, + limit_date_range_from: None, + limit_date_range_to: None, + limit_num_clients: None, + limit_num_downloads: None, + limit_package_query: None, + limit_path_query: None, + metadata: None, + scheduled_reset_at: None, + scheduled_reset_period: None, + token: None + } + } + + pub fn set_eula_required(&mut self, eula_required: bool) { + self.eula_required = Some(eula_required); + } + + pub fn with_eula_required(mut self, eula_required: bool) -> RepositoryTokenRefreshRequest { + self.eula_required = Some(eula_required); + self + } + + pub fn eula_required(&self) -> Option<&bool> { + self.eula_required.as_ref() + } + + pub fn reset_eula_required(&mut self) { + self.eula_required = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryTokenRefreshRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_limit_bandwidth(&mut self, limit_bandwidth: i32) { + self.limit_bandwidth = Some(limit_bandwidth); + } + + pub fn with_limit_bandwidth(mut self, limit_bandwidth: i32) -> RepositoryTokenRefreshRequest { + self.limit_bandwidth = Some(limit_bandwidth); + self + } + + pub fn limit_bandwidth(&self) -> Option<&i32> { + self.limit_bandwidth.as_ref() + } + + pub fn reset_limit_bandwidth(&mut self) { + self.limit_bandwidth = None; + } + + pub fn set_limit_bandwidth_unit(&mut self, limit_bandwidth_unit: String) { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + } + + pub fn with_limit_bandwidth_unit(mut self, limit_bandwidth_unit: String) -> RepositoryTokenRefreshRequest { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + self + } + + pub fn limit_bandwidth_unit(&self) -> Option<&String> { + self.limit_bandwidth_unit.as_ref() + } + + pub fn reset_limit_bandwidth_unit(&mut self) { + self.limit_bandwidth_unit = None; + } + + pub fn set_limit_date_range_from(&mut self, limit_date_range_from: String) { + self.limit_date_range_from = Some(limit_date_range_from); + } + + pub fn with_limit_date_range_from(mut self, limit_date_range_from: String) -> RepositoryTokenRefreshRequest { + self.limit_date_range_from = Some(limit_date_range_from); + self + } + + pub fn limit_date_range_from(&self) -> Option<&String> { + self.limit_date_range_from.as_ref() + } + + pub fn reset_limit_date_range_from(&mut self) { + self.limit_date_range_from = None; + } + + pub fn set_limit_date_range_to(&mut self, limit_date_range_to: String) { + self.limit_date_range_to = Some(limit_date_range_to); + } + + pub fn with_limit_date_range_to(mut self, limit_date_range_to: String) -> RepositoryTokenRefreshRequest { + self.limit_date_range_to = Some(limit_date_range_to); + self + } + + pub fn limit_date_range_to(&self) -> Option<&String> { + self.limit_date_range_to.as_ref() + } + + pub fn reset_limit_date_range_to(&mut self) { + self.limit_date_range_to = None; + } + + pub fn set_limit_num_clients(&mut self, limit_num_clients: i32) { + self.limit_num_clients = Some(limit_num_clients); + } + + pub fn with_limit_num_clients(mut self, limit_num_clients: i32) -> RepositoryTokenRefreshRequest { + self.limit_num_clients = Some(limit_num_clients); + self + } + + pub fn limit_num_clients(&self) -> Option<&i32> { + self.limit_num_clients.as_ref() + } + + pub fn reset_limit_num_clients(&mut self) { + self.limit_num_clients = None; + } + + pub fn set_limit_num_downloads(&mut self, limit_num_downloads: i32) { + self.limit_num_downloads = Some(limit_num_downloads); + } + + pub fn with_limit_num_downloads(mut self, limit_num_downloads: i32) -> RepositoryTokenRefreshRequest { + self.limit_num_downloads = Some(limit_num_downloads); + self + } + + pub fn limit_num_downloads(&self) -> Option<&i32> { + self.limit_num_downloads.as_ref() + } + + pub fn reset_limit_num_downloads(&mut self) { + self.limit_num_downloads = None; + } + + pub fn set_limit_package_query(&mut self, limit_package_query: String) { + self.limit_package_query = Some(limit_package_query); + } + + pub fn with_limit_package_query(mut self, limit_package_query: String) -> RepositoryTokenRefreshRequest { + self.limit_package_query = Some(limit_package_query); + self + } + + pub fn limit_package_query(&self) -> Option<&String> { + self.limit_package_query.as_ref() + } + + pub fn reset_limit_package_query(&mut self) { + self.limit_package_query = None; + } + + pub fn set_limit_path_query(&mut self, limit_path_query: String) { + self.limit_path_query = Some(limit_path_query); + } + + pub fn with_limit_path_query(mut self, limit_path_query: String) -> RepositoryTokenRefreshRequest { + self.limit_path_query = Some(limit_path_query); + self + } + + pub fn limit_path_query(&self) -> Option<&String> { + self.limit_path_query.as_ref() + } + + pub fn reset_limit_path_query(&mut self) { + self.limit_path_query = None; + } + + pub fn set_metadata(&mut self, metadata: Value) { + self.metadata = Some(metadata); + } + + pub fn with_metadata(mut self, metadata: Value) -> RepositoryTokenRefreshRequest { + self.metadata = Some(metadata); + self + } + + pub fn metadata(&self) -> Option<&Value> { + self.metadata.as_ref() + } + + pub fn reset_metadata(&mut self) { + self.metadata = None; + } + + pub fn set_scheduled_reset_at(&mut self, scheduled_reset_at: String) { + self.scheduled_reset_at = Some(scheduled_reset_at); + } + + pub fn with_scheduled_reset_at(mut self, scheduled_reset_at: String) -> RepositoryTokenRefreshRequest { + self.scheduled_reset_at = Some(scheduled_reset_at); + self + } + + pub fn scheduled_reset_at(&self) -> Option<&String> { + self.scheduled_reset_at.as_ref() + } + + pub fn reset_scheduled_reset_at(&mut self) { + self.scheduled_reset_at = None; + } + + pub fn set_scheduled_reset_period(&mut self, scheduled_reset_period: String) { + self.scheduled_reset_period = Some(scheduled_reset_period); + } + + pub fn with_scheduled_reset_period(mut self, scheduled_reset_period: String) -> RepositoryTokenRefreshRequest { + self.scheduled_reset_period = Some(scheduled_reset_period); + self + } + + pub fn scheduled_reset_period(&self) -> Option<&String> { + self.scheduled_reset_period.as_ref() + } + + pub fn reset_scheduled_reset_period(&mut self) { + self.scheduled_reset_period = None; + } + + pub fn set_token(&mut self, token: String) { + self.token = Some(token); + } + + pub fn with_token(mut self, token: String) -> RepositoryTokenRefreshRequest { + self.token = Some(token); + self + } + + pub fn token(&self) -> Option<&String> { + self.token.as_ref() + } + + pub fn reset_token(&mut self) { + self.token = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_request.rs b/bindings/rust/src/src/models/repository_token_request.rs new file mode 100644 index 00000000..4017c147 --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_request.rs @@ -0,0 +1,335 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenRequest { + /// If checked, a EULA acceptance is required for this token. + #[serde(rename = "eula_required")] + eula_required: Option, + /// If enabled, the token will allow downloads based on configured restrictions (if any). + #[serde(rename = "is_active")] + is_active: Option, + /// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_bandwidth")] + limit_bandwidth: Option, + #[serde(rename = "limit_bandwidth_unit")] + limit_bandwidth_unit: Option, + /// The starting date/time the token is allowed to be used from. + #[serde(rename = "limit_date_range_from")] + limit_date_range_from: Option, + /// The ending date/time the token is allowed to be used until. + #[serde(rename = "limit_date_range_to")] + limit_date_range_to: Option, + /// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_clients")] + limit_num_clients: Option, + /// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_downloads")] + limit_num_downloads: Option, + /// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. + #[serde(rename = "limit_package_query")] + limit_package_query: Option, + /// THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. + #[serde(rename = "limit_path_query")] + limit_path_query: Option, + #[serde(rename = "metadata")] + metadata: Option, + #[serde(rename = "name")] + name: String, + /// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. + #[serde(rename = "scheduled_reset_at")] + scheduled_reset_at: Option, + #[serde(rename = "scheduled_reset_period")] + scheduled_reset_period: Option, + #[serde(rename = "token")] + token: Option +} + +impl RepositoryTokenRequest { + pub fn new(name: String) -> RepositoryTokenRequest { + RepositoryTokenRequest { + eula_required: None, + is_active: None, + limit_bandwidth: None, + limit_bandwidth_unit: None, + limit_date_range_from: None, + limit_date_range_to: None, + limit_num_clients: None, + limit_num_downloads: None, + limit_package_query: None, + limit_path_query: None, + metadata: None, + name: name, + scheduled_reset_at: None, + scheduled_reset_period: None, + token: None + } + } + + pub fn set_eula_required(&mut self, eula_required: bool) { + self.eula_required = Some(eula_required); + } + + pub fn with_eula_required(mut self, eula_required: bool) -> RepositoryTokenRequest { + self.eula_required = Some(eula_required); + self + } + + pub fn eula_required(&self) -> Option<&bool> { + self.eula_required.as_ref() + } + + pub fn reset_eula_required(&mut self) { + self.eula_required = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryTokenRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_limit_bandwidth(&mut self, limit_bandwidth: i32) { + self.limit_bandwidth = Some(limit_bandwidth); + } + + pub fn with_limit_bandwidth(mut self, limit_bandwidth: i32) -> RepositoryTokenRequest { + self.limit_bandwidth = Some(limit_bandwidth); + self + } + + pub fn limit_bandwidth(&self) -> Option<&i32> { + self.limit_bandwidth.as_ref() + } + + pub fn reset_limit_bandwidth(&mut self) { + self.limit_bandwidth = None; + } + + pub fn set_limit_bandwidth_unit(&mut self, limit_bandwidth_unit: String) { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + } + + pub fn with_limit_bandwidth_unit(mut self, limit_bandwidth_unit: String) -> RepositoryTokenRequest { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + self + } + + pub fn limit_bandwidth_unit(&self) -> Option<&String> { + self.limit_bandwidth_unit.as_ref() + } + + pub fn reset_limit_bandwidth_unit(&mut self) { + self.limit_bandwidth_unit = None; + } + + pub fn set_limit_date_range_from(&mut self, limit_date_range_from: String) { + self.limit_date_range_from = Some(limit_date_range_from); + } + + pub fn with_limit_date_range_from(mut self, limit_date_range_from: String) -> RepositoryTokenRequest { + self.limit_date_range_from = Some(limit_date_range_from); + self + } + + pub fn limit_date_range_from(&self) -> Option<&String> { + self.limit_date_range_from.as_ref() + } + + pub fn reset_limit_date_range_from(&mut self) { + self.limit_date_range_from = None; + } + + pub fn set_limit_date_range_to(&mut self, limit_date_range_to: String) { + self.limit_date_range_to = Some(limit_date_range_to); + } + + pub fn with_limit_date_range_to(mut self, limit_date_range_to: String) -> RepositoryTokenRequest { + self.limit_date_range_to = Some(limit_date_range_to); + self + } + + pub fn limit_date_range_to(&self) -> Option<&String> { + self.limit_date_range_to.as_ref() + } + + pub fn reset_limit_date_range_to(&mut self) { + self.limit_date_range_to = None; + } + + pub fn set_limit_num_clients(&mut self, limit_num_clients: i32) { + self.limit_num_clients = Some(limit_num_clients); + } + + pub fn with_limit_num_clients(mut self, limit_num_clients: i32) -> RepositoryTokenRequest { + self.limit_num_clients = Some(limit_num_clients); + self + } + + pub fn limit_num_clients(&self) -> Option<&i32> { + self.limit_num_clients.as_ref() + } + + pub fn reset_limit_num_clients(&mut self) { + self.limit_num_clients = None; + } + + pub fn set_limit_num_downloads(&mut self, limit_num_downloads: i32) { + self.limit_num_downloads = Some(limit_num_downloads); + } + + pub fn with_limit_num_downloads(mut self, limit_num_downloads: i32) -> RepositoryTokenRequest { + self.limit_num_downloads = Some(limit_num_downloads); + self + } + + pub fn limit_num_downloads(&self) -> Option<&i32> { + self.limit_num_downloads.as_ref() + } + + pub fn reset_limit_num_downloads(&mut self) { + self.limit_num_downloads = None; + } + + pub fn set_limit_package_query(&mut self, limit_package_query: String) { + self.limit_package_query = Some(limit_package_query); + } + + pub fn with_limit_package_query(mut self, limit_package_query: String) -> RepositoryTokenRequest { + self.limit_package_query = Some(limit_package_query); + self + } + + pub fn limit_package_query(&self) -> Option<&String> { + self.limit_package_query.as_ref() + } + + pub fn reset_limit_package_query(&mut self) { + self.limit_package_query = None; + } + + pub fn set_limit_path_query(&mut self, limit_path_query: String) { + self.limit_path_query = Some(limit_path_query); + } + + pub fn with_limit_path_query(mut self, limit_path_query: String) -> RepositoryTokenRequest { + self.limit_path_query = Some(limit_path_query); + self + } + + pub fn limit_path_query(&self) -> Option<&String> { + self.limit_path_query.as_ref() + } + + pub fn reset_limit_path_query(&mut self) { + self.limit_path_query = None; + } + + pub fn set_metadata(&mut self, metadata: Value) { + self.metadata = Some(metadata); + } + + pub fn with_metadata(mut self, metadata: Value) -> RepositoryTokenRequest { + self.metadata = Some(metadata); + self + } + + pub fn metadata(&self) -> Option<&Value> { + self.metadata.as_ref() + } + + pub fn reset_metadata(&mut self) { + self.metadata = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RepositoryTokenRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_scheduled_reset_at(&mut self, scheduled_reset_at: String) { + self.scheduled_reset_at = Some(scheduled_reset_at); + } + + pub fn with_scheduled_reset_at(mut self, scheduled_reset_at: String) -> RepositoryTokenRequest { + self.scheduled_reset_at = Some(scheduled_reset_at); + self + } + + pub fn scheduled_reset_at(&self) -> Option<&String> { + self.scheduled_reset_at.as_ref() + } + + pub fn reset_scheduled_reset_at(&mut self) { + self.scheduled_reset_at = None; + } + + pub fn set_scheduled_reset_period(&mut self, scheduled_reset_period: String) { + self.scheduled_reset_period = Some(scheduled_reset_period); + } + + pub fn with_scheduled_reset_period(mut self, scheduled_reset_period: String) -> RepositoryTokenRequest { + self.scheduled_reset_period = Some(scheduled_reset_period); + self + } + + pub fn scheduled_reset_period(&self) -> Option<&String> { + self.scheduled_reset_period.as_ref() + } + + pub fn reset_scheduled_reset_period(&mut self) { + self.scheduled_reset_period = None; + } + + pub fn set_token(&mut self, token: String) { + self.token = Some(token); + } + + pub fn with_token(mut self, token: String) -> RepositoryTokenRequest { + self.token = Some(token); + self + } + + pub fn token(&self) -> Option<&String> { + self.token.as_ref() + } + + pub fn reset_token(&mut self) { + self.token = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_request_patch.rs b/bindings/rust/src/src/models/repository_token_request_patch.rs new file mode 100644 index 00000000..988f63c3 --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_request_patch.rs @@ -0,0 +1,338 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenRequestPatch { + /// If checked, a EULA acceptance is required for this token. + #[serde(rename = "eula_required")] + eula_required: Option, + /// If enabled, the token will allow downloads based on configured restrictions (if any). + #[serde(rename = "is_active")] + is_active: Option, + /// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_bandwidth")] + limit_bandwidth: Option, + #[serde(rename = "limit_bandwidth_unit")] + limit_bandwidth_unit: Option, + /// The starting date/time the token is allowed to be used from. + #[serde(rename = "limit_date_range_from")] + limit_date_range_from: Option, + /// The ending date/time the token is allowed to be used until. + #[serde(rename = "limit_date_range_to")] + limit_date_range_to: Option, + /// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_clients")] + limit_num_clients: Option, + /// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. + #[serde(rename = "limit_num_downloads")] + limit_num_downloads: Option, + /// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. + #[serde(rename = "limit_package_query")] + limit_package_query: Option, + /// THIS WILL SOON BE DEPRECATED, please use limit_package_query instead. The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. + #[serde(rename = "limit_path_query")] + limit_path_query: Option, + #[serde(rename = "metadata")] + metadata: Option, + #[serde(rename = "name")] + name: Option, + /// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. + #[serde(rename = "scheduled_reset_at")] + scheduled_reset_at: Option, + #[serde(rename = "scheduled_reset_period")] + scheduled_reset_period: Option, + #[serde(rename = "token")] + token: Option +} + +impl RepositoryTokenRequestPatch { + pub fn new() -> RepositoryTokenRequestPatch { + RepositoryTokenRequestPatch { + eula_required: None, + is_active: None, + limit_bandwidth: None, + limit_bandwidth_unit: None, + limit_date_range_from: None, + limit_date_range_to: None, + limit_num_clients: None, + limit_num_downloads: None, + limit_package_query: None, + limit_path_query: None, + metadata: None, + name: None, + scheduled_reset_at: None, + scheduled_reset_period: None, + token: None + } + } + + pub fn set_eula_required(&mut self, eula_required: bool) { + self.eula_required = Some(eula_required); + } + + pub fn with_eula_required(mut self, eula_required: bool) -> RepositoryTokenRequestPatch { + self.eula_required = Some(eula_required); + self + } + + pub fn eula_required(&self) -> Option<&bool> { + self.eula_required.as_ref() + } + + pub fn reset_eula_required(&mut self) { + self.eula_required = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryTokenRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_limit_bandwidth(&mut self, limit_bandwidth: i32) { + self.limit_bandwidth = Some(limit_bandwidth); + } + + pub fn with_limit_bandwidth(mut self, limit_bandwidth: i32) -> RepositoryTokenRequestPatch { + self.limit_bandwidth = Some(limit_bandwidth); + self + } + + pub fn limit_bandwidth(&self) -> Option<&i32> { + self.limit_bandwidth.as_ref() + } + + pub fn reset_limit_bandwidth(&mut self) { + self.limit_bandwidth = None; + } + + pub fn set_limit_bandwidth_unit(&mut self, limit_bandwidth_unit: String) { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + } + + pub fn with_limit_bandwidth_unit(mut self, limit_bandwidth_unit: String) -> RepositoryTokenRequestPatch { + self.limit_bandwidth_unit = Some(limit_bandwidth_unit); + self + } + + pub fn limit_bandwidth_unit(&self) -> Option<&String> { + self.limit_bandwidth_unit.as_ref() + } + + pub fn reset_limit_bandwidth_unit(&mut self) { + self.limit_bandwidth_unit = None; + } + + pub fn set_limit_date_range_from(&mut self, limit_date_range_from: String) { + self.limit_date_range_from = Some(limit_date_range_from); + } + + pub fn with_limit_date_range_from(mut self, limit_date_range_from: String) -> RepositoryTokenRequestPatch { + self.limit_date_range_from = Some(limit_date_range_from); + self + } + + pub fn limit_date_range_from(&self) -> Option<&String> { + self.limit_date_range_from.as_ref() + } + + pub fn reset_limit_date_range_from(&mut self) { + self.limit_date_range_from = None; + } + + pub fn set_limit_date_range_to(&mut self, limit_date_range_to: String) { + self.limit_date_range_to = Some(limit_date_range_to); + } + + pub fn with_limit_date_range_to(mut self, limit_date_range_to: String) -> RepositoryTokenRequestPatch { + self.limit_date_range_to = Some(limit_date_range_to); + self + } + + pub fn limit_date_range_to(&self) -> Option<&String> { + self.limit_date_range_to.as_ref() + } + + pub fn reset_limit_date_range_to(&mut self) { + self.limit_date_range_to = None; + } + + pub fn set_limit_num_clients(&mut self, limit_num_clients: i32) { + self.limit_num_clients = Some(limit_num_clients); + } + + pub fn with_limit_num_clients(mut self, limit_num_clients: i32) -> RepositoryTokenRequestPatch { + self.limit_num_clients = Some(limit_num_clients); + self + } + + pub fn limit_num_clients(&self) -> Option<&i32> { + self.limit_num_clients.as_ref() + } + + pub fn reset_limit_num_clients(&mut self) { + self.limit_num_clients = None; + } + + pub fn set_limit_num_downloads(&mut self, limit_num_downloads: i32) { + self.limit_num_downloads = Some(limit_num_downloads); + } + + pub fn with_limit_num_downloads(mut self, limit_num_downloads: i32) -> RepositoryTokenRequestPatch { + self.limit_num_downloads = Some(limit_num_downloads); + self + } + + pub fn limit_num_downloads(&self) -> Option<&i32> { + self.limit_num_downloads.as_ref() + } + + pub fn reset_limit_num_downloads(&mut self) { + self.limit_num_downloads = None; + } + + pub fn set_limit_package_query(&mut self, limit_package_query: String) { + self.limit_package_query = Some(limit_package_query); + } + + pub fn with_limit_package_query(mut self, limit_package_query: String) -> RepositoryTokenRequestPatch { + self.limit_package_query = Some(limit_package_query); + self + } + + pub fn limit_package_query(&self) -> Option<&String> { + self.limit_package_query.as_ref() + } + + pub fn reset_limit_package_query(&mut self) { + self.limit_package_query = None; + } + + pub fn set_limit_path_query(&mut self, limit_path_query: String) { + self.limit_path_query = Some(limit_path_query); + } + + pub fn with_limit_path_query(mut self, limit_path_query: String) -> RepositoryTokenRequestPatch { + self.limit_path_query = Some(limit_path_query); + self + } + + pub fn limit_path_query(&self) -> Option<&String> { + self.limit_path_query.as_ref() + } + + pub fn reset_limit_path_query(&mut self) { + self.limit_path_query = None; + } + + pub fn set_metadata(&mut self, metadata: Value) { + self.metadata = Some(metadata); + } + + pub fn with_metadata(mut self, metadata: Value) -> RepositoryTokenRequestPatch { + self.metadata = Some(metadata); + self + } + + pub fn metadata(&self) -> Option<&Value> { + self.metadata.as_ref() + } + + pub fn reset_metadata(&mut self) { + self.metadata = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RepositoryTokenRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_scheduled_reset_at(&mut self, scheduled_reset_at: String) { + self.scheduled_reset_at = Some(scheduled_reset_at); + } + + pub fn with_scheduled_reset_at(mut self, scheduled_reset_at: String) -> RepositoryTokenRequestPatch { + self.scheduled_reset_at = Some(scheduled_reset_at); + self + } + + pub fn scheduled_reset_at(&self) -> Option<&String> { + self.scheduled_reset_at.as_ref() + } + + pub fn reset_scheduled_reset_at(&mut self) { + self.scheduled_reset_at = None; + } + + pub fn set_scheduled_reset_period(&mut self, scheduled_reset_period: String) { + self.scheduled_reset_period = Some(scheduled_reset_period); + } + + pub fn with_scheduled_reset_period(mut self, scheduled_reset_period: String) -> RepositoryTokenRequestPatch { + self.scheduled_reset_period = Some(scheduled_reset_period); + self + } + + pub fn scheduled_reset_period(&self) -> Option<&String> { + self.scheduled_reset_period.as_ref() + } + + pub fn reset_scheduled_reset_period(&mut self) { + self.scheduled_reset_period = None; + } + + pub fn set_token(&mut self, token: String) { + self.token = Some(token); + } + + pub fn with_token(mut self, token: String) -> RepositoryTokenRequestPatch { + self.token = Some(token); + self + } + + pub fn token(&self) -> Option<&String> { + self.token.as_ref() + } + + pub fn reset_token(&mut self) { + self.token = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_sync.rs b/bindings/rust/src/src/models/repository_token_sync.rs new file mode 100644 index 00000000..3be25490 --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_sync.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenSync { + /// The entitlements that have been synchronised. + #[serde(rename = "tokens")] + tokens: Option> +} + +impl RepositoryTokenSync { + pub fn new() -> RepositoryTokenSync { + RepositoryTokenSync { + tokens: None + } + } + + pub fn set_tokens(&mut self, tokens: Vec<::models::RepositoryToken>) { + self.tokens = Some(tokens); + } + + pub fn with_tokens(mut self, tokens: Vec<::models::RepositoryToken>) -> RepositoryTokenSync { + self.tokens = Some(tokens); + self + } + + pub fn tokens(&self) -> Option<&Vec<::models::RepositoryToken>> { + self.tokens.as_ref() + } + + pub fn reset_tokens(&mut self) { + self.tokens = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_token_sync_request.rs b/bindings/rust/src/src/models/repository_token_sync_request.rs new file mode 100644 index 00000000..b636b0a9 --- /dev/null +++ b/bindings/rust/src/src/models/repository_token_sync_request.rs @@ -0,0 +1,46 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTokenSyncRequest { + /// The source repository slug (in the same owner namespace). + #[serde(rename = "source")] + source: String +} + +impl RepositoryTokenSyncRequest { + pub fn new(source: String) -> RepositoryTokenSyncRequest { + RepositoryTokenSyncRequest { + source: source + } + } + + pub fn set_source(&mut self, source: String) { + self.source = source; + } + + pub fn with_source(mut self, source: String) -> RepositoryTokenSyncRequest { + self.source = source; + self + } + + pub fn source(&self) -> &String { + &self.source + } + + +} + + + diff --git a/bindings/rust/src/src/models/repository_transfer_region.rs b/bindings/rust/src/src/models/repository_transfer_region.rs new file mode 100644 index 00000000..58e2ca6f --- /dev/null +++ b/bindings/rust/src/src/models/repository_transfer_region.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTransferRegion { + /// The Cloudsmith region in which package files are stored. + #[serde(rename = "storage_region")] + storage_region: Option +} + +impl RepositoryTransferRegion { + pub fn new() -> RepositoryTransferRegion { + RepositoryTransferRegion { + storage_region: None + } + } + + pub fn set_storage_region(&mut self, storage_region: String) { + self.storage_region = Some(storage_region); + } + + pub fn with_storage_region(mut self, storage_region: String) -> RepositoryTransferRegion { + self.storage_region = Some(storage_region); + self + } + + pub fn storage_region(&self) -> Option<&String> { + self.storage_region.as_ref() + } + + pub fn reset_storage_region(&mut self) { + self.storage_region = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_transfer_region_request.rs b/bindings/rust/src/src/models/repository_transfer_region_request.rs new file mode 100644 index 00000000..30ee0642 --- /dev/null +++ b/bindings/rust/src/src/models/repository_transfer_region_request.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryTransferRegionRequest { + /// The Cloudsmith region in which package files are stored. + #[serde(rename = "storage_region")] + storage_region: Option +} + +impl RepositoryTransferRegionRequest { + pub fn new() -> RepositoryTransferRegionRequest { + RepositoryTransferRegionRequest { + storage_region: None + } + } + + pub fn set_storage_region(&mut self, storage_region: String) { + self.storage_region = Some(storage_region); + } + + pub fn with_storage_region(mut self, storage_region: String) -> RepositoryTransferRegionRequest { + self.storage_region = Some(storage_region); + self + } + + pub fn storage_region(&self) -> Option<&String> { + self.storage_region.as_ref() + } + + pub fn reset_storage_region(&mut self) { + self.storage_region = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_webhook.rs b/bindings/rust/src/src/models/repository_webhook.rs new file mode 100644 index 00000000..0d347841 --- /dev/null +++ b/bindings/rust/src/src/models/repository_webhook.rs @@ -0,0 +1,568 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryWebhook { + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "created_by")] + created_by: Option, + #[serde(rename = "created_by_url")] + created_by_url: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + #[serde(rename = "disable_reason_str")] + disable_reason_str: Option, + #[serde(rename = "events")] + events: Vec, + /// Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified a webhook request within a repository. + #[serde(rename = "identifier")] + identifier: Option, + /// If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL. + #[serde(rename = "is_active")] + is_active: Option, + #[serde(rename = "is_last_response_bad")] + is_last_response_bad: Option, + #[serde(rename = "last_response_status")] + last_response_status: Option, + #[serde(rename = "last_response_status_str")] + last_response_status_str: Option, + #[serde(rename = "num_sent")] + num_sent: Option, + /// The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire. + #[serde(rename = "package_query")] + package_query: Option, + /// The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template. + #[serde(rename = "request_body_format")] + request_body_format: Option, + #[serde(rename = "request_body_format_str")] + request_body_format_str: Option, + /// The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML. + #[serde(rename = "request_body_template_format")] + request_body_template_format: Option, + #[serde(rename = "request_body_template_format_str")] + request_body_template_format_str: Option, + /// The value that will be sent for the 'Content Type' header. + #[serde(rename = "request_content_type")] + request_content_type: Option, + /// The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side. + #[serde(rename = "secret_header")] + secret_header: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The destination URL that webhook payloads will be POST'ed to. + #[serde(rename = "target_url")] + target_url: String, + #[serde(rename = "templates")] + templates: Vec<::models::WebhookTemplate>, + #[serde(rename = "updated_at")] + updated_at: Option, + #[serde(rename = "updated_by")] + updated_by: Option, + #[serde(rename = "updated_by_url")] + updated_by_url: Option, + /// If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RepositoryWebhook { + pub fn new(events: Vec, target_url: String, templates: Vec<::models::WebhookTemplate>) -> RepositoryWebhook { + RepositoryWebhook { + created_at: None, + created_by: None, + created_by_url: None, + disable_reason: None, + disable_reason_str: None, + events: events, + identifier: None, + is_active: None, + is_last_response_bad: None, + last_response_status: None, + last_response_status_str: None, + num_sent: None, + package_query: None, + request_body_format: None, + request_body_format_str: None, + request_body_template_format: None, + request_body_template_format_str: None, + request_content_type: None, + secret_header: None, + self_url: None, + slug_perm: None, + target_url: target_url, + templates: templates, + updated_at: None, + updated_by: None, + updated_by_url: None, + verify_ssl: None + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryWebhook { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_created_by(&mut self, created_by: String) { + self.created_by = Some(created_by); + } + + pub fn with_created_by(mut self, created_by: String) -> RepositoryWebhook { + self.created_by = Some(created_by); + self + } + + pub fn created_by(&self) -> Option<&String> { + self.created_by.as_ref() + } + + pub fn reset_created_by(&mut self) { + self.created_by = None; + } + + pub fn set_created_by_url(&mut self, created_by_url: String) { + self.created_by_url = Some(created_by_url); + } + + pub fn with_created_by_url(mut self, created_by_url: String) -> RepositoryWebhook { + self.created_by_url = Some(created_by_url); + self + } + + pub fn created_by_url(&self) -> Option<&String> { + self.created_by_url.as_ref() + } + + pub fn reset_created_by_url(&mut self) { + self.created_by_url = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: i32) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: i32) -> RepositoryWebhook { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&i32> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_disable_reason_str(&mut self, disable_reason_str: String) { + self.disable_reason_str = Some(disable_reason_str); + } + + pub fn with_disable_reason_str(mut self, disable_reason_str: String) -> RepositoryWebhook { + self.disable_reason_str = Some(disable_reason_str); + self + } + + pub fn disable_reason_str(&self) -> Option<&String> { + self.disable_reason_str.as_ref() + } + + pub fn reset_disable_reason_str(&mut self) { + self.disable_reason_str = None; + } + + pub fn set_events(&mut self, events: Vec) { + self.events = events; + } + + pub fn with_events(mut self, events: Vec) -> RepositoryWebhook { + self.events = events; + self + } + + pub fn events(&self) -> &Vec { + &self.events + } + + + pub fn set_identifier(&mut self, identifier: i32) { + self.identifier = Some(identifier); + } + + pub fn with_identifier(mut self, identifier: i32) -> RepositoryWebhook { + self.identifier = Some(identifier); + self + } + + pub fn identifier(&self) -> Option<&i32> { + self.identifier.as_ref() + } + + pub fn reset_identifier(&mut self) { + self.identifier = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryWebhook { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_is_last_response_bad(&mut self, is_last_response_bad: bool) { + self.is_last_response_bad = Some(is_last_response_bad); + } + + pub fn with_is_last_response_bad(mut self, is_last_response_bad: bool) -> RepositoryWebhook { + self.is_last_response_bad = Some(is_last_response_bad); + self + } + + pub fn is_last_response_bad(&self) -> Option<&bool> { + self.is_last_response_bad.as_ref() + } + + pub fn reset_is_last_response_bad(&mut self) { + self.is_last_response_bad = None; + } + + pub fn set_last_response_status(&mut self, last_response_status: i32) { + self.last_response_status = Some(last_response_status); + } + + pub fn with_last_response_status(mut self, last_response_status: i32) -> RepositoryWebhook { + self.last_response_status = Some(last_response_status); + self + } + + pub fn last_response_status(&self) -> Option<&i32> { + self.last_response_status.as_ref() + } + + pub fn reset_last_response_status(&mut self) { + self.last_response_status = None; + } + + pub fn set_last_response_status_str(&mut self, last_response_status_str: String) { + self.last_response_status_str = Some(last_response_status_str); + } + + pub fn with_last_response_status_str(mut self, last_response_status_str: String) -> RepositoryWebhook { + self.last_response_status_str = Some(last_response_status_str); + self + } + + pub fn last_response_status_str(&self) -> Option<&String> { + self.last_response_status_str.as_ref() + } + + pub fn reset_last_response_status_str(&mut self) { + self.last_response_status_str = None; + } + + pub fn set_num_sent(&mut self, num_sent: i32) { + self.num_sent = Some(num_sent); + } + + pub fn with_num_sent(mut self, num_sent: i32) -> RepositoryWebhook { + self.num_sent = Some(num_sent); + self + } + + pub fn num_sent(&self) -> Option<&i32> { + self.num_sent.as_ref() + } + + pub fn reset_num_sent(&mut self) { + self.num_sent = None; + } + + pub fn set_package_query(&mut self, package_query: String) { + self.package_query = Some(package_query); + } + + pub fn with_package_query(mut self, package_query: String) -> RepositoryWebhook { + self.package_query = Some(package_query); + self + } + + pub fn package_query(&self) -> Option<&String> { + self.package_query.as_ref() + } + + pub fn reset_package_query(&mut self) { + self.package_query = None; + } + + pub fn set_request_body_format(&mut self, request_body_format: i32) { + self.request_body_format = Some(request_body_format); + } + + pub fn with_request_body_format(mut self, request_body_format: i32) -> RepositoryWebhook { + self.request_body_format = Some(request_body_format); + self + } + + pub fn request_body_format(&self) -> Option<&i32> { + self.request_body_format.as_ref() + } + + pub fn reset_request_body_format(&mut self) { + self.request_body_format = None; + } + + pub fn set_request_body_format_str(&mut self, request_body_format_str: String) { + self.request_body_format_str = Some(request_body_format_str); + } + + pub fn with_request_body_format_str(mut self, request_body_format_str: String) -> RepositoryWebhook { + self.request_body_format_str = Some(request_body_format_str); + self + } + + pub fn request_body_format_str(&self) -> Option<&String> { + self.request_body_format_str.as_ref() + } + + pub fn reset_request_body_format_str(&mut self) { + self.request_body_format_str = None; + } + + pub fn set_request_body_template_format(&mut self, request_body_template_format: i32) { + self.request_body_template_format = Some(request_body_template_format); + } + + pub fn with_request_body_template_format(mut self, request_body_template_format: i32) -> RepositoryWebhook { + self.request_body_template_format = Some(request_body_template_format); + self + } + + pub fn request_body_template_format(&self) -> Option<&i32> { + self.request_body_template_format.as_ref() + } + + pub fn reset_request_body_template_format(&mut self) { + self.request_body_template_format = None; + } + + pub fn set_request_body_template_format_str(&mut self, request_body_template_format_str: String) { + self.request_body_template_format_str = Some(request_body_template_format_str); + } + + pub fn with_request_body_template_format_str(mut self, request_body_template_format_str: String) -> RepositoryWebhook { + self.request_body_template_format_str = Some(request_body_template_format_str); + self + } + + pub fn request_body_template_format_str(&self) -> Option<&String> { + self.request_body_template_format_str.as_ref() + } + + pub fn reset_request_body_template_format_str(&mut self) { + self.request_body_template_format_str = None; + } + + pub fn set_request_content_type(&mut self, request_content_type: String) { + self.request_content_type = Some(request_content_type); + } + + pub fn with_request_content_type(mut self, request_content_type: String) -> RepositoryWebhook { + self.request_content_type = Some(request_content_type); + self + } + + pub fn request_content_type(&self) -> Option<&String> { + self.request_content_type.as_ref() + } + + pub fn reset_request_content_type(&mut self) { + self.request_content_type = None; + } + + pub fn set_secret_header(&mut self, secret_header: String) { + self.secret_header = Some(secret_header); + } + + pub fn with_secret_header(mut self, secret_header: String) -> RepositoryWebhook { + self.secret_header = Some(secret_header); + self + } + + pub fn secret_header(&self) -> Option<&String> { + self.secret_header.as_ref() + } + + pub fn reset_secret_header(&mut self) { + self.secret_header = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RepositoryWebhook { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RepositoryWebhook { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_target_url(&mut self, target_url: String) { + self.target_url = target_url; + } + + pub fn with_target_url(mut self, target_url: String) -> RepositoryWebhook { + self.target_url = target_url; + self + } + + pub fn target_url(&self) -> &String { + &self.target_url + } + + + pub fn set_templates(&mut self, templates: Vec<::models::WebhookTemplate>) { + self.templates = templates; + } + + pub fn with_templates(mut self, templates: Vec<::models::WebhookTemplate>) -> RepositoryWebhook { + self.templates = templates; + self + } + + pub fn templates(&self) -> &Vec<::models::WebhookTemplate> { + &self.templates + } + + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> RepositoryWebhook { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_updated_by(&mut self, updated_by: String) { + self.updated_by = Some(updated_by); + } + + pub fn with_updated_by(mut self, updated_by: String) -> RepositoryWebhook { + self.updated_by = Some(updated_by); + self + } + + pub fn updated_by(&self) -> Option<&String> { + self.updated_by.as_ref() + } + + pub fn reset_updated_by(&mut self) { + self.updated_by = None; + } + + pub fn set_updated_by_url(&mut self, updated_by_url: String) { + self.updated_by_url = Some(updated_by_url); + } + + pub fn with_updated_by_url(mut self, updated_by_url: String) -> RepositoryWebhook { + self.updated_by_url = Some(updated_by_url); + self + } + + pub fn updated_by_url(&self) -> Option<&String> { + self.updated_by_url.as_ref() + } + + pub fn reset_updated_by_url(&mut self) { + self.updated_by_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RepositoryWebhook { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_webhook_request.rs b/bindings/rust/src/src/models/repository_webhook_request.rs new file mode 100644 index 00000000..c4182d06 --- /dev/null +++ b/bindings/rust/src/src/models/repository_webhook_request.rs @@ -0,0 +1,269 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryWebhookRequest { + #[serde(rename = "events")] + events: Vec, + /// If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL. + #[serde(rename = "is_active")] + is_active: Option, + /// The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire. + #[serde(rename = "package_query")] + package_query: Option, + /// The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template. + #[serde(rename = "request_body_format")] + request_body_format: Option, + /// The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML. + #[serde(rename = "request_body_template_format")] + request_body_template_format: Option, + /// The value that will be sent for the 'Content Type' header. + #[serde(rename = "request_content_type")] + request_content_type: Option, + /// The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side. + #[serde(rename = "secret_header")] + secret_header: Option, + /// The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side. + #[serde(rename = "secret_value")] + secret_value: Option, + /// The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it). + #[serde(rename = "signature_key")] + signature_key: Option, + /// The destination URL that webhook payloads will be POST'ed to. + #[serde(rename = "target_url")] + target_url: String, + #[serde(rename = "templates")] + templates: Vec<::models::WebhookTemplate>, + /// If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RepositoryWebhookRequest { + pub fn new(events: Vec, target_url: String, templates: Vec<::models::WebhookTemplate>) -> RepositoryWebhookRequest { + RepositoryWebhookRequest { + events: events, + is_active: None, + package_query: None, + request_body_format: None, + request_body_template_format: None, + request_content_type: None, + secret_header: None, + secret_value: None, + signature_key: None, + target_url: target_url, + templates: templates, + verify_ssl: None + } + } + + pub fn set_events(&mut self, events: Vec) { + self.events = events; + } + + pub fn with_events(mut self, events: Vec) -> RepositoryWebhookRequest { + self.events = events; + self + } + + pub fn events(&self) -> &Vec { + &self.events + } + + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryWebhookRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_package_query(&mut self, package_query: String) { + self.package_query = Some(package_query); + } + + pub fn with_package_query(mut self, package_query: String) -> RepositoryWebhookRequest { + self.package_query = Some(package_query); + self + } + + pub fn package_query(&self) -> Option<&String> { + self.package_query.as_ref() + } + + pub fn reset_package_query(&mut self) { + self.package_query = None; + } + + pub fn set_request_body_format(&mut self, request_body_format: i32) { + self.request_body_format = Some(request_body_format); + } + + pub fn with_request_body_format(mut self, request_body_format: i32) -> RepositoryWebhookRequest { + self.request_body_format = Some(request_body_format); + self + } + + pub fn request_body_format(&self) -> Option<&i32> { + self.request_body_format.as_ref() + } + + pub fn reset_request_body_format(&mut self) { + self.request_body_format = None; + } + + pub fn set_request_body_template_format(&mut self, request_body_template_format: i32) { + self.request_body_template_format = Some(request_body_template_format); + } + + pub fn with_request_body_template_format(mut self, request_body_template_format: i32) -> RepositoryWebhookRequest { + self.request_body_template_format = Some(request_body_template_format); + self + } + + pub fn request_body_template_format(&self) -> Option<&i32> { + self.request_body_template_format.as_ref() + } + + pub fn reset_request_body_template_format(&mut self) { + self.request_body_template_format = None; + } + + pub fn set_request_content_type(&mut self, request_content_type: String) { + self.request_content_type = Some(request_content_type); + } + + pub fn with_request_content_type(mut self, request_content_type: String) -> RepositoryWebhookRequest { + self.request_content_type = Some(request_content_type); + self + } + + pub fn request_content_type(&self) -> Option<&String> { + self.request_content_type.as_ref() + } + + pub fn reset_request_content_type(&mut self) { + self.request_content_type = None; + } + + pub fn set_secret_header(&mut self, secret_header: String) { + self.secret_header = Some(secret_header); + } + + pub fn with_secret_header(mut self, secret_header: String) -> RepositoryWebhookRequest { + self.secret_header = Some(secret_header); + self + } + + pub fn secret_header(&self) -> Option<&String> { + self.secret_header.as_ref() + } + + pub fn reset_secret_header(&mut self) { + self.secret_header = None; + } + + pub fn set_secret_value(&mut self, secret_value: String) { + self.secret_value = Some(secret_value); + } + + pub fn with_secret_value(mut self, secret_value: String) -> RepositoryWebhookRequest { + self.secret_value = Some(secret_value); + self + } + + pub fn secret_value(&self) -> Option<&String> { + self.secret_value.as_ref() + } + + pub fn reset_secret_value(&mut self) { + self.secret_value = None; + } + + pub fn set_signature_key(&mut self, signature_key: String) { + self.signature_key = Some(signature_key); + } + + pub fn with_signature_key(mut self, signature_key: String) -> RepositoryWebhookRequest { + self.signature_key = Some(signature_key); + self + } + + pub fn signature_key(&self) -> Option<&String> { + self.signature_key.as_ref() + } + + pub fn reset_signature_key(&mut self) { + self.signature_key = None; + } + + pub fn set_target_url(&mut self, target_url: String) { + self.target_url = target_url; + } + + pub fn with_target_url(mut self, target_url: String) -> RepositoryWebhookRequest { + self.target_url = target_url; + self + } + + pub fn target_url(&self) -> &String { + &self.target_url + } + + + pub fn set_templates(&mut self, templates: Vec<::models::WebhookTemplate>) { + self.templates = templates; + } + + pub fn with_templates(mut self, templates: Vec<::models::WebhookTemplate>) -> RepositoryWebhookRequest { + self.templates = templates; + self + } + + pub fn templates(&self) -> &Vec<::models::WebhookTemplate> { + &self.templates + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RepositoryWebhookRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_webhook_request_patch.rs b/bindings/rust/src/src/models/repository_webhook_request_patch.rs new file mode 100644 index 00000000..ba476e52 --- /dev/null +++ b/bindings/rust/src/src/models/repository_webhook_request_patch.rs @@ -0,0 +1,278 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryWebhookRequestPatch { + #[serde(rename = "events")] + events: Option>, + /// If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL. + #[serde(rename = "is_active")] + is_active: Option, + /// The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire. + #[serde(rename = "package_query")] + package_query: Option, + /// The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template. + #[serde(rename = "request_body_format")] + request_body_format: Option, + /// The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML. + #[serde(rename = "request_body_template_format")] + request_body_template_format: Option, + /// The value that will be sent for the 'Content Type' header. + #[serde(rename = "request_content_type")] + request_content_type: Option, + /// The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side. + #[serde(rename = "secret_header")] + secret_header: Option, + /// The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side. + #[serde(rename = "secret_value")] + secret_value: Option, + /// The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it). + #[serde(rename = "signature_key")] + signature_key: Option, + /// The destination URL that webhook payloads will be POST'ed to. + #[serde(rename = "target_url")] + target_url: Option, + #[serde(rename = "templates")] + templates: Option>, + /// If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RepositoryWebhookRequestPatch { + pub fn new() -> RepositoryWebhookRequestPatch { + RepositoryWebhookRequestPatch { + events: None, + is_active: None, + package_query: None, + request_body_format: None, + request_body_template_format: None, + request_content_type: None, + secret_header: None, + secret_value: None, + signature_key: None, + target_url: None, + templates: None, + verify_ssl: None + } + } + + pub fn set_events(&mut self, events: Vec) { + self.events = Some(events); + } + + pub fn with_events(mut self, events: Vec) -> RepositoryWebhookRequestPatch { + self.events = Some(events); + self + } + + pub fn events(&self) -> Option<&Vec> { + self.events.as_ref() + } + + pub fn reset_events(&mut self) { + self.events = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RepositoryWebhookRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_package_query(&mut self, package_query: String) { + self.package_query = Some(package_query); + } + + pub fn with_package_query(mut self, package_query: String) -> RepositoryWebhookRequestPatch { + self.package_query = Some(package_query); + self + } + + pub fn package_query(&self) -> Option<&String> { + self.package_query.as_ref() + } + + pub fn reset_package_query(&mut self) { + self.package_query = None; + } + + pub fn set_request_body_format(&mut self, request_body_format: i32) { + self.request_body_format = Some(request_body_format); + } + + pub fn with_request_body_format(mut self, request_body_format: i32) -> RepositoryWebhookRequestPatch { + self.request_body_format = Some(request_body_format); + self + } + + pub fn request_body_format(&self) -> Option<&i32> { + self.request_body_format.as_ref() + } + + pub fn reset_request_body_format(&mut self) { + self.request_body_format = None; + } + + pub fn set_request_body_template_format(&mut self, request_body_template_format: i32) { + self.request_body_template_format = Some(request_body_template_format); + } + + pub fn with_request_body_template_format(mut self, request_body_template_format: i32) -> RepositoryWebhookRequestPatch { + self.request_body_template_format = Some(request_body_template_format); + self + } + + pub fn request_body_template_format(&self) -> Option<&i32> { + self.request_body_template_format.as_ref() + } + + pub fn reset_request_body_template_format(&mut self) { + self.request_body_template_format = None; + } + + pub fn set_request_content_type(&mut self, request_content_type: String) { + self.request_content_type = Some(request_content_type); + } + + pub fn with_request_content_type(mut self, request_content_type: String) -> RepositoryWebhookRequestPatch { + self.request_content_type = Some(request_content_type); + self + } + + pub fn request_content_type(&self) -> Option<&String> { + self.request_content_type.as_ref() + } + + pub fn reset_request_content_type(&mut self) { + self.request_content_type = None; + } + + pub fn set_secret_header(&mut self, secret_header: String) { + self.secret_header = Some(secret_header); + } + + pub fn with_secret_header(mut self, secret_header: String) -> RepositoryWebhookRequestPatch { + self.secret_header = Some(secret_header); + self + } + + pub fn secret_header(&self) -> Option<&String> { + self.secret_header.as_ref() + } + + pub fn reset_secret_header(&mut self) { + self.secret_header = None; + } + + pub fn set_secret_value(&mut self, secret_value: String) { + self.secret_value = Some(secret_value); + } + + pub fn with_secret_value(mut self, secret_value: String) -> RepositoryWebhookRequestPatch { + self.secret_value = Some(secret_value); + self + } + + pub fn secret_value(&self) -> Option<&String> { + self.secret_value.as_ref() + } + + pub fn reset_secret_value(&mut self) { + self.secret_value = None; + } + + pub fn set_signature_key(&mut self, signature_key: String) { + self.signature_key = Some(signature_key); + } + + pub fn with_signature_key(mut self, signature_key: String) -> RepositoryWebhookRequestPatch { + self.signature_key = Some(signature_key); + self + } + + pub fn signature_key(&self) -> Option<&String> { + self.signature_key.as_ref() + } + + pub fn reset_signature_key(&mut self) { + self.signature_key = None; + } + + pub fn set_target_url(&mut self, target_url: String) { + self.target_url = Some(target_url); + } + + pub fn with_target_url(mut self, target_url: String) -> RepositoryWebhookRequestPatch { + self.target_url = Some(target_url); + self + } + + pub fn target_url(&self) -> Option<&String> { + self.target_url.as_ref() + } + + pub fn reset_target_url(&mut self) { + self.target_url = None; + } + + pub fn set_templates(&mut self, templates: Vec<::models::WebhookTemplate>) { + self.templates = Some(templates); + } + + pub fn with_templates(mut self, templates: Vec<::models::WebhookTemplate>) -> RepositoryWebhookRequestPatch { + self.templates = Some(templates); + self + } + + pub fn templates(&self) -> Option<&Vec<::models::WebhookTemplate>> { + self.templates.as_ref() + } + + pub fn reset_templates(&mut self) { + self.templates = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RepositoryWebhookRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_x509_ecdsa_certificate.rs b/bindings/rust/src/src/models/repository_x509_ecdsa_certificate.rs new file mode 100644 index 00000000..cda9e537 --- /dev/null +++ b/bindings/rust/src/src/models/repository_x509_ecdsa_certificate.rs @@ -0,0 +1,233 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryX509EcdsaCertificate { + /// If selected this is the active key for this repository. + #[serde(rename = "active")] + active: Option, + /// The issued certificate. + #[serde(rename = "certificate")] + certificate: Option, + /// Base64 encoded CA certificate chain. + #[serde(rename = "certificate_chain")] + certificate_chain: Option, + #[serde(rename = "certificate_chain_fingerprint")] + certificate_chain_fingerprint: Option, + #[serde(rename = "certificate_chain_fingerprint_short")] + certificate_chain_fingerprint_short: Option, + /// The SHA-256 long identifier used + #[serde(rename = "certificate_fingerprint")] + certificate_fingerprint: Option, + #[serde(rename = "certificate_fingerprint_short")] + certificate_fingerprint_short: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// If selected this is the default key for this repository. + #[serde(rename = "default")] + default: Option, + #[serde(rename = "issuing_status")] + issuing_status: Option +} + +impl RepositoryX509EcdsaCertificate { + pub fn new() -> RepositoryX509EcdsaCertificate { + RepositoryX509EcdsaCertificate { + active: None, + certificate: None, + certificate_chain: None, + certificate_chain_fingerprint: None, + certificate_chain_fingerprint_short: None, + certificate_fingerprint: None, + certificate_fingerprint_short: None, + created_at: None, + default: None, + issuing_status: None + } + } + + pub fn set_active(&mut self, active: bool) { + self.active = Some(active); + } + + pub fn with_active(mut self, active: bool) -> RepositoryX509EcdsaCertificate { + self.active = Some(active); + self + } + + pub fn active(&self) -> Option<&bool> { + self.active.as_ref() + } + + pub fn reset_active(&mut self) { + self.active = None; + } + + pub fn set_certificate(&mut self, certificate: String) { + self.certificate = Some(certificate); + } + + pub fn with_certificate(mut self, certificate: String) -> RepositoryX509EcdsaCertificate { + self.certificate = Some(certificate); + self + } + + pub fn certificate(&self) -> Option<&String> { + self.certificate.as_ref() + } + + pub fn reset_certificate(&mut self) { + self.certificate = None; + } + + pub fn set_certificate_chain(&mut self, certificate_chain: String) { + self.certificate_chain = Some(certificate_chain); + } + + pub fn with_certificate_chain(mut self, certificate_chain: String) -> RepositoryX509EcdsaCertificate { + self.certificate_chain = Some(certificate_chain); + self + } + + pub fn certificate_chain(&self) -> Option<&String> { + self.certificate_chain.as_ref() + } + + pub fn reset_certificate_chain(&mut self) { + self.certificate_chain = None; + } + + pub fn set_certificate_chain_fingerprint(&mut self, certificate_chain_fingerprint: String) { + self.certificate_chain_fingerprint = Some(certificate_chain_fingerprint); + } + + pub fn with_certificate_chain_fingerprint(mut self, certificate_chain_fingerprint: String) -> RepositoryX509EcdsaCertificate { + self.certificate_chain_fingerprint = Some(certificate_chain_fingerprint); + self + } + + pub fn certificate_chain_fingerprint(&self) -> Option<&String> { + self.certificate_chain_fingerprint.as_ref() + } + + pub fn reset_certificate_chain_fingerprint(&mut self) { + self.certificate_chain_fingerprint = None; + } + + pub fn set_certificate_chain_fingerprint_short(&mut self, certificate_chain_fingerprint_short: String) { + self.certificate_chain_fingerprint_short = Some(certificate_chain_fingerprint_short); + } + + pub fn with_certificate_chain_fingerprint_short(mut self, certificate_chain_fingerprint_short: String) -> RepositoryX509EcdsaCertificate { + self.certificate_chain_fingerprint_short = Some(certificate_chain_fingerprint_short); + self + } + + pub fn certificate_chain_fingerprint_short(&self) -> Option<&String> { + self.certificate_chain_fingerprint_short.as_ref() + } + + pub fn reset_certificate_chain_fingerprint_short(&mut self) { + self.certificate_chain_fingerprint_short = None; + } + + pub fn set_certificate_fingerprint(&mut self, certificate_fingerprint: String) { + self.certificate_fingerprint = Some(certificate_fingerprint); + } + + pub fn with_certificate_fingerprint(mut self, certificate_fingerprint: String) -> RepositoryX509EcdsaCertificate { + self.certificate_fingerprint = Some(certificate_fingerprint); + self + } + + pub fn certificate_fingerprint(&self) -> Option<&String> { + self.certificate_fingerprint.as_ref() + } + + pub fn reset_certificate_fingerprint(&mut self) { + self.certificate_fingerprint = None; + } + + pub fn set_certificate_fingerprint_short(&mut self, certificate_fingerprint_short: String) { + self.certificate_fingerprint_short = Some(certificate_fingerprint_short); + } + + pub fn with_certificate_fingerprint_short(mut self, certificate_fingerprint_short: String) -> RepositoryX509EcdsaCertificate { + self.certificate_fingerprint_short = Some(certificate_fingerprint_short); + self + } + + pub fn certificate_fingerprint_short(&self) -> Option<&String> { + self.certificate_fingerprint_short.as_ref() + } + + pub fn reset_certificate_fingerprint_short(&mut self) { + self.certificate_fingerprint_short = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryX509EcdsaCertificate { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryX509EcdsaCertificate { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_issuing_status(&mut self, issuing_status: String) { + self.issuing_status = Some(issuing_status); + } + + pub fn with_issuing_status(mut self, issuing_status: String) -> RepositoryX509EcdsaCertificate { + self.issuing_status = Some(issuing_status); + self + } + + pub fn issuing_status(&self) -> Option<&String> { + self.issuing_status.as_ref() + } + + pub fn reset_issuing_status(&mut self) { + self.issuing_status = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/repository_x509_rsa_certificate.rs b/bindings/rust/src/src/models/repository_x509_rsa_certificate.rs new file mode 100644 index 00000000..dcb3bcf8 --- /dev/null +++ b/bindings/rust/src/src/models/repository_x509_rsa_certificate.rs @@ -0,0 +1,233 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RepositoryX509RsaCertificate { + /// If selected this is the active key for this repository. + #[serde(rename = "active")] + active: Option, + /// The issued certificate. + #[serde(rename = "certificate")] + certificate: Option, + /// Base64 encoded CA certificate chain. + #[serde(rename = "certificate_chain")] + certificate_chain: Option, + #[serde(rename = "certificate_chain_fingerprint")] + certificate_chain_fingerprint: Option, + #[serde(rename = "certificate_chain_fingerprint_short")] + certificate_chain_fingerprint_short: Option, + /// The SHA-256 long identifier used + #[serde(rename = "certificate_fingerprint")] + certificate_fingerprint: Option, + #[serde(rename = "certificate_fingerprint_short")] + certificate_fingerprint_short: Option, + #[serde(rename = "created_at")] + created_at: Option, + /// If selected this is the default key for this repository. + #[serde(rename = "default")] + default: Option, + #[serde(rename = "issuing_status")] + issuing_status: Option +} + +impl RepositoryX509RsaCertificate { + pub fn new() -> RepositoryX509RsaCertificate { + RepositoryX509RsaCertificate { + active: None, + certificate: None, + certificate_chain: None, + certificate_chain_fingerprint: None, + certificate_chain_fingerprint_short: None, + certificate_fingerprint: None, + certificate_fingerprint_short: None, + created_at: None, + default: None, + issuing_status: None + } + } + + pub fn set_active(&mut self, active: bool) { + self.active = Some(active); + } + + pub fn with_active(mut self, active: bool) -> RepositoryX509RsaCertificate { + self.active = Some(active); + self + } + + pub fn active(&self) -> Option<&bool> { + self.active.as_ref() + } + + pub fn reset_active(&mut self) { + self.active = None; + } + + pub fn set_certificate(&mut self, certificate: String) { + self.certificate = Some(certificate); + } + + pub fn with_certificate(mut self, certificate: String) -> RepositoryX509RsaCertificate { + self.certificate = Some(certificate); + self + } + + pub fn certificate(&self) -> Option<&String> { + self.certificate.as_ref() + } + + pub fn reset_certificate(&mut self) { + self.certificate = None; + } + + pub fn set_certificate_chain(&mut self, certificate_chain: String) { + self.certificate_chain = Some(certificate_chain); + } + + pub fn with_certificate_chain(mut self, certificate_chain: String) -> RepositoryX509RsaCertificate { + self.certificate_chain = Some(certificate_chain); + self + } + + pub fn certificate_chain(&self) -> Option<&String> { + self.certificate_chain.as_ref() + } + + pub fn reset_certificate_chain(&mut self) { + self.certificate_chain = None; + } + + pub fn set_certificate_chain_fingerprint(&mut self, certificate_chain_fingerprint: String) { + self.certificate_chain_fingerprint = Some(certificate_chain_fingerprint); + } + + pub fn with_certificate_chain_fingerprint(mut self, certificate_chain_fingerprint: String) -> RepositoryX509RsaCertificate { + self.certificate_chain_fingerprint = Some(certificate_chain_fingerprint); + self + } + + pub fn certificate_chain_fingerprint(&self) -> Option<&String> { + self.certificate_chain_fingerprint.as_ref() + } + + pub fn reset_certificate_chain_fingerprint(&mut self) { + self.certificate_chain_fingerprint = None; + } + + pub fn set_certificate_chain_fingerprint_short(&mut self, certificate_chain_fingerprint_short: String) { + self.certificate_chain_fingerprint_short = Some(certificate_chain_fingerprint_short); + } + + pub fn with_certificate_chain_fingerprint_short(mut self, certificate_chain_fingerprint_short: String) -> RepositoryX509RsaCertificate { + self.certificate_chain_fingerprint_short = Some(certificate_chain_fingerprint_short); + self + } + + pub fn certificate_chain_fingerprint_short(&self) -> Option<&String> { + self.certificate_chain_fingerprint_short.as_ref() + } + + pub fn reset_certificate_chain_fingerprint_short(&mut self) { + self.certificate_chain_fingerprint_short = None; + } + + pub fn set_certificate_fingerprint(&mut self, certificate_fingerprint: String) { + self.certificate_fingerprint = Some(certificate_fingerprint); + } + + pub fn with_certificate_fingerprint(mut self, certificate_fingerprint: String) -> RepositoryX509RsaCertificate { + self.certificate_fingerprint = Some(certificate_fingerprint); + self + } + + pub fn certificate_fingerprint(&self) -> Option<&String> { + self.certificate_fingerprint.as_ref() + } + + pub fn reset_certificate_fingerprint(&mut self) { + self.certificate_fingerprint = None; + } + + pub fn set_certificate_fingerprint_short(&mut self, certificate_fingerprint_short: String) { + self.certificate_fingerprint_short = Some(certificate_fingerprint_short); + } + + pub fn with_certificate_fingerprint_short(mut self, certificate_fingerprint_short: String) -> RepositoryX509RsaCertificate { + self.certificate_fingerprint_short = Some(certificate_fingerprint_short); + self + } + + pub fn certificate_fingerprint_short(&self) -> Option<&String> { + self.certificate_fingerprint_short.as_ref() + } + + pub fn reset_certificate_fingerprint_short(&mut self) { + self.certificate_fingerprint_short = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RepositoryX509RsaCertificate { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_default(&mut self, default: bool) { + self.default = Some(default); + } + + pub fn with_default(mut self, default: bool) -> RepositoryX509RsaCertificate { + self.default = Some(default); + self + } + + pub fn default(&self) -> Option<&bool> { + self.default.as_ref() + } + + pub fn reset_default(&mut self) { + self.default = None; + } + + pub fn set_issuing_status(&mut self, issuing_status: String) { + self.issuing_status = Some(issuing_status); + } + + pub fn with_issuing_status(mut self, issuing_status: String) -> RepositoryX509RsaCertificate { + self.issuing_status = Some(issuing_status); + self + } + + pub fn issuing_status(&self) -> Option<&String> { + self.issuing_status.as_ref() + } + + pub fn reset_issuing_status(&mut self) { + self.issuing_status = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/resources_rate_check.rs b/bindings/rust/src/src/models/resources_rate_check.rs new file mode 100644 index 00000000..55b27f9d --- /dev/null +++ b/bindings/rust/src/src/models/resources_rate_check.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ResourcesRateCheck { + /// Rate limit values per resource + #[serde(rename = "resources")] + resources: Option<::std::collections::HashMap> +} + +impl ResourcesRateCheck { + pub fn new() -> ResourcesRateCheck { + ResourcesRateCheck { + resources: None + } + } + + pub fn set_resources(&mut self, resources: ::std::collections::HashMap) { + self.resources = Some(resources); + } + + pub fn with_resources(mut self, resources: ::std::collections::HashMap) -> ResourcesRateCheck { + self.resources = Some(resources); + self + } + + pub fn resources(&self) -> Option<&::std::collections::HashMap> { + self.resources.as_ref() + } + + pub fn reset_resources(&mut self) { + self.resources = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/respository_geo_ip_enable_disable.rs b/bindings/rust/src/src/models/respository_geo_ip_enable_disable.rs new file mode 100644 index 00000000..47ed5569 --- /dev/null +++ b/bindings/rust/src/src/models/respository_geo_ip_enable_disable.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RespositoryGeoIpEnableDisable { +} + +impl RespositoryGeoIpEnableDisable { + pub fn new() -> RespositoryGeoIpEnableDisable { + RespositoryGeoIpEnableDisable { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/respository_geo_ip_enable_disable_request.rs b/bindings/rust/src/src/models/respository_geo_ip_enable_disable_request.rs new file mode 100644 index 00000000..a57c5ea6 --- /dev/null +++ b/bindings/rust/src/src/models/respository_geo_ip_enable_disable_request.rs @@ -0,0 +1,28 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RespositoryGeoIpEnableDisableRequest { +} + +impl RespositoryGeoIpEnableDisableRequest { + pub fn new() -> RespositoryGeoIpEnableDisableRequest { + RespositoryGeoIpEnableDisableRequest { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/rpm_package_upload.rs b/bindings/rust/src/src/models/rpm_package_upload.rs new file mode 100644 index 00000000..f85d80bc --- /dev/null +++ b/bindings/rust/src/src/models/rpm_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RpmPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl RpmPackageUpload { + pub fn new() -> RpmPackageUpload { + RpmPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> RpmPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> RpmPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> RpmPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> RpmPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> RpmPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> RpmPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> RpmPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> RpmPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RpmPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> RpmPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> RpmPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> RpmPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> RpmPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> RpmPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> RpmPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> RpmPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> RpmPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> RpmPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> RpmPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> RpmPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> RpmPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> RpmPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> RpmPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> RpmPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> RpmPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> RpmPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> RpmPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> RpmPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> RpmPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> RpmPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> RpmPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> RpmPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> RpmPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> RpmPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> RpmPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> RpmPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> RpmPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> RpmPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> RpmPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RpmPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> RpmPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> RpmPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> RpmPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> RpmPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> RpmPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> RpmPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> RpmPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> RpmPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> RpmPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> RpmPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> RpmPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> RpmPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> RpmPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> RpmPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> RpmPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RpmPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> RpmPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> RpmPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> RpmPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RpmPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> RpmPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> RpmPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> RpmPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> RpmPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> RpmPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> RpmPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> RpmPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> RpmPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> RpmPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> RpmPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> RpmPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> RpmPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> RpmPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> RpmPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> RpmPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> RpmPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> RpmPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> RpmPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> RpmPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> RpmPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/rpm_package_upload_request.rs b/bindings/rust/src/src/models/rpm_package_upload_request.rs new file mode 100644 index 00000000..ca1ebbf3 --- /dev/null +++ b/bindings/rust/src/src/models/rpm_package_upload_request.rs @@ -0,0 +1,106 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RpmPackageUploadRequest { + /// The distribution to store the package for. + #[serde(rename = "distribution")] + distribution: String, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl RpmPackageUploadRequest { + pub fn new(distribution: String, package_file: String) -> RpmPackageUploadRequest { + RpmPackageUploadRequest { + distribution: distribution, + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_distribution(&mut self, distribution: String) { + self.distribution = distribution; + } + + pub fn with_distribution(mut self, distribution: String) -> RpmPackageUploadRequest { + self.distribution = distribution; + self + } + + pub fn distribution(&self) -> &String { + &self.distribution + } + + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> RpmPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> RpmPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> RpmPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/rpm_upstream.rs b/bindings/rust/src/src/models/rpm_upstream.rs new file mode 100644 index 00000000..66cc3f43 --- /dev/null +++ b/bindings/rust/src/src/models/rpm_upstream.rs @@ -0,0 +1,520 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RpmUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The distribution version that packages found on this upstream will be associated with. + #[serde(rename = "distro_version")] + distro_version: String, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// When checked, source packages will be available from this upstream. + #[serde(rename = "include_sources")] + include_sources: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// The signature verification status for this upstream. + #[serde(rename = "verification_status")] + verification_status: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RpmUpstream { + pub fn new(distro_version: String, name: String, upstream_url: String) -> RpmUpstream { + RpmUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + distro_version: distro_version, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + include_sources: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verification_status: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> RpmUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> RpmUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> RpmUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RpmUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> RpmUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_distro_version(&mut self, distro_version: String) { + self.distro_version = distro_version; + } + + pub fn with_distro_version(mut self, distro_version: String) -> RpmUpstream { + self.distro_version = distro_version; + self + } + + pub fn distro_version(&self) -> &String { + &self.distro_version + } + + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> RpmUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> RpmUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> RpmUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> RpmUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> RpmUpstream { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> RpmUpstream { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> RpmUpstream { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_include_sources(&mut self, include_sources: bool) { + self.include_sources = Some(include_sources); + } + + pub fn with_include_sources(mut self, include_sources: bool) -> RpmUpstream { + self.include_sources = Some(include_sources); + self + } + + pub fn include_sources(&self) -> Option<&bool> { + self.include_sources.as_ref() + } + + pub fn reset_include_sources(&mut self) { + self.include_sources = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RpmUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> RpmUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RpmUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> RpmUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> RpmUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RpmUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> RpmUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> RpmUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verification_status(&mut self, verification_status: String) { + self.verification_status = Some(verification_status); + } + + pub fn with_verification_status(mut self, verification_status: String) -> RpmUpstream { + self.verification_status = Some(verification_status); + self + } + + pub fn verification_status(&self) -> Option<&String> { + self.verification_status.as_ref() + } + + pub fn reset_verification_status(&mut self) { + self.verification_status = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RpmUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/rpm_upstream_request.rs b/bindings/rust/src/src/models/rpm_upstream_request.rs new file mode 100644 index 00000000..cb4014e3 --- /dev/null +++ b/bindings/rust/src/src/models/rpm_upstream_request.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RpmUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The distribution version that packages found on this upstream will be associated with. + #[serde(rename = "distro_version")] + distro_version: String, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// When checked, source packages will be available from this upstream. + #[serde(rename = "include_sources")] + include_sources: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RpmUpstreamRequest { + pub fn new(distro_version: String, name: String, upstream_url: String) -> RpmUpstreamRequest { + RpmUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + distro_version: distro_version, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + include_sources: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> RpmUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> RpmUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> RpmUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_distro_version(&mut self, distro_version: String) { + self.distro_version = distro_version; + } + + pub fn with_distro_version(mut self, distro_version: String) -> RpmUpstreamRequest { + self.distro_version = distro_version; + self + } + + pub fn distro_version(&self) -> &String { + &self.distro_version + } + + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> RpmUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> RpmUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> RpmUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> RpmUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> RpmUpstreamRequest { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> RpmUpstreamRequest { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> RpmUpstreamRequest { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_include_sources(&mut self, include_sources: bool) { + self.include_sources = Some(include_sources); + } + + pub fn with_include_sources(mut self, include_sources: bool) -> RpmUpstreamRequest { + self.include_sources = Some(include_sources); + self + } + + pub fn include_sources(&self) -> Option<&bool> { + self.include_sources.as_ref() + } + + pub fn reset_include_sources(&mut self) { + self.include_sources = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RpmUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> RpmUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RpmUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> RpmUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> RpmUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RpmUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/rpm_upstream_request_patch.rs b/bindings/rust/src/src/models/rpm_upstream_request_patch.rs new file mode 100644 index 00000000..63ec77ff --- /dev/null +++ b/bindings/rust/src/src/models/rpm_upstream_request_patch.rs @@ -0,0 +1,406 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RpmUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The distribution version that packages found on this upstream will be associated with. + #[serde(rename = "distro_version")] + distro_version: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// A public GPG key to associate with packages found on this upstream. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_inline")] + gpg_key_inline: Option, + /// When provided, Cloudsmith will fetch, validate, and associate a public GPG key found at the provided URL. When using the Cloudsmith setup script, this GPG key will be automatically imported on your deployment machines to allow upstream packages to validate and install. + #[serde(rename = "gpg_key_url")] + gpg_key_url: Option, + /// The GPG signature verification mode for this upstream. + #[serde(rename = "gpg_verification")] + gpg_verification: Option, + /// When checked, source packages will be available from this upstream. + #[serde(rename = "include_sources")] + include_sources: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RpmUpstreamRequestPatch { + pub fn new() -> RpmUpstreamRequestPatch { + RpmUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + distro_version: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + gpg_key_inline: None, + gpg_key_url: None, + gpg_verification: None, + include_sources: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> RpmUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> RpmUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> RpmUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_distro_version(&mut self, distro_version: String) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: String) -> RpmUpstreamRequestPatch { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&String> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> RpmUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> RpmUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> RpmUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> RpmUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_gpg_key_inline(&mut self, gpg_key_inline: String) { + self.gpg_key_inline = Some(gpg_key_inline); + } + + pub fn with_gpg_key_inline(mut self, gpg_key_inline: String) -> RpmUpstreamRequestPatch { + self.gpg_key_inline = Some(gpg_key_inline); + self + } + + pub fn gpg_key_inline(&self) -> Option<&String> { + self.gpg_key_inline.as_ref() + } + + pub fn reset_gpg_key_inline(&mut self) { + self.gpg_key_inline = None; + } + + pub fn set_gpg_key_url(&mut self, gpg_key_url: String) { + self.gpg_key_url = Some(gpg_key_url); + } + + pub fn with_gpg_key_url(mut self, gpg_key_url: String) -> RpmUpstreamRequestPatch { + self.gpg_key_url = Some(gpg_key_url); + self + } + + pub fn gpg_key_url(&self) -> Option<&String> { + self.gpg_key_url.as_ref() + } + + pub fn reset_gpg_key_url(&mut self) { + self.gpg_key_url = None; + } + + pub fn set_gpg_verification(&mut self, gpg_verification: String) { + self.gpg_verification = Some(gpg_verification); + } + + pub fn with_gpg_verification(mut self, gpg_verification: String) -> RpmUpstreamRequestPatch { + self.gpg_verification = Some(gpg_verification); + self + } + + pub fn gpg_verification(&self) -> Option<&String> { + self.gpg_verification.as_ref() + } + + pub fn reset_gpg_verification(&mut self) { + self.gpg_verification = None; + } + + pub fn set_include_sources(&mut self, include_sources: bool) { + self.include_sources = Some(include_sources); + } + + pub fn with_include_sources(mut self, include_sources: bool) -> RpmUpstreamRequestPatch { + self.include_sources = Some(include_sources); + self + } + + pub fn include_sources(&self) -> Option<&bool> { + self.include_sources.as_ref() + } + + pub fn reset_include_sources(&mut self) { + self.include_sources = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RpmUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> RpmUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RpmUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> RpmUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> RpmUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RpmUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/ruby_package_upload.rs b/bindings/rust/src/src/models/ruby_package_upload.rs new file mode 100644 index 00000000..4a90c83c --- /dev/null +++ b/bindings/rust/src/src/models/ruby_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RubyPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl RubyPackageUpload { + pub fn new() -> RubyPackageUpload { + RubyPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> RubyPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> RubyPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> RubyPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> RubyPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> RubyPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> RubyPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> RubyPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> RubyPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> RubyPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> RubyPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> RubyPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> RubyPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> RubyPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> RubyPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> RubyPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> RubyPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> RubyPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> RubyPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> RubyPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> RubyPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> RubyPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> RubyPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> RubyPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> RubyPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> RubyPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> RubyPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> RubyPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> RubyPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> RubyPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> RubyPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> RubyPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> RubyPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> RubyPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> RubyPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> RubyPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> RubyPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> RubyPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> RubyPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> RubyPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RubyPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> RubyPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> RubyPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> RubyPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> RubyPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> RubyPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> RubyPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> RubyPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> RubyPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> RubyPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> RubyPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> RubyPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> RubyPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> RubyPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> RubyPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> RubyPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> RubyPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> RubyPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> RubyPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> RubyPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RubyPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> RubyPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> RubyPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> RubyPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> RubyPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> RubyPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> RubyPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> RubyPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> RubyPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> RubyPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> RubyPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> RubyPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> RubyPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> RubyPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> RubyPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> RubyPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> RubyPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> RubyPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> RubyPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> RubyPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> RubyPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/ruby_package_upload_request.rs b/bindings/rust/src/src/models/ruby_package_upload_request.rs new file mode 100644 index 00000000..b5c42cde --- /dev/null +++ b/bindings/rust/src/src/models/ruby_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RubyPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl RubyPackageUploadRequest { + pub fn new(package_file: String) -> RubyPackageUploadRequest { + RubyPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> RubyPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> RubyPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> RubyPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/ruby_upstream.rs b/bindings/rust/src/src/models/ruby_upstream.rs new file mode 100644 index 00000000..9139bb08 --- /dev/null +++ b/bindings/rust/src/src/models/ruby_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RubyUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RubyUpstream { + pub fn new(name: String, upstream_url: String) -> RubyUpstream { + RubyUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> RubyUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> RubyUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> RubyUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> RubyUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> RubyUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> RubyUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> RubyUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> RubyUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> RubyUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RubyUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> RubyUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RubyUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> RubyUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> RubyUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> RubyUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> RubyUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> RubyUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RubyUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/ruby_upstream_request.rs b/bindings/rust/src/src/models/ruby_upstream_request.rs new file mode 100644 index 00000000..b550c1cb --- /dev/null +++ b/bindings/rust/src/src/models/ruby_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RubyUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RubyUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> RubyUpstreamRequest { + RubyUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> RubyUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> RubyUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> RubyUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> RubyUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> RubyUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> RubyUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> RubyUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RubyUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> RubyUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> RubyUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> RubyUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> RubyUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RubyUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/ruby_upstream_request_patch.rs b/bindings/rust/src/src/models/ruby_upstream_request_patch.rs new file mode 100644 index 00000000..0d7dbfa3 --- /dev/null +++ b/bindings/rust/src/src/models/ruby_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct RubyUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl RubyUpstreamRequestPatch { + pub fn new() -> RubyUpstreamRequestPatch { + RubyUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> RubyUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> RubyUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> RubyUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> RubyUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> RubyUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> RubyUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> RubyUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> RubyUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> RubyUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> RubyUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> RubyUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> RubyUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> RubyUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/service.rs b/bindings/rust/src/src/models/service.rs new file mode 100644 index 00000000..d6c8cf3d --- /dev/null +++ b/bindings/rust/src/src/models/service.rs @@ -0,0 +1,231 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Service { + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "created_by")] + created_by: Option, + #[serde(rename = "created_by_url")] + created_by_url: Option, + /// The description of the service + #[serde(rename = "description")] + description: Option, + /// The API key of the service + #[serde(rename = "key")] + key: Option, + /// The time at which the API key will expire. This will only be populated if the Organization has an active API Key Policy. + #[serde(rename = "key_expires_at")] + key_expires_at: Option, + /// The name of the service + #[serde(rename = "name")] + name: String, + /// The role of the service. + #[serde(rename = "role")] + role: Option, + /// The slug of the service + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "teams")] + teams: Option> +} + +impl Service { + pub fn new(name: String) -> Service { + Service { + created_at: None, + created_by: None, + created_by_url: None, + description: None, + key: None, + key_expires_at: None, + name: name, + role: None, + slug: None, + teams: None + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> Service { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_created_by(&mut self, created_by: String) { + self.created_by = Some(created_by); + } + + pub fn with_created_by(mut self, created_by: String) -> Service { + self.created_by = Some(created_by); + self + } + + pub fn created_by(&self) -> Option<&String> { + self.created_by.as_ref() + } + + pub fn reset_created_by(&mut self) { + self.created_by = None; + } + + pub fn set_created_by_url(&mut self, created_by_url: String) { + self.created_by_url = Some(created_by_url); + } + + pub fn with_created_by_url(mut self, created_by_url: String) -> Service { + self.created_by_url = Some(created_by_url); + self + } + + pub fn created_by_url(&self) -> Option<&String> { + self.created_by_url.as_ref() + } + + pub fn reset_created_by_url(&mut self) { + self.created_by_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> Service { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_key(&mut self, key: String) { + self.key = Some(key); + } + + pub fn with_key(mut self, key: String) -> Service { + self.key = Some(key); + self + } + + pub fn key(&self) -> Option<&String> { + self.key.as_ref() + } + + pub fn reset_key(&mut self) { + self.key = None; + } + + pub fn set_key_expires_at(&mut self, key_expires_at: String) { + self.key_expires_at = Some(key_expires_at); + } + + pub fn with_key_expires_at(mut self, key_expires_at: String) -> Service { + self.key_expires_at = Some(key_expires_at); + self + } + + pub fn key_expires_at(&self) -> Option<&String> { + self.key_expires_at.as_ref() + } + + pub fn reset_key_expires_at(&mut self) { + self.key_expires_at = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> Service { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> Service { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> Service { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_teams(&mut self, teams: Vec<::models::ServiceTeams>) { + self.teams = Some(teams); + } + + pub fn with_teams(mut self, teams: Vec<::models::ServiceTeams>) -> Service { + self.teams = Some(teams); + self + } + + pub fn teams(&self) -> Option<&Vec<::models::ServiceTeams>> { + self.teams.as_ref() + } + + pub fn reset_teams(&mut self) { + self.teams = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/service_request.rs b/bindings/rust/src/src/models/service_request.rs new file mode 100644 index 00000000..2dd054fa --- /dev/null +++ b/bindings/rust/src/src/models/service_request.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ServiceRequest { + /// The description of the service + #[serde(rename = "description")] + description: Option, + /// The name of the service + #[serde(rename = "name")] + name: String, + /// The role of the service. + #[serde(rename = "role")] + role: Option, + #[serde(rename = "teams")] + teams: Option> +} + +impl ServiceRequest { + pub fn new(name: String) -> ServiceRequest { + ServiceRequest { + description: None, + name: name, + role: None, + teams: None + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> ServiceRequest { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> ServiceRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> ServiceRequest { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_teams(&mut self, teams: Vec<::models::ServiceTeams>) { + self.teams = Some(teams); + } + + pub fn with_teams(mut self, teams: Vec<::models::ServiceTeams>) -> ServiceRequest { + self.teams = Some(teams); + self + } + + pub fn teams(&self) -> Option<&Vec<::models::ServiceTeams>> { + self.teams.as_ref() + } + + pub fn reset_teams(&mut self) { + self.teams = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/service_request_patch.rs b/bindings/rust/src/src/models/service_request_patch.rs new file mode 100644 index 00000000..da4cca23 --- /dev/null +++ b/bindings/rust/src/src/models/service_request_patch.rs @@ -0,0 +1,111 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ServiceRequestPatch { + /// The description of the service + #[serde(rename = "description")] + description: Option, + /// The name of the service + #[serde(rename = "name")] + name: Option, + /// The role of the service. + #[serde(rename = "role")] + role: Option, + #[serde(rename = "teams")] + teams: Option> +} + +impl ServiceRequestPatch { + pub fn new() -> ServiceRequestPatch { + ServiceRequestPatch { + description: None, + name: None, + role: None, + teams: None + } + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> ServiceRequestPatch { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> ServiceRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> ServiceRequestPatch { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_teams(&mut self, teams: Vec<::models::ServiceTeams>) { + self.teams = Some(teams); + } + + pub fn with_teams(mut self, teams: Vec<::models::ServiceTeams>) -> ServiceRequestPatch { + self.teams = Some(teams); + self + } + + pub fn teams(&self) -> Option<&Vec<::models::ServiceTeams>> { + self.teams.as_ref() + } + + pub fn reset_teams(&mut self) { + self.teams = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/service_teams.rs b/bindings/rust/src/src/models/service_teams.rs new file mode 100644 index 00000000..ae2f287c --- /dev/null +++ b/bindings/rust/src/src/models/service_teams.rs @@ -0,0 +1,67 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct ServiceTeams { + /// The team role associated with the service + #[serde(rename = "role")] + role: Option, + /// The teams associated with the service + #[serde(rename = "slug")] + slug: String +} + +impl ServiceTeams { + pub fn new(slug: String) -> ServiceTeams { + ServiceTeams { + role: None, + slug: slug + } + } + + pub fn set_role(&mut self, role: String) { + self.role = Some(role); + } + + pub fn with_role(mut self, role: String) -> ServiceTeams { + self.role = Some(role); + self + } + + pub fn role(&self) -> Option<&String> { + self.role.as_ref() + } + + pub fn reset_role(&mut self) { + self.role = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = slug; + } + + pub fn with_slug(mut self, slug: String) -> ServiceTeams { + self.slug = slug; + self + } + + pub fn slug(&self) -> &String { + &self.slug + } + + +} + + + diff --git a/bindings/rust/src/src/models/status_basic.rs b/bindings/rust/src/src/models/status_basic.rs new file mode 100644 index 00000000..47158c55 --- /dev/null +++ b/bindings/rust/src/src/models/status_basic.rs @@ -0,0 +1,70 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct StatusBasic { + /// The message describing the state of the API. + #[serde(rename = "detail")] + detail: Option, + /// The current version for the Cloudsmith service. + #[serde(rename = "version")] + version: Option +} + +impl StatusBasic { + pub fn new() -> StatusBasic { + StatusBasic { + detail: None, + version: None + } + } + + pub fn set_detail(&mut self, detail: String) { + self.detail = Some(detail); + } + + pub fn with_detail(mut self, detail: String) -> StatusBasic { + self.detail = Some(detail); + self + } + + pub fn detail(&self) -> Option<&String> { + self.detail.as_ref() + } + + pub fn reset_detail(&mut self) { + self.detail = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> StatusBasic { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/storage_allocated_limit.rs b/bindings/rust/src/src/models/storage_allocated_limit.rs new file mode 100644 index 00000000..b5b13790 --- /dev/null +++ b/bindings/rust/src/src/models/storage_allocated_limit.rs @@ -0,0 +1,128 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct StorageAllocatedLimit { + #[serde(rename = "configured")] + configured: Option, + #[serde(rename = "peak")] + peak: Option, + #[serde(rename = "percentage_used")] + percentage_used: Option, + #[serde(rename = "plan_limit")] + plan_limit: Option, + #[serde(rename = "used")] + used: Option +} + +impl StorageAllocatedLimit { + pub fn new() -> StorageAllocatedLimit { + StorageAllocatedLimit { + configured: None, + peak: None, + percentage_used: None, + plan_limit: None, + used: None + } + } + + pub fn set_configured(&mut self, configured: String) { + self.configured = Some(configured); + } + + pub fn with_configured(mut self, configured: String) -> StorageAllocatedLimit { + self.configured = Some(configured); + self + } + + pub fn configured(&self) -> Option<&String> { + self.configured.as_ref() + } + + pub fn reset_configured(&mut self) { + self.configured = None; + } + + pub fn set_peak(&mut self, peak: String) { + self.peak = Some(peak); + } + + pub fn with_peak(mut self, peak: String) -> StorageAllocatedLimit { + self.peak = Some(peak); + self + } + + pub fn peak(&self) -> Option<&String> { + self.peak.as_ref() + } + + pub fn reset_peak(&mut self) { + self.peak = None; + } + + pub fn set_percentage_used(&mut self, percentage_used: String) { + self.percentage_used = Some(percentage_used); + } + + pub fn with_percentage_used(mut self, percentage_used: String) -> StorageAllocatedLimit { + self.percentage_used = Some(percentage_used); + self + } + + pub fn percentage_used(&self) -> Option<&String> { + self.percentage_used.as_ref() + } + + pub fn reset_percentage_used(&mut self) { + self.percentage_used = None; + } + + pub fn set_plan_limit(&mut self, plan_limit: String) { + self.plan_limit = Some(plan_limit); + } + + pub fn with_plan_limit(mut self, plan_limit: String) -> StorageAllocatedLimit { + self.plan_limit = Some(plan_limit); + self + } + + pub fn plan_limit(&self) -> Option<&String> { + self.plan_limit.as_ref() + } + + pub fn reset_plan_limit(&mut self) { + self.plan_limit = None; + } + + pub fn set_used(&mut self, used: String) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: String) -> StorageAllocatedLimit { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&String> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/storage_allocated_limit_raw.rs b/bindings/rust/src/src/models/storage_allocated_limit_raw.rs new file mode 100644 index 00000000..ed6bcf24 --- /dev/null +++ b/bindings/rust/src/src/models/storage_allocated_limit_raw.rs @@ -0,0 +1,128 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct StorageAllocatedLimitRaw { + #[serde(rename = "configured")] + configured: Option, + #[serde(rename = "peak")] + peak: Option, + #[serde(rename = "percentage_used")] + percentage_used: Option, + #[serde(rename = "plan_limit")] + plan_limit: Option, + #[serde(rename = "used")] + used: Option +} + +impl StorageAllocatedLimitRaw { + pub fn new() -> StorageAllocatedLimitRaw { + StorageAllocatedLimitRaw { + configured: None, + peak: None, + percentage_used: None, + plan_limit: None, + used: None + } + } + + pub fn set_configured(&mut self, configured: i32) { + self.configured = Some(configured); + } + + pub fn with_configured(mut self, configured: i32) -> StorageAllocatedLimitRaw { + self.configured = Some(configured); + self + } + + pub fn configured(&self) -> Option<&i32> { + self.configured.as_ref() + } + + pub fn reset_configured(&mut self) { + self.configured = None; + } + + pub fn set_peak(&mut self, peak: i32) { + self.peak = Some(peak); + } + + pub fn with_peak(mut self, peak: i32) -> StorageAllocatedLimitRaw { + self.peak = Some(peak); + self + } + + pub fn peak(&self) -> Option<&i32> { + self.peak.as_ref() + } + + pub fn reset_peak(&mut self) { + self.peak = None; + } + + pub fn set_percentage_used(&mut self, percentage_used: String) { + self.percentage_used = Some(percentage_used); + } + + pub fn with_percentage_used(mut self, percentage_used: String) -> StorageAllocatedLimitRaw { + self.percentage_used = Some(percentage_used); + self + } + + pub fn percentage_used(&self) -> Option<&String> { + self.percentage_used.as_ref() + } + + pub fn reset_percentage_used(&mut self) { + self.percentage_used = None; + } + + pub fn set_plan_limit(&mut self, plan_limit: i32) { + self.plan_limit = Some(plan_limit); + } + + pub fn with_plan_limit(mut self, plan_limit: i32) -> StorageAllocatedLimitRaw { + self.plan_limit = Some(plan_limit); + self + } + + pub fn plan_limit(&self) -> Option<&i32> { + self.plan_limit.as_ref() + } + + pub fn reset_plan_limit(&mut self) { + self.plan_limit = None; + } + + pub fn set_used(&mut self, used: i32) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: i32) -> StorageAllocatedLimitRaw { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&i32> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/storage_region.rs b/bindings/rust/src/src/models/storage_region.rs new file mode 100644 index 00000000..69b6e6a7 --- /dev/null +++ b/bindings/rust/src/src/models/storage_region.rs @@ -0,0 +1,64 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct StorageRegion { + /// Name of the storage region + #[serde(rename = "label")] + label: String, + /// Slug for the storage region + #[serde(rename = "slug")] + slug: String +} + +impl StorageRegion { + pub fn new(label: String, slug: String) -> StorageRegion { + StorageRegion { + label: label, + slug: slug + } + } + + pub fn set_label(&mut self, label: String) { + self.label = label; + } + + pub fn with_label(mut self, label: String) -> StorageRegion { + self.label = label; + self + } + + pub fn label(&self) -> &String { + &self.label + } + + + pub fn set_slug(&mut self, slug: String) { + self.slug = slug; + } + + pub fn with_slug(mut self, slug: String) -> StorageRegion { + self.slug = slug; + self + } + + pub fn slug(&self) -> &String { + &self.slug + } + + +} + + + diff --git a/bindings/rust/src/src/models/storage_usage.rs b/bindings/rust/src/src/models/storage_usage.rs new file mode 100644 index 00000000..db794ad7 --- /dev/null +++ b/bindings/rust/src/src/models/storage_usage.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct StorageUsage { + #[serde(rename = "limit")] + limit: Option, + #[serde(rename = "peak")] + peak: Option, + #[serde(rename = "percentage")] + percentage: Option, + #[serde(rename = "used")] + used: Option +} + +impl StorageUsage { + pub fn new() -> StorageUsage { + StorageUsage { + limit: None, + peak: None, + percentage: None, + used: None + } + } + + pub fn set_limit(&mut self, limit: String) { + self.limit = Some(limit); + } + + pub fn with_limit(mut self, limit: String) -> StorageUsage { + self.limit = Some(limit); + self + } + + pub fn limit(&self) -> Option<&String> { + self.limit.as_ref() + } + + pub fn reset_limit(&mut self) { + self.limit = None; + } + + pub fn set_peak(&mut self, peak: String) { + self.peak = Some(peak); + } + + pub fn with_peak(mut self, peak: String) -> StorageUsage { + self.peak = Some(peak); + self + } + + pub fn peak(&self) -> Option<&String> { + self.peak.as_ref() + } + + pub fn reset_peak(&mut self) { + self.peak = None; + } + + pub fn set_percentage(&mut self, percentage: String) { + self.percentage = Some(percentage); + } + + pub fn with_percentage(mut self, percentage: String) -> StorageUsage { + self.percentage = Some(percentage); + self + } + + pub fn percentage(&self) -> Option<&String> { + self.percentage.as_ref() + } + + pub fn reset_percentage(&mut self) { + self.percentage = None; + } + + pub fn set_used(&mut self, used: String) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: String) -> StorageUsage { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&String> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/storage_usage_raw.rs b/bindings/rust/src/src/models/storage_usage_raw.rs new file mode 100644 index 00000000..d64b3311 --- /dev/null +++ b/bindings/rust/src/src/models/storage_usage_raw.rs @@ -0,0 +1,108 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct StorageUsageRaw { + #[serde(rename = "limit")] + limit: Option, + #[serde(rename = "peak")] + peak: Option, + #[serde(rename = "percentage")] + percentage: Option, + #[serde(rename = "used")] + used: Option +} + +impl StorageUsageRaw { + pub fn new() -> StorageUsageRaw { + StorageUsageRaw { + limit: None, + peak: None, + percentage: None, + used: None + } + } + + pub fn set_limit(&mut self, limit: i32) { + self.limit = Some(limit); + } + + pub fn with_limit(mut self, limit: i32) -> StorageUsageRaw { + self.limit = Some(limit); + self + } + + pub fn limit(&self) -> Option<&i32> { + self.limit.as_ref() + } + + pub fn reset_limit(&mut self) { + self.limit = None; + } + + pub fn set_peak(&mut self, peak: i32) { + self.peak = Some(peak); + } + + pub fn with_peak(mut self, peak: i32) -> StorageUsageRaw { + self.peak = Some(peak); + self + } + + pub fn peak(&self) -> Option<&i32> { + self.peak.as_ref() + } + + pub fn reset_peak(&mut self) { + self.peak = None; + } + + pub fn set_percentage(&mut self, percentage: String) { + self.percentage = Some(percentage); + } + + pub fn with_percentage(mut self, percentage: String) -> StorageUsageRaw { + self.percentage = Some(percentage); + self + } + + pub fn percentage(&self) -> Option<&String> { + self.percentage.as_ref() + } + + pub fn reset_percentage(&mut self) { + self.percentage = None; + } + + pub fn set_used(&mut self, used: i32) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: i32) -> StorageUsageRaw { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&i32> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/swift_package_upload.rs b/bindings/rust/src/src/models/swift_package_upload.rs new file mode 100644 index 00000000..3ea5578e --- /dev/null +++ b/bindings/rust/src/src/models/swift_package_upload.rs @@ -0,0 +1,1751 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct SwiftPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + /// The name of the author of the package. + #[serde(rename = "author_name")] + author_name: Option, + /// The organization of the author. + #[serde(rename = "author_org")] + author_org: Option, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The license URL of this package. + #[serde(rename = "license_url")] + license_url: Option, + /// The name of this package. + #[serde(rename = "name")] + name: String, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The URL of the readme for the package. + #[serde(rename = "readme_url")] + readme_url: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + /// The URL of the SCM repository for the package. + #[serde(rename = "repository_url")] + repository_url: Option, + /// A scope provides a namespace for related packages within the package registry. + #[serde(rename = "scope")] + scope: String, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: String, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl SwiftPackageUpload { + pub fn new(name: String, scope: String, version: String) -> SwiftPackageUpload { + SwiftPackageUpload { + architectures: None, + author_name: None, + author_org: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + license_url: None, + name: name, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + readme_url: None, + release: None, + repository: None, + repository_url: None, + scope: scope, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: version, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> SwiftPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_author_name(&mut self, author_name: String) { + self.author_name = Some(author_name); + } + + pub fn with_author_name(mut self, author_name: String) -> SwiftPackageUpload { + self.author_name = Some(author_name); + self + } + + pub fn author_name(&self) -> Option<&String> { + self.author_name.as_ref() + } + + pub fn reset_author_name(&mut self) { + self.author_name = None; + } + + pub fn set_author_org(&mut self, author_org: String) { + self.author_org = Some(author_org); + } + + pub fn with_author_org(mut self, author_org: String) -> SwiftPackageUpload { + self.author_org = Some(author_org); + self + } + + pub fn author_org(&self) -> Option<&String> { + self.author_org.as_ref() + } + + pub fn reset_author_org(&mut self) { + self.author_org = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> SwiftPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> SwiftPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> SwiftPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> SwiftPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> SwiftPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> SwiftPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> SwiftPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> SwiftPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> SwiftPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> SwiftPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> SwiftPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> SwiftPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> SwiftPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> SwiftPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> SwiftPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> SwiftPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> SwiftPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> SwiftPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> SwiftPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> SwiftPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> SwiftPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> SwiftPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> SwiftPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> SwiftPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> SwiftPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> SwiftPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> SwiftPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> SwiftPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> SwiftPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> SwiftPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> SwiftPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> SwiftPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> SwiftPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> SwiftPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> SwiftPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> SwiftPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> SwiftPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> SwiftPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_license_url(&mut self, license_url: String) { + self.license_url = Some(license_url); + } + + pub fn with_license_url(mut self, license_url: String) -> SwiftPackageUpload { + self.license_url = Some(license_url); + self + } + + pub fn license_url(&self) -> Option<&String> { + self.license_url.as_ref() + } + + pub fn reset_license_url(&mut self) { + self.license_url = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> SwiftPackageUpload { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> SwiftPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> SwiftPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> SwiftPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> SwiftPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> SwiftPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> SwiftPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> SwiftPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_readme_url(&mut self, readme_url: String) { + self.readme_url = Some(readme_url); + } + + pub fn with_readme_url(mut self, readme_url: String) -> SwiftPackageUpload { + self.readme_url = Some(readme_url); + self + } + + pub fn readme_url(&self) -> Option<&String> { + self.readme_url.as_ref() + } + + pub fn reset_readme_url(&mut self) { + self.readme_url = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> SwiftPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> SwiftPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> SwiftPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_scope(&mut self, scope: String) { + self.scope = scope; + } + + pub fn with_scope(mut self, scope: String) -> SwiftPackageUpload { + self.scope = scope; + self + } + + pub fn scope(&self) -> &String { + &self.scope + } + + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> SwiftPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> SwiftPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> SwiftPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> SwiftPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> SwiftPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> SwiftPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> SwiftPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> SwiftPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> SwiftPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> SwiftPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> SwiftPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> SwiftPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> SwiftPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> SwiftPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> SwiftPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> SwiftPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> SwiftPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> SwiftPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> SwiftPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> SwiftPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> SwiftPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> SwiftPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> SwiftPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> SwiftPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> SwiftPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> SwiftPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> SwiftPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = version; + } + + pub fn with_version(mut self, version: String) -> SwiftPackageUpload { + self.version = version; + self + } + + pub fn version(&self) -> &String { + &self.version + } + + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> SwiftPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> SwiftPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/swift_package_upload_request.rs b/bindings/rust/src/src/models/swift_package_upload_request.rs new file mode 100644 index 00000000..adb43261 --- /dev/null +++ b/bindings/rust/src/src/models/swift_package_upload_request.rs @@ -0,0 +1,247 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct SwiftPackageUploadRequest { + /// The name of the author of the package. + #[serde(rename = "author_name")] + author_name: Option, + /// The organization of the author. + #[serde(rename = "author_org")] + author_org: Option, + /// The license URL of this package. + #[serde(rename = "license_url")] + license_url: Option, + /// The name of this package. + #[serde(rename = "name")] + name: String, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// The URL of the readme for the package. + #[serde(rename = "readme_url")] + readme_url: Option, + /// The URL of the SCM repository for the package. + #[serde(rename = "repository_url")] + repository_url: Option, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A scope provides a namespace for related packages within the package registry. + #[serde(rename = "scope")] + scope: String, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: String +} + +impl SwiftPackageUploadRequest { + pub fn new(name: String, package_file: String, scope: String, version: String) -> SwiftPackageUploadRequest { + SwiftPackageUploadRequest { + author_name: None, + author_org: None, + license_url: None, + name: name, + package_file: package_file, + readme_url: None, + repository_url: None, + republish: None, + scope: scope, + tags: None, + version: version + } + } + + pub fn set_author_name(&mut self, author_name: String) { + self.author_name = Some(author_name); + } + + pub fn with_author_name(mut self, author_name: String) -> SwiftPackageUploadRequest { + self.author_name = Some(author_name); + self + } + + pub fn author_name(&self) -> Option<&String> { + self.author_name.as_ref() + } + + pub fn reset_author_name(&mut self) { + self.author_name = None; + } + + pub fn set_author_org(&mut self, author_org: String) { + self.author_org = Some(author_org); + } + + pub fn with_author_org(mut self, author_org: String) -> SwiftPackageUploadRequest { + self.author_org = Some(author_org); + self + } + + pub fn author_org(&self) -> Option<&String> { + self.author_org.as_ref() + } + + pub fn reset_author_org(&mut self) { + self.author_org = None; + } + + pub fn set_license_url(&mut self, license_url: String) { + self.license_url = Some(license_url); + } + + pub fn with_license_url(mut self, license_url: String) -> SwiftPackageUploadRequest { + self.license_url = Some(license_url); + self + } + + pub fn license_url(&self) -> Option<&String> { + self.license_url.as_ref() + } + + pub fn reset_license_url(&mut self) { + self.license_url = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> SwiftPackageUploadRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> SwiftPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_readme_url(&mut self, readme_url: String) { + self.readme_url = Some(readme_url); + } + + pub fn with_readme_url(mut self, readme_url: String) -> SwiftPackageUploadRequest { + self.readme_url = Some(readme_url); + self + } + + pub fn readme_url(&self) -> Option<&String> { + self.readme_url.as_ref() + } + + pub fn reset_readme_url(&mut self) { + self.readme_url = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> SwiftPackageUploadRequest { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> SwiftPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_scope(&mut self, scope: String) { + self.scope = scope; + } + + pub fn with_scope(mut self, scope: String) -> SwiftPackageUploadRequest { + self.scope = scope; + self + } + + pub fn scope(&self) -> &String { + &self.scope + } + + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> SwiftPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = version; + } + + pub fn with_version(mut self, version: String) -> SwiftPackageUploadRequest { + self.version = version; + self + } + + pub fn version(&self) -> &String { + &self.version + } + + +} + + + diff --git a/bindings/rust/src/src/models/swift_upstream.rs b/bindings/rust/src/src/models/swift_upstream.rs new file mode 100644 index 00000000..9e135501 --- /dev/null +++ b/bindings/rust/src/src/models/swift_upstream.rs @@ -0,0 +1,397 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct SwiftUpstream { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The datetime the upstream source was created. + #[serde(rename = "created_at")] + created_at: Option, + #[serde(rename = "disable_reason")] + disable_reason: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// When true, this upstream source is pending validation. + #[serde(rename = "pending_validation")] + pending_validation: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + #[serde(rename = "updated_at")] + updated_at: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl SwiftUpstream { + pub fn new(name: String, upstream_url: String) -> SwiftUpstream { + SwiftUpstream { + auth_mode: None, + auth_secret: None, + auth_username: None, + created_at: None, + disable_reason: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + pending_validation: None, + priority: None, + slug_perm: None, + updated_at: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> SwiftUpstream { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> SwiftUpstream { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> SwiftUpstream { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> SwiftUpstream { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_disable_reason(&mut self, disable_reason: String) { + self.disable_reason = Some(disable_reason); + } + + pub fn with_disable_reason(mut self, disable_reason: String) -> SwiftUpstream { + self.disable_reason = Some(disable_reason); + self + } + + pub fn disable_reason(&self) -> Option<&String> { + self.disable_reason.as_ref() + } + + pub fn reset_disable_reason(&mut self) { + self.disable_reason = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> SwiftUpstream { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> SwiftUpstream { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> SwiftUpstream { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> SwiftUpstream { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> SwiftUpstream { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> SwiftUpstream { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> SwiftUpstream { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_pending_validation(&mut self, pending_validation: bool) { + self.pending_validation = Some(pending_validation); + } + + pub fn with_pending_validation(mut self, pending_validation: bool) -> SwiftUpstream { + self.pending_validation = Some(pending_validation); + self + } + + pub fn pending_validation(&self) -> Option<&bool> { + self.pending_validation.as_ref() + } + + pub fn reset_pending_validation(&mut self) { + self.pending_validation = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> SwiftUpstream { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> SwiftUpstream { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_updated_at(&mut self, updated_at: String) { + self.updated_at = Some(updated_at); + } + + pub fn with_updated_at(mut self, updated_at: String) -> SwiftUpstream { + self.updated_at = Some(updated_at); + self + } + + pub fn updated_at(&self) -> Option<&String> { + self.updated_at.as_ref() + } + + pub fn reset_updated_at(&mut self) { + self.updated_at = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> SwiftUpstream { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> SwiftUpstream { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/swift_upstream_request.rs b/bindings/rust/src/src/models/swift_upstream_request.rs new file mode 100644 index 00000000..44f94481 --- /dev/null +++ b/bindings/rust/src/src/models/swift_upstream_request.rs @@ -0,0 +1,295 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct SwiftUpstreamRequest { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: String, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: String, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl SwiftUpstreamRequest { + pub fn new(name: String, upstream_url: String) -> SwiftUpstreamRequest { + SwiftUpstreamRequest { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: name, + priority: None, + upstream_url: upstream_url, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> SwiftUpstreamRequest { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> SwiftUpstreamRequest { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> SwiftUpstreamRequest { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> SwiftUpstreamRequest { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> SwiftUpstreamRequest { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> SwiftUpstreamRequest { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> SwiftUpstreamRequest { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> SwiftUpstreamRequest { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> SwiftUpstreamRequest { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> SwiftUpstreamRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> SwiftUpstreamRequest { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = upstream_url; + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> SwiftUpstreamRequest { + self.upstream_url = upstream_url; + self + } + + pub fn upstream_url(&self) -> &String { + &self.upstream_url + } + + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> SwiftUpstreamRequest { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/swift_upstream_request_patch.rs b/bindings/rust/src/src/models/swift_upstream_request_patch.rs new file mode 100644 index 00000000..2f7c47ac --- /dev/null +++ b/bindings/rust/src/src/models/swift_upstream_request_patch.rs @@ -0,0 +1,301 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct SwiftUpstreamRequestPatch { + /// The authentication mode to use when accessing this upstream. + #[serde(rename = "auth_mode")] + auth_mode: Option, + /// Secret to provide with requests to upstream. + #[serde(rename = "auth_secret")] + auth_secret: Option, + /// Username to provide with requests to upstream. + #[serde(rename = "auth_username")] + auth_username: Option, + /// The key for extra header #1 to send to upstream. + #[serde(rename = "extra_header_1")] + extra_header_1: Option, + /// The key for extra header #2 to send to upstream. + #[serde(rename = "extra_header_2")] + extra_header_2: Option, + /// The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_1")] + extra_value_1: Option, + /// The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted. + #[serde(rename = "extra_value_2")] + extra_value_2: Option, + /// Whether or not this upstream is active and ready for requests. + #[serde(rename = "is_active")] + is_active: Option, + /// The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode. + #[serde(rename = "mode")] + mode: Option, + /// A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream. + #[serde(rename = "name")] + name: Option, + /// Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date. + #[serde(rename = "priority")] + priority: Option, + /// The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository. + #[serde(rename = "upstream_url")] + upstream_url: Option, + /// If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams. + #[serde(rename = "verify_ssl")] + verify_ssl: Option +} + +impl SwiftUpstreamRequestPatch { + pub fn new() -> SwiftUpstreamRequestPatch { + SwiftUpstreamRequestPatch { + auth_mode: None, + auth_secret: None, + auth_username: None, + extra_header_1: None, + extra_header_2: None, + extra_value_1: None, + extra_value_2: None, + is_active: None, + mode: None, + name: None, + priority: None, + upstream_url: None, + verify_ssl: None + } + } + + pub fn set_auth_mode(&mut self, auth_mode: String) { + self.auth_mode = Some(auth_mode); + } + + pub fn with_auth_mode(mut self, auth_mode: String) -> SwiftUpstreamRequestPatch { + self.auth_mode = Some(auth_mode); + self + } + + pub fn auth_mode(&self) -> Option<&String> { + self.auth_mode.as_ref() + } + + pub fn reset_auth_mode(&mut self) { + self.auth_mode = None; + } + + pub fn set_auth_secret(&mut self, auth_secret: String) { + self.auth_secret = Some(auth_secret); + } + + pub fn with_auth_secret(mut self, auth_secret: String) -> SwiftUpstreamRequestPatch { + self.auth_secret = Some(auth_secret); + self + } + + pub fn auth_secret(&self) -> Option<&String> { + self.auth_secret.as_ref() + } + + pub fn reset_auth_secret(&mut self) { + self.auth_secret = None; + } + + pub fn set_auth_username(&mut self, auth_username: String) { + self.auth_username = Some(auth_username); + } + + pub fn with_auth_username(mut self, auth_username: String) -> SwiftUpstreamRequestPatch { + self.auth_username = Some(auth_username); + self + } + + pub fn auth_username(&self) -> Option<&String> { + self.auth_username.as_ref() + } + + pub fn reset_auth_username(&mut self) { + self.auth_username = None; + } + + pub fn set_extra_header_1(&mut self, extra_header_1: String) { + self.extra_header_1 = Some(extra_header_1); + } + + pub fn with_extra_header_1(mut self, extra_header_1: String) -> SwiftUpstreamRequestPatch { + self.extra_header_1 = Some(extra_header_1); + self + } + + pub fn extra_header_1(&self) -> Option<&String> { + self.extra_header_1.as_ref() + } + + pub fn reset_extra_header_1(&mut self) { + self.extra_header_1 = None; + } + + pub fn set_extra_header_2(&mut self, extra_header_2: String) { + self.extra_header_2 = Some(extra_header_2); + } + + pub fn with_extra_header_2(mut self, extra_header_2: String) -> SwiftUpstreamRequestPatch { + self.extra_header_2 = Some(extra_header_2); + self + } + + pub fn extra_header_2(&self) -> Option<&String> { + self.extra_header_2.as_ref() + } + + pub fn reset_extra_header_2(&mut self) { + self.extra_header_2 = None; + } + + pub fn set_extra_value_1(&mut self, extra_value_1: String) { + self.extra_value_1 = Some(extra_value_1); + } + + pub fn with_extra_value_1(mut self, extra_value_1: String) -> SwiftUpstreamRequestPatch { + self.extra_value_1 = Some(extra_value_1); + self + } + + pub fn extra_value_1(&self) -> Option<&String> { + self.extra_value_1.as_ref() + } + + pub fn reset_extra_value_1(&mut self) { + self.extra_value_1 = None; + } + + pub fn set_extra_value_2(&mut self, extra_value_2: String) { + self.extra_value_2 = Some(extra_value_2); + } + + pub fn with_extra_value_2(mut self, extra_value_2: String) -> SwiftUpstreamRequestPatch { + self.extra_value_2 = Some(extra_value_2); + self + } + + pub fn extra_value_2(&self) -> Option<&String> { + self.extra_value_2.as_ref() + } + + pub fn reset_extra_value_2(&mut self) { + self.extra_value_2 = None; + } + + pub fn set_is_active(&mut self, is_active: bool) { + self.is_active = Some(is_active); + } + + pub fn with_is_active(mut self, is_active: bool) -> SwiftUpstreamRequestPatch { + self.is_active = Some(is_active); + self + } + + pub fn is_active(&self) -> Option<&bool> { + self.is_active.as_ref() + } + + pub fn reset_is_active(&mut self) { + self.is_active = None; + } + + pub fn set_mode(&mut self, mode: String) { + self.mode = Some(mode); + } + + pub fn with_mode(mut self, mode: String) -> SwiftUpstreamRequestPatch { + self.mode = Some(mode); + self + } + + pub fn mode(&self) -> Option<&String> { + self.mode.as_ref() + } + + pub fn reset_mode(&mut self) { + self.mode = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> SwiftUpstreamRequestPatch { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_priority(&mut self, priority: i32) { + self.priority = Some(priority); + } + + pub fn with_priority(mut self, priority: i32) -> SwiftUpstreamRequestPatch { + self.priority = Some(priority); + self + } + + pub fn priority(&self) -> Option<&i32> { + self.priority.as_ref() + } + + pub fn reset_priority(&mut self) { + self.priority = None; + } + + pub fn set_upstream_url(&mut self, upstream_url: String) { + self.upstream_url = Some(upstream_url); + } + + pub fn with_upstream_url(mut self, upstream_url: String) -> SwiftUpstreamRequestPatch { + self.upstream_url = Some(upstream_url); + self + } + + pub fn upstream_url(&self) -> Option<&String> { + self.upstream_url.as_ref() + } + + pub fn reset_upstream_url(&mut self) { + self.upstream_url = None; + } + + pub fn set_verify_ssl(&mut self, verify_ssl: bool) { + self.verify_ssl = Some(verify_ssl); + } + + pub fn with_verify_ssl(mut self, verify_ssl: bool) -> SwiftUpstreamRequestPatch { + self.verify_ssl = Some(verify_ssl); + self + } + + pub fn verify_ssl(&self) -> Option<&bool> { + self.verify_ssl.as_ref() + } + + pub fn reset_verify_ssl(&mut self) { + self.verify_ssl = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/tags.rs b/bindings/rust/src/src/models/tags.rs new file mode 100644 index 00000000..a8cc890f --- /dev/null +++ b/bindings/rust/src/src/models/tags.rs @@ -0,0 +1,30 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +/// Tags : All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Tags { +} + +impl Tags { + /// All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. + pub fn new() -> Tags { + Tags { + } + } + +} + + + diff --git a/bindings/rust/src/src/models/terraform_package_upload.rs b/bindings/rust/src/src/models/terraform_package_upload.rs new file mode 100644 index 00000000..9082e27e --- /dev/null +++ b/bindings/rust/src/src/models/terraform_package_upload.rs @@ -0,0 +1,1654 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct TerraformPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: Option, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: Option, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl TerraformPackageUpload { + pub fn new() -> TerraformPackageUpload { + TerraformPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: None, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: None, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> TerraformPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> TerraformPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> TerraformPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> TerraformPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> TerraformPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> TerraformPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> TerraformPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> TerraformPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> TerraformPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> TerraformPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> TerraformPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> TerraformPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> TerraformPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> TerraformPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> TerraformPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> TerraformPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> TerraformPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> TerraformPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> TerraformPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> TerraformPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> TerraformPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> TerraformPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> TerraformPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> TerraformPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> TerraformPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> TerraformPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> TerraformPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> TerraformPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> TerraformPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> TerraformPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> TerraformPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> TerraformPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> TerraformPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> TerraformPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> TerraformPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> TerraformPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> TerraformPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> TerraformPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> TerraformPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> TerraformPackageUpload { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> TerraformPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> TerraformPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> TerraformPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> TerraformPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> TerraformPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> TerraformPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> TerraformPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> TerraformPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> TerraformPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> TerraformPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> TerraformPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> TerraformPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> TerraformPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> TerraformPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> TerraformPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> TerraformPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> TerraformPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> TerraformPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> TerraformPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> TerraformPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> TerraformPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> TerraformPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> TerraformPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> TerraformPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> TerraformPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> TerraformPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> TerraformPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> TerraformPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> TerraformPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> TerraformPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> TerraformPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> TerraformPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> TerraformPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> TerraformPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> TerraformPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> TerraformPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> TerraformPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> TerraformPackageUpload { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> TerraformPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> TerraformPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/terraform_package_upload_request.rs b/bindings/rust/src/src/models/terraform_package_upload_request.rs new file mode 100644 index 00000000..7da47106 --- /dev/null +++ b/bindings/rust/src/src/models/terraform_package_upload_request.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct TerraformPackageUploadRequest { + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option +} + +impl TerraformPackageUploadRequest { + pub fn new(package_file: String) -> TerraformPackageUploadRequest { + TerraformPackageUploadRequest { + package_file: package_file, + republish: None, + tags: None + } + } + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> TerraformPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> TerraformPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> TerraformPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/usage.rs b/bindings/rust/src/src/models/usage.rs new file mode 100644 index 00000000..f682b7fa --- /dev/null +++ b/bindings/rust/src/src/models/usage.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Usage { + #[serde(rename = "limit")] + limit: Option, + #[serde(rename = "percentage")] + percentage: Option, + #[serde(rename = "used")] + used: Option +} + +impl Usage { + pub fn new() -> Usage { + Usage { + limit: None, + percentage: None, + used: None + } + } + + pub fn set_limit(&mut self, limit: String) { + self.limit = Some(limit); + } + + pub fn with_limit(mut self, limit: String) -> Usage { + self.limit = Some(limit); + self + } + + pub fn limit(&self) -> Option<&String> { + self.limit.as_ref() + } + + pub fn reset_limit(&mut self) { + self.limit = None; + } + + pub fn set_percentage(&mut self, percentage: String) { + self.percentage = Some(percentage); + } + + pub fn with_percentage(mut self, percentage: String) -> Usage { + self.percentage = Some(percentage); + self + } + + pub fn percentage(&self) -> Option<&String> { + self.percentage.as_ref() + } + + pub fn reset_percentage(&mut self) { + self.percentage = None; + } + + pub fn set_used(&mut self, used: String) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: String) -> Usage { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&String> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/usage_fieldset.rs b/bindings/rust/src/src/models/usage_fieldset.rs new file mode 100644 index 00000000..c75f8762 --- /dev/null +++ b/bindings/rust/src/src/models/usage_fieldset.rs @@ -0,0 +1,62 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UsageFieldset { + #[serde(rename = "display")] + display: ::models::UsageLimits, + #[serde(rename = "raw")] + raw: ::models::UsageLimitsRaw +} + +impl UsageFieldset { + pub fn new(display: ::models::UsageLimits, raw: ::models::UsageLimitsRaw) -> UsageFieldset { + UsageFieldset { + display: display, + raw: raw + } + } + + pub fn set_display(&mut self, display: ::models::UsageLimits) { + self.display = display; + } + + pub fn with_display(mut self, display: ::models::UsageLimits) -> UsageFieldset { + self.display = display; + self + } + + pub fn display(&self) -> &::models::UsageLimits { + &self.display + } + + + pub fn set_raw(&mut self, raw: ::models::UsageLimitsRaw) { + self.raw = raw; + } + + pub fn with_raw(mut self, raw: ::models::UsageLimitsRaw) -> UsageFieldset { + self.raw = raw; + self + } + + pub fn raw(&self) -> &::models::UsageLimitsRaw { + &self.raw + } + + +} + + + diff --git a/bindings/rust/src/src/models/usage_limits.rs b/bindings/rust/src/src/models/usage_limits.rs new file mode 100644 index 00000000..0e4c9442 --- /dev/null +++ b/bindings/rust/src/src/models/usage_limits.rs @@ -0,0 +1,62 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UsageLimits { + #[serde(rename = "bandwidth")] + bandwidth: ::models::AllocatedLimit, + #[serde(rename = "storage")] + storage: ::models::StorageAllocatedLimit +} + +impl UsageLimits { + pub fn new(bandwidth: ::models::AllocatedLimit, storage: ::models::StorageAllocatedLimit) -> UsageLimits { + UsageLimits { + bandwidth: bandwidth, + storage: storage + } + } + + pub fn set_bandwidth(&mut self, bandwidth: ::models::AllocatedLimit) { + self.bandwidth = bandwidth; + } + + pub fn with_bandwidth(mut self, bandwidth: ::models::AllocatedLimit) -> UsageLimits { + self.bandwidth = bandwidth; + self + } + + pub fn bandwidth(&self) -> &::models::AllocatedLimit { + &self.bandwidth + } + + + pub fn set_storage(&mut self, storage: ::models::StorageAllocatedLimit) { + self.storage = storage; + } + + pub fn with_storage(mut self, storage: ::models::StorageAllocatedLimit) -> UsageLimits { + self.storage = storage; + self + } + + pub fn storage(&self) -> &::models::StorageAllocatedLimit { + &self.storage + } + + +} + + + diff --git a/bindings/rust/src/src/models/usage_limits_raw.rs b/bindings/rust/src/src/models/usage_limits_raw.rs new file mode 100644 index 00000000..e1c35b8e --- /dev/null +++ b/bindings/rust/src/src/models/usage_limits_raw.rs @@ -0,0 +1,62 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UsageLimitsRaw { + #[serde(rename = "bandwidth")] + bandwidth: ::models::AllocatedLimitRaw, + #[serde(rename = "storage")] + storage: ::models::StorageAllocatedLimitRaw +} + +impl UsageLimitsRaw { + pub fn new(bandwidth: ::models::AllocatedLimitRaw, storage: ::models::StorageAllocatedLimitRaw) -> UsageLimitsRaw { + UsageLimitsRaw { + bandwidth: bandwidth, + storage: storage + } + } + + pub fn set_bandwidth(&mut self, bandwidth: ::models::AllocatedLimitRaw) { + self.bandwidth = bandwidth; + } + + pub fn with_bandwidth(mut self, bandwidth: ::models::AllocatedLimitRaw) -> UsageLimitsRaw { + self.bandwidth = bandwidth; + self + } + + pub fn bandwidth(&self) -> &::models::AllocatedLimitRaw { + &self.bandwidth + } + + + pub fn set_storage(&mut self, storage: ::models::StorageAllocatedLimitRaw) { + self.storage = storage; + } + + pub fn with_storage(mut self, storage: ::models::StorageAllocatedLimitRaw) -> UsageLimitsRaw { + self.storage = storage; + self + } + + pub fn storage(&self) -> &::models::StorageAllocatedLimitRaw { + &self.storage + } + + +} + + + diff --git a/bindings/rust/src/src/models/usage_raw.rs b/bindings/rust/src/src/models/usage_raw.rs new file mode 100644 index 00000000..a3ccbe98 --- /dev/null +++ b/bindings/rust/src/src/models/usage_raw.rs @@ -0,0 +1,88 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UsageRaw { + #[serde(rename = "limit")] + limit: Option, + #[serde(rename = "percentage")] + percentage: Option, + #[serde(rename = "used")] + used: Option +} + +impl UsageRaw { + pub fn new() -> UsageRaw { + UsageRaw { + limit: None, + percentage: None, + used: None + } + } + + pub fn set_limit(&mut self, limit: i32) { + self.limit = Some(limit); + } + + pub fn with_limit(mut self, limit: i32) -> UsageRaw { + self.limit = Some(limit); + self + } + + pub fn limit(&self) -> Option<&i32> { + self.limit.as_ref() + } + + pub fn reset_limit(&mut self) { + self.limit = None; + } + + pub fn set_percentage(&mut self, percentage: String) { + self.percentage = Some(percentage); + } + + pub fn with_percentage(mut self, percentage: String) -> UsageRaw { + self.percentage = Some(percentage); + self + } + + pub fn percentage(&self) -> Option<&String> { + self.percentage.as_ref() + } + + pub fn reset_percentage(&mut self) { + self.percentage = None; + } + + pub fn set_used(&mut self, used: i32) { + self.used = Some(used); + } + + pub fn with_used(mut self, used: i32) -> UsageRaw { + self.used = Some(used); + self + } + + pub fn used(&self) -> Option<&i32> { + self.used.as_ref() + } + + pub fn reset_used(&mut self) { + self.used = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/user_auth_token.rs b/bindings/rust/src/src/models/user_auth_token.rs new file mode 100644 index 00000000..b74cbe8c --- /dev/null +++ b/bindings/rust/src/src/models/user_auth_token.rs @@ -0,0 +1,49 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserAuthToken { + /// API token for the authenticated user + #[serde(rename = "token")] + token: Option +} + +impl UserAuthToken { + pub fn new() -> UserAuthToken { + UserAuthToken { + token: None + } + } + + pub fn set_token(&mut self, token: String) { + self.token = Some(token); + } + + pub fn with_token(mut self, token: String) -> UserAuthToken { + self.token = Some(token); + self + } + + pub fn token(&self) -> Option<&String> { + self.token.as_ref() + } + + pub fn reset_token(&mut self) { + self.token = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/user_auth_token_request.rs b/bindings/rust/src/src/models/user_auth_token_request.rs new file mode 100644 index 00000000..b7b3adc1 --- /dev/null +++ b/bindings/rust/src/src/models/user_auth_token_request.rs @@ -0,0 +1,70 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserAuthTokenRequest { + /// Email address to authenticate with + #[serde(rename = "email")] + email: Option, + /// Password to authenticate with + #[serde(rename = "password")] + password: Option +} + +impl UserAuthTokenRequest { + pub fn new() -> UserAuthTokenRequest { + UserAuthTokenRequest { + email: None, + password: None + } + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> UserAuthTokenRequest { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_password(&mut self, password: String) { + self.password = Some(password); + } + + pub fn with_password(mut self, password: String) -> UserAuthTokenRequest { + self.password = Some(password); + self + } + + pub fn password(&self) -> Option<&String> { + self.password.as_ref() + } + + pub fn reset_password(&mut self) { + self.password = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/user_brief.rs b/bindings/rust/src/src/models/user_brief.rs new file mode 100644 index 00000000..5cb9d930 --- /dev/null +++ b/bindings/rust/src/src/models/user_brief.rs @@ -0,0 +1,172 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserBrief { + /// If true then you're logged in as a user. + #[serde(rename = "authenticated")] + authenticated: Option, + /// Your email address that we use to contact you. This is only visible to you. + #[serde(rename = "email")] + email: Option, + /// The full name of the user (if any). + #[serde(rename = "name")] + name: Option, + /// The URL for the full profile of the user. + #[serde(rename = "profile_url")] + profile_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option +} + +impl UserBrief { + pub fn new() -> UserBrief { + UserBrief { + authenticated: None, + email: None, + name: None, + profile_url: None, + self_url: None, + slug: None, + slug_perm: None + } + } + + pub fn set_authenticated(&mut self, authenticated: bool) { + self.authenticated = Some(authenticated); + } + + pub fn with_authenticated(mut self, authenticated: bool) -> UserBrief { + self.authenticated = Some(authenticated); + self + } + + pub fn authenticated(&self) -> Option<&bool> { + self.authenticated.as_ref() + } + + pub fn reset_authenticated(&mut self) { + self.authenticated = None; + } + + pub fn set_email(&mut self, email: String) { + self.email = Some(email); + } + + pub fn with_email(mut self, email: String) -> UserBrief { + self.email = Some(email); + self + } + + pub fn email(&self) -> Option<&String> { + self.email.as_ref() + } + + pub fn reset_email(&mut self) { + self.email = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> UserBrief { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_profile_url(&mut self, profile_url: String) { + self.profile_url = Some(profile_url); + } + + pub fn with_profile_url(mut self, profile_url: String) -> UserBrief { + self.profile_url = Some(profile_url); + self + } + + pub fn profile_url(&self) -> Option<&String> { + self.profile_url.as_ref() + } + + pub fn reset_profile_url(&mut self) { + self.profile_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> UserBrief { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> UserBrief { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> UserBrief { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/user_profile.rs b/bindings/rust/src/src/models/user_profile.rs new file mode 100644 index 00000000..84b6ad12 --- /dev/null +++ b/bindings/rust/src/src/models/user_profile.rs @@ -0,0 +1,223 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserProfile { + #[serde(rename = "company")] + company: Option, + #[serde(rename = "first_name")] + first_name: String, + #[serde(rename = "job_title")] + job_title: Option, + #[serde(rename = "joined_at")] + joined_at: Option, + #[serde(rename = "last_name")] + last_name: String, + #[serde(rename = "name")] + name: Option, + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// Your tagline is a sentence about you. Make it funny. Make it professional. Either way, it's public and it represents who you are. + #[serde(rename = "tagline")] + tagline: Option, + #[serde(rename = "url")] + url: Option +} + +impl UserProfile { + pub fn new(first_name: String, last_name: String) -> UserProfile { + UserProfile { + company: None, + first_name: first_name, + job_title: None, + joined_at: None, + last_name: last_name, + name: None, + slug: None, + slug_perm: None, + tagline: None, + url: None + } + } + + pub fn set_company(&mut self, company: String) { + self.company = Some(company); + } + + pub fn with_company(mut self, company: String) -> UserProfile { + self.company = Some(company); + self + } + + pub fn company(&self) -> Option<&String> { + self.company.as_ref() + } + + pub fn reset_company(&mut self) { + self.company = None; + } + + pub fn set_first_name(&mut self, first_name: String) { + self.first_name = first_name; + } + + pub fn with_first_name(mut self, first_name: String) -> UserProfile { + self.first_name = first_name; + self + } + + pub fn first_name(&self) -> &String { + &self.first_name + } + + + pub fn set_job_title(&mut self, job_title: String) { + self.job_title = Some(job_title); + } + + pub fn with_job_title(mut self, job_title: String) -> UserProfile { + self.job_title = Some(job_title); + self + } + + pub fn job_title(&self) -> Option<&String> { + self.job_title.as_ref() + } + + pub fn reset_job_title(&mut self) { + self.job_title = None; + } + + pub fn set_joined_at(&mut self, joined_at: String) { + self.joined_at = Some(joined_at); + } + + pub fn with_joined_at(mut self, joined_at: String) -> UserProfile { + self.joined_at = Some(joined_at); + self + } + + pub fn joined_at(&self) -> Option<&String> { + self.joined_at.as_ref() + } + + pub fn reset_joined_at(&mut self) { + self.joined_at = None; + } + + pub fn set_last_name(&mut self, last_name: String) { + self.last_name = last_name; + } + + pub fn with_last_name(mut self, last_name: String) -> UserProfile { + self.last_name = last_name; + self + } + + pub fn last_name(&self) -> &String { + &self.last_name + } + + + pub fn set_name(&mut self, name: String) { + self.name = Some(name); + } + + pub fn with_name(mut self, name: String) -> UserProfile { + self.name = Some(name); + self + } + + pub fn name(&self) -> Option<&String> { + self.name.as_ref() + } + + pub fn reset_name(&mut self) { + self.name = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> UserProfile { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> UserProfile { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_tagline(&mut self, tagline: String) { + self.tagline = Some(tagline); + } + + pub fn with_tagline(mut self, tagline: String) -> UserProfile { + self.tagline = Some(tagline); + self + } + + pub fn tagline(&self) -> Option<&String> { + self.tagline.as_ref() + } + + pub fn reset_tagline(&mut self) { + self.tagline = None; + } + + pub fn set_url(&mut self, url: String) { + self.url = Some(url); + } + + pub fn with_url(mut self, url: String) -> UserProfile { + self.url = Some(url); + self + } + + pub fn url(&self) -> Option<&String> { + self.url.as_ref() + } + + pub fn reset_url(&mut self) { + self.url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/vagrant_package_upload.rs b/bindings/rust/src/src/models/vagrant_package_upload.rs new file mode 100644 index 00000000..6692266f --- /dev/null +++ b/bindings/rust/src/src/models/vagrant_package_upload.rs @@ -0,0 +1,1666 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct VagrantPackageUpload { + #[serde(rename = "architectures")] + architectures: Option>, + #[serde(rename = "cdn_url")] + cdn_url: Option, + #[serde(rename = "checksum_md5")] + checksum_md5: Option, + #[serde(rename = "checksum_sha1")] + checksum_sha1: Option, + #[serde(rename = "checksum_sha256")] + checksum_sha256: Option, + #[serde(rename = "checksum_sha512")] + checksum_sha512: Option, + /// A checksum of all of the package's dependencies. + #[serde(rename = "dependencies_checksum_md5")] + dependencies_checksum_md5: Option, + #[serde(rename = "dependencies_url")] + dependencies_url: Option, + /// A textual description of this package. + #[serde(rename = "description")] + description: Option, + #[serde(rename = "display_name")] + display_name: Option, + #[serde(rename = "distro")] + distro: Option<::models::Distribution>, + #[serde(rename = "distro_version")] + distro_version: Option<::models::DistributionVersion>, + #[serde(rename = "downloads")] + downloads: Option, + /// The epoch of the package version (if any). + #[serde(rename = "epoch")] + epoch: Option, + #[serde(rename = "extension")] + extension: Option, + #[serde(rename = "filename")] + filename: Option, + #[serde(rename = "files")] + files: Option>, + #[serde(rename = "format")] + format: Option, + #[serde(rename = "format_url")] + format_url: Option, + /// Amount of storage that will be freed if this package is deleted + #[serde(rename = "freeable_storage")] + freeable_storage: Option, + #[serde(rename = "fully_qualified_name")] + fully_qualified_name: Option, + /// Unique and permanent identifier for the package. + #[serde(rename = "identifier_perm")] + identifier_perm: Option, + /// Return a map of identifier field names and their values. + #[serde(rename = "identifiers")] + identifiers: Option<::std::collections::HashMap>, + #[serde(rename = "indexed")] + indexed: Option, + #[serde(rename = "is_cancellable")] + is_cancellable: Option, + #[serde(rename = "is_copyable")] + is_copyable: Option, + #[serde(rename = "is_deleteable")] + is_deleteable: Option, + #[serde(rename = "is_downloadable")] + is_downloadable: Option, + #[serde(rename = "is_moveable")] + is_moveable: Option, + #[serde(rename = "is_quarantinable")] + is_quarantinable: Option, + #[serde(rename = "is_quarantined")] + is_quarantined: Option, + #[serde(rename = "is_resyncable")] + is_resyncable: Option, + #[serde(rename = "is_security_scannable")] + is_security_scannable: Option, + #[serde(rename = "is_sync_awaiting")] + is_sync_awaiting: Option, + #[serde(rename = "is_sync_completed")] + is_sync_completed: Option, + #[serde(rename = "is_sync_failed")] + is_sync_failed: Option, + #[serde(rename = "is_sync_in_flight")] + is_sync_in_flight: Option, + #[serde(rename = "is_sync_in_progress")] + is_sync_in_progress: Option, + /// The license of this package. + #[serde(rename = "license")] + license: Option, + /// The name of this package. + #[serde(rename = "name")] + name: String, + #[serde(rename = "namespace")] + namespace: Option, + #[serde(rename = "namespace_url")] + namespace_url: Option, + #[serde(rename = "num_files")] + num_files: Option, + #[serde(rename = "origin_repository")] + origin_repository: Option, + #[serde(rename = "origin_repository_url")] + origin_repository_url: Option, + /// The type of package contents. + #[serde(rename = "package_type")] + package_type: Option, + /// Whether or not the package has violated any policy. + #[serde(rename = "policy_violated")] + policy_violated: Option, + /// The virtual machine provider for the box. + #[serde(rename = "provider")] + provider: String, + /// The release of the package version (if any). + #[serde(rename = "release")] + release: Option, + #[serde(rename = "repository")] + repository: Option, + #[serde(rename = "repository_url")] + repository_url: Option, + /// The datetime the security scanning was completed. + #[serde(rename = "security_scan_completed_at")] + security_scan_completed_at: Option, + /// The datetime the security scanning was started. + #[serde(rename = "security_scan_started_at")] + security_scan_started_at: Option, + #[serde(rename = "security_scan_status")] + security_scan_status: Option, + /// The datetime the security scanning status was updated. + #[serde(rename = "security_scan_status_updated_at")] + security_scan_status_updated_at: Option, + #[serde(rename = "self_html_url")] + self_html_url: Option, + #[serde(rename = "self_url")] + self_url: Option, + #[serde(rename = "signature_url")] + signature_url: Option, + /// The calculated size of the package. + #[serde(rename = "size")] + size: Option, + /// The public unique identifier for the package. + #[serde(rename = "slug")] + slug: Option, + #[serde(rename = "slug_perm")] + slug_perm: Option, + /// The synchronisation (in progress) stage of the package. + #[serde(rename = "stage")] + stage: Option, + #[serde(rename = "stage_str")] + stage_str: Option, + /// The datetime the package stage was updated at. + #[serde(rename = "stage_updated_at")] + stage_updated_at: Option, + /// The synchronisation status of the package. + #[serde(rename = "status")] + status: Option, + /// A textual description for the synchronous status reason (if any + #[serde(rename = "status_reason")] + status_reason: Option, + #[serde(rename = "status_str")] + status_str: Option, + /// The datetime the package status was updated at. + #[serde(rename = "status_updated_at")] + status_updated_at: Option, + #[serde(rename = "status_url")] + status_url: Option, + #[serde(rename = "subtype")] + subtype: Option, + /// A one-liner synopsis of this package. + #[serde(rename = "summary")] + summary: Option, + /// The datetime the package sync was finished at. + #[serde(rename = "sync_finished_at")] + sync_finished_at: Option, + /// Synchronisation progress (from 0-100) + #[serde(rename = "sync_progress")] + sync_progress: Option, + #[serde(rename = "tags_immutable")] + tags_immutable: Option<::models::Tags>, + #[serde(rename = "type_display")] + type_display: Option, + /// The date this package was uploaded. + #[serde(rename = "uploaded_at")] + uploaded_at: Option, + #[serde(rename = "uploader")] + uploader: Option, + #[serde(rename = "uploader_url")] + uploader_url: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: String, + #[serde(rename = "version_orig")] + version_orig: Option, + #[serde(rename = "vulnerability_scan_results_url")] + vulnerability_scan_results_url: Option +} + +impl VagrantPackageUpload { + pub fn new(name: String, provider: String, version: String) -> VagrantPackageUpload { + VagrantPackageUpload { + architectures: None, + cdn_url: None, + checksum_md5: None, + checksum_sha1: None, + checksum_sha256: None, + checksum_sha512: None, + dependencies_checksum_md5: None, + dependencies_url: None, + description: None, + display_name: None, + distro: None, + distro_version: None, + downloads: None, + epoch: None, + extension: None, + filename: None, + files: None, + format: None, + format_url: None, + freeable_storage: None, + fully_qualified_name: None, + identifier_perm: None, + identifiers: None, + indexed: None, + is_cancellable: None, + is_copyable: None, + is_deleteable: None, + is_downloadable: None, + is_moveable: None, + is_quarantinable: None, + is_quarantined: None, + is_resyncable: None, + is_security_scannable: None, + is_sync_awaiting: None, + is_sync_completed: None, + is_sync_failed: None, + is_sync_in_flight: None, + is_sync_in_progress: None, + license: None, + name: name, + namespace: None, + namespace_url: None, + num_files: None, + origin_repository: None, + origin_repository_url: None, + package_type: None, + policy_violated: None, + provider: provider, + release: None, + repository: None, + repository_url: None, + security_scan_completed_at: None, + security_scan_started_at: None, + security_scan_status: None, + security_scan_status_updated_at: None, + self_html_url: None, + self_url: None, + signature_url: None, + size: None, + slug: None, + slug_perm: None, + stage: None, + stage_str: None, + stage_updated_at: None, + status: None, + status_reason: None, + status_str: None, + status_updated_at: None, + status_url: None, + subtype: None, + summary: None, + sync_finished_at: None, + sync_progress: None, + tags_immutable: None, + type_display: None, + uploaded_at: None, + uploader: None, + uploader_url: None, + version: version, + version_orig: None, + vulnerability_scan_results_url: None + } + } + + pub fn set_architectures(&mut self, architectures: Vec<::models::Architecture>) { + self.architectures = Some(architectures); + } + + pub fn with_architectures(mut self, architectures: Vec<::models::Architecture>) -> VagrantPackageUpload { + self.architectures = Some(architectures); + self + } + + pub fn architectures(&self) -> Option<&Vec<::models::Architecture>> { + self.architectures.as_ref() + } + + pub fn reset_architectures(&mut self) { + self.architectures = None; + } + + pub fn set_cdn_url(&mut self, cdn_url: String) { + self.cdn_url = Some(cdn_url); + } + + pub fn with_cdn_url(mut self, cdn_url: String) -> VagrantPackageUpload { + self.cdn_url = Some(cdn_url); + self + } + + pub fn cdn_url(&self) -> Option<&String> { + self.cdn_url.as_ref() + } + + pub fn reset_cdn_url(&mut self) { + self.cdn_url = None; + } + + pub fn set_checksum_md5(&mut self, checksum_md5: String) { + self.checksum_md5 = Some(checksum_md5); + } + + pub fn with_checksum_md5(mut self, checksum_md5: String) -> VagrantPackageUpload { + self.checksum_md5 = Some(checksum_md5); + self + } + + pub fn checksum_md5(&self) -> Option<&String> { + self.checksum_md5.as_ref() + } + + pub fn reset_checksum_md5(&mut self) { + self.checksum_md5 = None; + } + + pub fn set_checksum_sha1(&mut self, checksum_sha1: String) { + self.checksum_sha1 = Some(checksum_sha1); + } + + pub fn with_checksum_sha1(mut self, checksum_sha1: String) -> VagrantPackageUpload { + self.checksum_sha1 = Some(checksum_sha1); + self + } + + pub fn checksum_sha1(&self) -> Option<&String> { + self.checksum_sha1.as_ref() + } + + pub fn reset_checksum_sha1(&mut self) { + self.checksum_sha1 = None; + } + + pub fn set_checksum_sha256(&mut self, checksum_sha256: String) { + self.checksum_sha256 = Some(checksum_sha256); + } + + pub fn with_checksum_sha256(mut self, checksum_sha256: String) -> VagrantPackageUpload { + self.checksum_sha256 = Some(checksum_sha256); + self + } + + pub fn checksum_sha256(&self) -> Option<&String> { + self.checksum_sha256.as_ref() + } + + pub fn reset_checksum_sha256(&mut self) { + self.checksum_sha256 = None; + } + + pub fn set_checksum_sha512(&mut self, checksum_sha512: String) { + self.checksum_sha512 = Some(checksum_sha512); + } + + pub fn with_checksum_sha512(mut self, checksum_sha512: String) -> VagrantPackageUpload { + self.checksum_sha512 = Some(checksum_sha512); + self + } + + pub fn checksum_sha512(&self) -> Option<&String> { + self.checksum_sha512.as_ref() + } + + pub fn reset_checksum_sha512(&mut self) { + self.checksum_sha512 = None; + } + + pub fn set_dependencies_checksum_md5(&mut self, dependencies_checksum_md5: String) { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + } + + pub fn with_dependencies_checksum_md5(mut self, dependencies_checksum_md5: String) -> VagrantPackageUpload { + self.dependencies_checksum_md5 = Some(dependencies_checksum_md5); + self + } + + pub fn dependencies_checksum_md5(&self) -> Option<&String> { + self.dependencies_checksum_md5.as_ref() + } + + pub fn reset_dependencies_checksum_md5(&mut self) { + self.dependencies_checksum_md5 = None; + } + + pub fn set_dependencies_url(&mut self, dependencies_url: String) { + self.dependencies_url = Some(dependencies_url); + } + + pub fn with_dependencies_url(mut self, dependencies_url: String) -> VagrantPackageUpload { + self.dependencies_url = Some(dependencies_url); + self + } + + pub fn dependencies_url(&self) -> Option<&String> { + self.dependencies_url.as_ref() + } + + pub fn reset_dependencies_url(&mut self) { + self.dependencies_url = None; + } + + pub fn set_description(&mut self, description: String) { + self.description = Some(description); + } + + pub fn with_description(mut self, description: String) -> VagrantPackageUpload { + self.description = Some(description); + self + } + + pub fn description(&self) -> Option<&String> { + self.description.as_ref() + } + + pub fn reset_description(&mut self) { + self.description = None; + } + + pub fn set_display_name(&mut self, display_name: String) { + self.display_name = Some(display_name); + } + + pub fn with_display_name(mut self, display_name: String) -> VagrantPackageUpload { + self.display_name = Some(display_name); + self + } + + pub fn display_name(&self) -> Option<&String> { + self.display_name.as_ref() + } + + pub fn reset_display_name(&mut self) { + self.display_name = None; + } + + pub fn set_distro(&mut self, distro: ::models::Distribution) { + self.distro = Some(distro); + } + + pub fn with_distro(mut self, distro: ::models::Distribution) -> VagrantPackageUpload { + self.distro = Some(distro); + self + } + + pub fn distro(&self) -> Option<&::models::Distribution> { + self.distro.as_ref() + } + + pub fn reset_distro(&mut self) { + self.distro = None; + } + + pub fn set_distro_version(&mut self, distro_version: ::models::DistributionVersion) { + self.distro_version = Some(distro_version); + } + + pub fn with_distro_version(mut self, distro_version: ::models::DistributionVersion) -> VagrantPackageUpload { + self.distro_version = Some(distro_version); + self + } + + pub fn distro_version(&self) -> Option<&::models::DistributionVersion> { + self.distro_version.as_ref() + } + + pub fn reset_distro_version(&mut self) { + self.distro_version = None; + } + + pub fn set_downloads(&mut self, downloads: i32) { + self.downloads = Some(downloads); + } + + pub fn with_downloads(mut self, downloads: i32) -> VagrantPackageUpload { + self.downloads = Some(downloads); + self + } + + pub fn downloads(&self) -> Option<&i32> { + self.downloads.as_ref() + } + + pub fn reset_downloads(&mut self) { + self.downloads = None; + } + + pub fn set_epoch(&mut self, epoch: i32) { + self.epoch = Some(epoch); + } + + pub fn with_epoch(mut self, epoch: i32) -> VagrantPackageUpload { + self.epoch = Some(epoch); + self + } + + pub fn epoch(&self) -> Option<&i32> { + self.epoch.as_ref() + } + + pub fn reset_epoch(&mut self) { + self.epoch = None; + } + + pub fn set_extension(&mut self, extension: String) { + self.extension = Some(extension); + } + + pub fn with_extension(mut self, extension: String) -> VagrantPackageUpload { + self.extension = Some(extension); + self + } + + pub fn extension(&self) -> Option<&String> { + self.extension.as_ref() + } + + pub fn reset_extension(&mut self) { + self.extension = None; + } + + pub fn set_filename(&mut self, filename: String) { + self.filename = Some(filename); + } + + pub fn with_filename(mut self, filename: String) -> VagrantPackageUpload { + self.filename = Some(filename); + self + } + + pub fn filename(&self) -> Option<&String> { + self.filename.as_ref() + } + + pub fn reset_filename(&mut self) { + self.filename = None; + } + + pub fn set_files(&mut self, files: Vec<::models::PackageFile>) { + self.files = Some(files); + } + + pub fn with_files(mut self, files: Vec<::models::PackageFile>) -> VagrantPackageUpload { + self.files = Some(files); + self + } + + pub fn files(&self) -> Option<&Vec<::models::PackageFile>> { + self.files.as_ref() + } + + pub fn reset_files(&mut self) { + self.files = None; + } + + pub fn set_format(&mut self, format: String) { + self.format = Some(format); + } + + pub fn with_format(mut self, format: String) -> VagrantPackageUpload { + self.format = Some(format); + self + } + + pub fn format(&self) -> Option<&String> { + self.format.as_ref() + } + + pub fn reset_format(&mut self) { + self.format = None; + } + + pub fn set_format_url(&mut self, format_url: String) { + self.format_url = Some(format_url); + } + + pub fn with_format_url(mut self, format_url: String) -> VagrantPackageUpload { + self.format_url = Some(format_url); + self + } + + pub fn format_url(&self) -> Option<&String> { + self.format_url.as_ref() + } + + pub fn reset_format_url(&mut self) { + self.format_url = None; + } + + pub fn set_freeable_storage(&mut self, freeable_storage: i32) { + self.freeable_storage = Some(freeable_storage); + } + + pub fn with_freeable_storage(mut self, freeable_storage: i32) -> VagrantPackageUpload { + self.freeable_storage = Some(freeable_storage); + self + } + + pub fn freeable_storage(&self) -> Option<&i32> { + self.freeable_storage.as_ref() + } + + pub fn reset_freeable_storage(&mut self) { + self.freeable_storage = None; + } + + pub fn set_fully_qualified_name(&mut self, fully_qualified_name: String) { + self.fully_qualified_name = Some(fully_qualified_name); + } + + pub fn with_fully_qualified_name(mut self, fully_qualified_name: String) -> VagrantPackageUpload { + self.fully_qualified_name = Some(fully_qualified_name); + self + } + + pub fn fully_qualified_name(&self) -> Option<&String> { + self.fully_qualified_name.as_ref() + } + + pub fn reset_fully_qualified_name(&mut self) { + self.fully_qualified_name = None; + } + + pub fn set_identifier_perm(&mut self, identifier_perm: String) { + self.identifier_perm = Some(identifier_perm); + } + + pub fn with_identifier_perm(mut self, identifier_perm: String) -> VagrantPackageUpload { + self.identifier_perm = Some(identifier_perm); + self + } + + pub fn identifier_perm(&self) -> Option<&String> { + self.identifier_perm.as_ref() + } + + pub fn reset_identifier_perm(&mut self) { + self.identifier_perm = None; + } + + pub fn set_identifiers(&mut self, identifiers: ::std::collections::HashMap) { + self.identifiers = Some(identifiers); + } + + pub fn with_identifiers(mut self, identifiers: ::std::collections::HashMap) -> VagrantPackageUpload { + self.identifiers = Some(identifiers); + self + } + + pub fn identifiers(&self) -> Option<&::std::collections::HashMap> { + self.identifiers.as_ref() + } + + pub fn reset_identifiers(&mut self) { + self.identifiers = None; + } + + pub fn set_indexed(&mut self, indexed: bool) { + self.indexed = Some(indexed); + } + + pub fn with_indexed(mut self, indexed: bool) -> VagrantPackageUpload { + self.indexed = Some(indexed); + self + } + + pub fn indexed(&self) -> Option<&bool> { + self.indexed.as_ref() + } + + pub fn reset_indexed(&mut self) { + self.indexed = None; + } + + pub fn set_is_cancellable(&mut self, is_cancellable: bool) { + self.is_cancellable = Some(is_cancellable); + } + + pub fn with_is_cancellable(mut self, is_cancellable: bool) -> VagrantPackageUpload { + self.is_cancellable = Some(is_cancellable); + self + } + + pub fn is_cancellable(&self) -> Option<&bool> { + self.is_cancellable.as_ref() + } + + pub fn reset_is_cancellable(&mut self) { + self.is_cancellable = None; + } + + pub fn set_is_copyable(&mut self, is_copyable: bool) { + self.is_copyable = Some(is_copyable); + } + + pub fn with_is_copyable(mut self, is_copyable: bool) -> VagrantPackageUpload { + self.is_copyable = Some(is_copyable); + self + } + + pub fn is_copyable(&self) -> Option<&bool> { + self.is_copyable.as_ref() + } + + pub fn reset_is_copyable(&mut self) { + self.is_copyable = None; + } + + pub fn set_is_deleteable(&mut self, is_deleteable: bool) { + self.is_deleteable = Some(is_deleteable); + } + + pub fn with_is_deleteable(mut self, is_deleteable: bool) -> VagrantPackageUpload { + self.is_deleteable = Some(is_deleteable); + self + } + + pub fn is_deleteable(&self) -> Option<&bool> { + self.is_deleteable.as_ref() + } + + pub fn reset_is_deleteable(&mut self) { + self.is_deleteable = None; + } + + pub fn set_is_downloadable(&mut self, is_downloadable: bool) { + self.is_downloadable = Some(is_downloadable); + } + + pub fn with_is_downloadable(mut self, is_downloadable: bool) -> VagrantPackageUpload { + self.is_downloadable = Some(is_downloadable); + self + } + + pub fn is_downloadable(&self) -> Option<&bool> { + self.is_downloadable.as_ref() + } + + pub fn reset_is_downloadable(&mut self) { + self.is_downloadable = None; + } + + pub fn set_is_moveable(&mut self, is_moveable: bool) { + self.is_moveable = Some(is_moveable); + } + + pub fn with_is_moveable(mut self, is_moveable: bool) -> VagrantPackageUpload { + self.is_moveable = Some(is_moveable); + self + } + + pub fn is_moveable(&self) -> Option<&bool> { + self.is_moveable.as_ref() + } + + pub fn reset_is_moveable(&mut self) { + self.is_moveable = None; + } + + pub fn set_is_quarantinable(&mut self, is_quarantinable: bool) { + self.is_quarantinable = Some(is_quarantinable); + } + + pub fn with_is_quarantinable(mut self, is_quarantinable: bool) -> VagrantPackageUpload { + self.is_quarantinable = Some(is_quarantinable); + self + } + + pub fn is_quarantinable(&self) -> Option<&bool> { + self.is_quarantinable.as_ref() + } + + pub fn reset_is_quarantinable(&mut self) { + self.is_quarantinable = None; + } + + pub fn set_is_quarantined(&mut self, is_quarantined: bool) { + self.is_quarantined = Some(is_quarantined); + } + + pub fn with_is_quarantined(mut self, is_quarantined: bool) -> VagrantPackageUpload { + self.is_quarantined = Some(is_quarantined); + self + } + + pub fn is_quarantined(&self) -> Option<&bool> { + self.is_quarantined.as_ref() + } + + pub fn reset_is_quarantined(&mut self) { + self.is_quarantined = None; + } + + pub fn set_is_resyncable(&mut self, is_resyncable: bool) { + self.is_resyncable = Some(is_resyncable); + } + + pub fn with_is_resyncable(mut self, is_resyncable: bool) -> VagrantPackageUpload { + self.is_resyncable = Some(is_resyncable); + self + } + + pub fn is_resyncable(&self) -> Option<&bool> { + self.is_resyncable.as_ref() + } + + pub fn reset_is_resyncable(&mut self) { + self.is_resyncable = None; + } + + pub fn set_is_security_scannable(&mut self, is_security_scannable: bool) { + self.is_security_scannable = Some(is_security_scannable); + } + + pub fn with_is_security_scannable(mut self, is_security_scannable: bool) -> VagrantPackageUpload { + self.is_security_scannable = Some(is_security_scannable); + self + } + + pub fn is_security_scannable(&self) -> Option<&bool> { + self.is_security_scannable.as_ref() + } + + pub fn reset_is_security_scannable(&mut self) { + self.is_security_scannable = None; + } + + pub fn set_is_sync_awaiting(&mut self, is_sync_awaiting: bool) { + self.is_sync_awaiting = Some(is_sync_awaiting); + } + + pub fn with_is_sync_awaiting(mut self, is_sync_awaiting: bool) -> VagrantPackageUpload { + self.is_sync_awaiting = Some(is_sync_awaiting); + self + } + + pub fn is_sync_awaiting(&self) -> Option<&bool> { + self.is_sync_awaiting.as_ref() + } + + pub fn reset_is_sync_awaiting(&mut self) { + self.is_sync_awaiting = None; + } + + pub fn set_is_sync_completed(&mut self, is_sync_completed: bool) { + self.is_sync_completed = Some(is_sync_completed); + } + + pub fn with_is_sync_completed(mut self, is_sync_completed: bool) -> VagrantPackageUpload { + self.is_sync_completed = Some(is_sync_completed); + self + } + + pub fn is_sync_completed(&self) -> Option<&bool> { + self.is_sync_completed.as_ref() + } + + pub fn reset_is_sync_completed(&mut self) { + self.is_sync_completed = None; + } + + pub fn set_is_sync_failed(&mut self, is_sync_failed: bool) { + self.is_sync_failed = Some(is_sync_failed); + } + + pub fn with_is_sync_failed(mut self, is_sync_failed: bool) -> VagrantPackageUpload { + self.is_sync_failed = Some(is_sync_failed); + self + } + + pub fn is_sync_failed(&self) -> Option<&bool> { + self.is_sync_failed.as_ref() + } + + pub fn reset_is_sync_failed(&mut self) { + self.is_sync_failed = None; + } + + pub fn set_is_sync_in_flight(&mut self, is_sync_in_flight: bool) { + self.is_sync_in_flight = Some(is_sync_in_flight); + } + + pub fn with_is_sync_in_flight(mut self, is_sync_in_flight: bool) -> VagrantPackageUpload { + self.is_sync_in_flight = Some(is_sync_in_flight); + self + } + + pub fn is_sync_in_flight(&self) -> Option<&bool> { + self.is_sync_in_flight.as_ref() + } + + pub fn reset_is_sync_in_flight(&mut self) { + self.is_sync_in_flight = None; + } + + pub fn set_is_sync_in_progress(&mut self, is_sync_in_progress: bool) { + self.is_sync_in_progress = Some(is_sync_in_progress); + } + + pub fn with_is_sync_in_progress(mut self, is_sync_in_progress: bool) -> VagrantPackageUpload { + self.is_sync_in_progress = Some(is_sync_in_progress); + self + } + + pub fn is_sync_in_progress(&self) -> Option<&bool> { + self.is_sync_in_progress.as_ref() + } + + pub fn reset_is_sync_in_progress(&mut self) { + self.is_sync_in_progress = None; + } + + pub fn set_license(&mut self, license: String) { + self.license = Some(license); + } + + pub fn with_license(mut self, license: String) -> VagrantPackageUpload { + self.license = Some(license); + self + } + + pub fn license(&self) -> Option<&String> { + self.license.as_ref() + } + + pub fn reset_license(&mut self) { + self.license = None; + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> VagrantPackageUpload { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_namespace(&mut self, namespace: String) { + self.namespace = Some(namespace); + } + + pub fn with_namespace(mut self, namespace: String) -> VagrantPackageUpload { + self.namespace = Some(namespace); + self + } + + pub fn namespace(&self) -> Option<&String> { + self.namespace.as_ref() + } + + pub fn reset_namespace(&mut self) { + self.namespace = None; + } + + pub fn set_namespace_url(&mut self, namespace_url: String) { + self.namespace_url = Some(namespace_url); + } + + pub fn with_namespace_url(mut self, namespace_url: String) -> VagrantPackageUpload { + self.namespace_url = Some(namespace_url); + self + } + + pub fn namespace_url(&self) -> Option<&String> { + self.namespace_url.as_ref() + } + + pub fn reset_namespace_url(&mut self) { + self.namespace_url = None; + } + + pub fn set_num_files(&mut self, num_files: i32) { + self.num_files = Some(num_files); + } + + pub fn with_num_files(mut self, num_files: i32) -> VagrantPackageUpload { + self.num_files = Some(num_files); + self + } + + pub fn num_files(&self) -> Option<&i32> { + self.num_files.as_ref() + } + + pub fn reset_num_files(&mut self) { + self.num_files = None; + } + + pub fn set_origin_repository(&mut self, origin_repository: String) { + self.origin_repository = Some(origin_repository); + } + + pub fn with_origin_repository(mut self, origin_repository: String) -> VagrantPackageUpload { + self.origin_repository = Some(origin_repository); + self + } + + pub fn origin_repository(&self) -> Option<&String> { + self.origin_repository.as_ref() + } + + pub fn reset_origin_repository(&mut self) { + self.origin_repository = None; + } + + pub fn set_origin_repository_url(&mut self, origin_repository_url: String) { + self.origin_repository_url = Some(origin_repository_url); + } + + pub fn with_origin_repository_url(mut self, origin_repository_url: String) -> VagrantPackageUpload { + self.origin_repository_url = Some(origin_repository_url); + self + } + + pub fn origin_repository_url(&self) -> Option<&String> { + self.origin_repository_url.as_ref() + } + + pub fn reset_origin_repository_url(&mut self) { + self.origin_repository_url = None; + } + + pub fn set_package_type(&mut self, package_type: i32) { + self.package_type = Some(package_type); + } + + pub fn with_package_type(mut self, package_type: i32) -> VagrantPackageUpload { + self.package_type = Some(package_type); + self + } + + pub fn package_type(&self) -> Option<&i32> { + self.package_type.as_ref() + } + + pub fn reset_package_type(&mut self) { + self.package_type = None; + } + + pub fn set_policy_violated(&mut self, policy_violated: bool) { + self.policy_violated = Some(policy_violated); + } + + pub fn with_policy_violated(mut self, policy_violated: bool) -> VagrantPackageUpload { + self.policy_violated = Some(policy_violated); + self + } + + pub fn policy_violated(&self) -> Option<&bool> { + self.policy_violated.as_ref() + } + + pub fn reset_policy_violated(&mut self) { + self.policy_violated = None; + } + + pub fn set_provider(&mut self, provider: String) { + self.provider = provider; + } + + pub fn with_provider(mut self, provider: String) -> VagrantPackageUpload { + self.provider = provider; + self + } + + pub fn provider(&self) -> &String { + &self.provider + } + + + pub fn set_release(&mut self, release: String) { + self.release = Some(release); + } + + pub fn with_release(mut self, release: String) -> VagrantPackageUpload { + self.release = Some(release); + self + } + + pub fn release(&self) -> Option<&String> { + self.release.as_ref() + } + + pub fn reset_release(&mut self) { + self.release = None; + } + + pub fn set_repository(&mut self, repository: String) { + self.repository = Some(repository); + } + + pub fn with_repository(mut self, repository: String) -> VagrantPackageUpload { + self.repository = Some(repository); + self + } + + pub fn repository(&self) -> Option<&String> { + self.repository.as_ref() + } + + pub fn reset_repository(&mut self) { + self.repository = None; + } + + pub fn set_repository_url(&mut self, repository_url: String) { + self.repository_url = Some(repository_url); + } + + pub fn with_repository_url(mut self, repository_url: String) -> VagrantPackageUpload { + self.repository_url = Some(repository_url); + self + } + + pub fn repository_url(&self) -> Option<&String> { + self.repository_url.as_ref() + } + + pub fn reset_repository_url(&mut self) { + self.repository_url = None; + } + + pub fn set_security_scan_completed_at(&mut self, security_scan_completed_at: String) { + self.security_scan_completed_at = Some(security_scan_completed_at); + } + + pub fn with_security_scan_completed_at(mut self, security_scan_completed_at: String) -> VagrantPackageUpload { + self.security_scan_completed_at = Some(security_scan_completed_at); + self + } + + pub fn security_scan_completed_at(&self) -> Option<&String> { + self.security_scan_completed_at.as_ref() + } + + pub fn reset_security_scan_completed_at(&mut self) { + self.security_scan_completed_at = None; + } + + pub fn set_security_scan_started_at(&mut self, security_scan_started_at: String) { + self.security_scan_started_at = Some(security_scan_started_at); + } + + pub fn with_security_scan_started_at(mut self, security_scan_started_at: String) -> VagrantPackageUpload { + self.security_scan_started_at = Some(security_scan_started_at); + self + } + + pub fn security_scan_started_at(&self) -> Option<&String> { + self.security_scan_started_at.as_ref() + } + + pub fn reset_security_scan_started_at(&mut self) { + self.security_scan_started_at = None; + } + + pub fn set_security_scan_status(&mut self, security_scan_status: String) { + self.security_scan_status = Some(security_scan_status); + } + + pub fn with_security_scan_status(mut self, security_scan_status: String) -> VagrantPackageUpload { + self.security_scan_status = Some(security_scan_status); + self + } + + pub fn security_scan_status(&self) -> Option<&String> { + self.security_scan_status.as_ref() + } + + pub fn reset_security_scan_status(&mut self) { + self.security_scan_status = None; + } + + pub fn set_security_scan_status_updated_at(&mut self, security_scan_status_updated_at: String) { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + } + + pub fn with_security_scan_status_updated_at(mut self, security_scan_status_updated_at: String) -> VagrantPackageUpload { + self.security_scan_status_updated_at = Some(security_scan_status_updated_at); + self + } + + pub fn security_scan_status_updated_at(&self) -> Option<&String> { + self.security_scan_status_updated_at.as_ref() + } + + pub fn reset_security_scan_status_updated_at(&mut self) { + self.security_scan_status_updated_at = None; + } + + pub fn set_self_html_url(&mut self, self_html_url: String) { + self.self_html_url = Some(self_html_url); + } + + pub fn with_self_html_url(mut self, self_html_url: String) -> VagrantPackageUpload { + self.self_html_url = Some(self_html_url); + self + } + + pub fn self_html_url(&self) -> Option<&String> { + self.self_html_url.as_ref() + } + + pub fn reset_self_html_url(&mut self) { + self.self_html_url = None; + } + + pub fn set_self_url(&mut self, self_url: String) { + self.self_url = Some(self_url); + } + + pub fn with_self_url(mut self, self_url: String) -> VagrantPackageUpload { + self.self_url = Some(self_url); + self + } + + pub fn self_url(&self) -> Option<&String> { + self.self_url.as_ref() + } + + pub fn reset_self_url(&mut self) { + self.self_url = None; + } + + pub fn set_signature_url(&mut self, signature_url: String) { + self.signature_url = Some(signature_url); + } + + pub fn with_signature_url(mut self, signature_url: String) -> VagrantPackageUpload { + self.signature_url = Some(signature_url); + self + } + + pub fn signature_url(&self) -> Option<&String> { + self.signature_url.as_ref() + } + + pub fn reset_signature_url(&mut self) { + self.signature_url = None; + } + + pub fn set_size(&mut self, size: i32) { + self.size = Some(size); + } + + pub fn with_size(mut self, size: i32) -> VagrantPackageUpload { + self.size = Some(size); + self + } + + pub fn size(&self) -> Option<&i32> { + self.size.as_ref() + } + + pub fn reset_size(&mut self) { + self.size = None; + } + + pub fn set_slug(&mut self, slug: String) { + self.slug = Some(slug); + } + + pub fn with_slug(mut self, slug: String) -> VagrantPackageUpload { + self.slug = Some(slug); + self + } + + pub fn slug(&self) -> Option<&String> { + self.slug.as_ref() + } + + pub fn reset_slug(&mut self) { + self.slug = None; + } + + pub fn set_slug_perm(&mut self, slug_perm: String) { + self.slug_perm = Some(slug_perm); + } + + pub fn with_slug_perm(mut self, slug_perm: String) -> VagrantPackageUpload { + self.slug_perm = Some(slug_perm); + self + } + + pub fn slug_perm(&self) -> Option<&String> { + self.slug_perm.as_ref() + } + + pub fn reset_slug_perm(&mut self) { + self.slug_perm = None; + } + + pub fn set_stage(&mut self, stage: i32) { + self.stage = Some(stage); + } + + pub fn with_stage(mut self, stage: i32) -> VagrantPackageUpload { + self.stage = Some(stage); + self + } + + pub fn stage(&self) -> Option<&i32> { + self.stage.as_ref() + } + + pub fn reset_stage(&mut self) { + self.stage = None; + } + + pub fn set_stage_str(&mut self, stage_str: String) { + self.stage_str = Some(stage_str); + } + + pub fn with_stage_str(mut self, stage_str: String) -> VagrantPackageUpload { + self.stage_str = Some(stage_str); + self + } + + pub fn stage_str(&self) -> Option<&String> { + self.stage_str.as_ref() + } + + pub fn reset_stage_str(&mut self) { + self.stage_str = None; + } + + pub fn set_stage_updated_at(&mut self, stage_updated_at: String) { + self.stage_updated_at = Some(stage_updated_at); + } + + pub fn with_stage_updated_at(mut self, stage_updated_at: String) -> VagrantPackageUpload { + self.stage_updated_at = Some(stage_updated_at); + self + } + + pub fn stage_updated_at(&self) -> Option<&String> { + self.stage_updated_at.as_ref() + } + + pub fn reset_stage_updated_at(&mut self) { + self.stage_updated_at = None; + } + + pub fn set_status(&mut self, status: i32) { + self.status = Some(status); + } + + pub fn with_status(mut self, status: i32) -> VagrantPackageUpload { + self.status = Some(status); + self + } + + pub fn status(&self) -> Option<&i32> { + self.status.as_ref() + } + + pub fn reset_status(&mut self) { + self.status = None; + } + + pub fn set_status_reason(&mut self, status_reason: String) { + self.status_reason = Some(status_reason); + } + + pub fn with_status_reason(mut self, status_reason: String) -> VagrantPackageUpload { + self.status_reason = Some(status_reason); + self + } + + pub fn status_reason(&self) -> Option<&String> { + self.status_reason.as_ref() + } + + pub fn reset_status_reason(&mut self) { + self.status_reason = None; + } + + pub fn set_status_str(&mut self, status_str: String) { + self.status_str = Some(status_str); + } + + pub fn with_status_str(mut self, status_str: String) -> VagrantPackageUpload { + self.status_str = Some(status_str); + self + } + + pub fn status_str(&self) -> Option<&String> { + self.status_str.as_ref() + } + + pub fn reset_status_str(&mut self) { + self.status_str = None; + } + + pub fn set_status_updated_at(&mut self, status_updated_at: String) { + self.status_updated_at = Some(status_updated_at); + } + + pub fn with_status_updated_at(mut self, status_updated_at: String) -> VagrantPackageUpload { + self.status_updated_at = Some(status_updated_at); + self + } + + pub fn status_updated_at(&self) -> Option<&String> { + self.status_updated_at.as_ref() + } + + pub fn reset_status_updated_at(&mut self) { + self.status_updated_at = None; + } + + pub fn set_status_url(&mut self, status_url: String) { + self.status_url = Some(status_url); + } + + pub fn with_status_url(mut self, status_url: String) -> VagrantPackageUpload { + self.status_url = Some(status_url); + self + } + + pub fn status_url(&self) -> Option<&String> { + self.status_url.as_ref() + } + + pub fn reset_status_url(&mut self) { + self.status_url = None; + } + + pub fn set_subtype(&mut self, subtype: String) { + self.subtype = Some(subtype); + } + + pub fn with_subtype(mut self, subtype: String) -> VagrantPackageUpload { + self.subtype = Some(subtype); + self + } + + pub fn subtype(&self) -> Option<&String> { + self.subtype.as_ref() + } + + pub fn reset_subtype(&mut self) { + self.subtype = None; + } + + pub fn set_summary(&mut self, summary: String) { + self.summary = Some(summary); + } + + pub fn with_summary(mut self, summary: String) -> VagrantPackageUpload { + self.summary = Some(summary); + self + } + + pub fn summary(&self) -> Option<&String> { + self.summary.as_ref() + } + + pub fn reset_summary(&mut self) { + self.summary = None; + } + + pub fn set_sync_finished_at(&mut self, sync_finished_at: String) { + self.sync_finished_at = Some(sync_finished_at); + } + + pub fn with_sync_finished_at(mut self, sync_finished_at: String) -> VagrantPackageUpload { + self.sync_finished_at = Some(sync_finished_at); + self + } + + pub fn sync_finished_at(&self) -> Option<&String> { + self.sync_finished_at.as_ref() + } + + pub fn reset_sync_finished_at(&mut self) { + self.sync_finished_at = None; + } + + pub fn set_sync_progress(&mut self, sync_progress: i32) { + self.sync_progress = Some(sync_progress); + } + + pub fn with_sync_progress(mut self, sync_progress: i32) -> VagrantPackageUpload { + self.sync_progress = Some(sync_progress); + self + } + + pub fn sync_progress(&self) -> Option<&i32> { + self.sync_progress.as_ref() + } + + pub fn reset_sync_progress(&mut self) { + self.sync_progress = None; + } + + pub fn set_tags_immutable(&mut self, tags_immutable: ::models::Tags) { + self.tags_immutable = Some(tags_immutable); + } + + pub fn with_tags_immutable(mut self, tags_immutable: ::models::Tags) -> VagrantPackageUpload { + self.tags_immutable = Some(tags_immutable); + self + } + + pub fn tags_immutable(&self) -> Option<&::models::Tags> { + self.tags_immutable.as_ref() + } + + pub fn reset_tags_immutable(&mut self) { + self.tags_immutable = None; + } + + pub fn set_type_display(&mut self, type_display: String) { + self.type_display = Some(type_display); + } + + pub fn with_type_display(mut self, type_display: String) -> VagrantPackageUpload { + self.type_display = Some(type_display); + self + } + + pub fn type_display(&self) -> Option<&String> { + self.type_display.as_ref() + } + + pub fn reset_type_display(&mut self) { + self.type_display = None; + } + + pub fn set_uploaded_at(&mut self, uploaded_at: String) { + self.uploaded_at = Some(uploaded_at); + } + + pub fn with_uploaded_at(mut self, uploaded_at: String) -> VagrantPackageUpload { + self.uploaded_at = Some(uploaded_at); + self + } + + pub fn uploaded_at(&self) -> Option<&String> { + self.uploaded_at.as_ref() + } + + pub fn reset_uploaded_at(&mut self) { + self.uploaded_at = None; + } + + pub fn set_uploader(&mut self, uploader: String) { + self.uploader = Some(uploader); + } + + pub fn with_uploader(mut self, uploader: String) -> VagrantPackageUpload { + self.uploader = Some(uploader); + self + } + + pub fn uploader(&self) -> Option<&String> { + self.uploader.as_ref() + } + + pub fn reset_uploader(&mut self) { + self.uploader = None; + } + + pub fn set_uploader_url(&mut self, uploader_url: String) { + self.uploader_url = Some(uploader_url); + } + + pub fn with_uploader_url(mut self, uploader_url: String) -> VagrantPackageUpload { + self.uploader_url = Some(uploader_url); + self + } + + pub fn uploader_url(&self) -> Option<&String> { + self.uploader_url.as_ref() + } + + pub fn reset_uploader_url(&mut self) { + self.uploader_url = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = version; + } + + pub fn with_version(mut self, version: String) -> VagrantPackageUpload { + self.version = version; + self + } + + pub fn version(&self) -> &String { + &self.version + } + + + pub fn set_version_orig(&mut self, version_orig: String) { + self.version_orig = Some(version_orig); + } + + pub fn with_version_orig(mut self, version_orig: String) -> VagrantPackageUpload { + self.version_orig = Some(version_orig); + self + } + + pub fn version_orig(&self) -> Option<&String> { + self.version_orig.as_ref() + } + + pub fn reset_version_orig(&mut self) { + self.version_orig = None; + } + + pub fn set_vulnerability_scan_results_url(&mut self, vulnerability_scan_results_url: String) { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + } + + pub fn with_vulnerability_scan_results_url(mut self, vulnerability_scan_results_url: String) -> VagrantPackageUpload { + self.vulnerability_scan_results_url = Some(vulnerability_scan_results_url); + self + } + + pub fn vulnerability_scan_results_url(&self) -> Option<&String> { + self.vulnerability_scan_results_url.as_ref() + } + + pub fn reset_vulnerability_scan_results_url(&mut self) { + self.vulnerability_scan_results_url = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/vagrant_package_upload_request.rs b/bindings/rust/src/src/models/vagrant_package_upload_request.rs new file mode 100644 index 00000000..09d7a1d5 --- /dev/null +++ b/bindings/rust/src/src/models/vagrant_package_upload_request.rs @@ -0,0 +1,142 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct VagrantPackageUploadRequest { + /// The name of this package. + #[serde(rename = "name")] + name: String, + /// The primary file for the package. + #[serde(rename = "package_file")] + package_file: String, + /// The virtual machine provider for the box. + #[serde(rename = "provider")] + provider: String, + /// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate. + #[serde(rename = "republish")] + republish: Option, + /// A comma-separated values list of tags to add to the package. + #[serde(rename = "tags")] + tags: Option, + /// The raw version for this package. + #[serde(rename = "version")] + version: String +} + +impl VagrantPackageUploadRequest { + pub fn new(name: String, package_file: String, provider: String, version: String) -> VagrantPackageUploadRequest { + VagrantPackageUploadRequest { + name: name, + package_file: package_file, + provider: provider, + republish: None, + tags: None, + version: version + } + } + + pub fn set_name(&mut self, name: String) { + self.name = name; + } + + pub fn with_name(mut self, name: String) -> VagrantPackageUploadRequest { + self.name = name; + self + } + + pub fn name(&self) -> &String { + &self.name + } + + + pub fn set_package_file(&mut self, package_file: String) { + self.package_file = package_file; + } + + pub fn with_package_file(mut self, package_file: String) -> VagrantPackageUploadRequest { + self.package_file = package_file; + self + } + + pub fn package_file(&self) -> &String { + &self.package_file + } + + + pub fn set_provider(&mut self, provider: String) { + self.provider = provider; + } + + pub fn with_provider(mut self, provider: String) -> VagrantPackageUploadRequest { + self.provider = provider; + self + } + + pub fn provider(&self) -> &String { + &self.provider + } + + + pub fn set_republish(&mut self, republish: bool) { + self.republish = Some(republish); + } + + pub fn with_republish(mut self, republish: bool) -> VagrantPackageUploadRequest { + self.republish = Some(republish); + self + } + + pub fn republish(&self) -> Option<&bool> { + self.republish.as_ref() + } + + pub fn reset_republish(&mut self) { + self.republish = None; + } + + pub fn set_tags(&mut self, tags: String) { + self.tags = Some(tags); + } + + pub fn with_tags(mut self, tags: String) -> VagrantPackageUploadRequest { + self.tags = Some(tags); + self + } + + pub fn tags(&self) -> Option<&String> { + self.tags.as_ref() + } + + pub fn reset_tags(&mut self) { + self.tags = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = version; + } + + pub fn with_version(mut self, version: String) -> VagrantPackageUploadRequest { + self.version = version; + self + } + + pub fn version(&self) -> &String { + &self.version + } + + +} + + + diff --git a/bindings/rust/src/src/models/vulnerability.rs b/bindings/rust/src/src/models/vulnerability.rs new file mode 100644 index 00000000..e1d35e5c --- /dev/null +++ b/bindings/rust/src/src/models/vulnerability.rs @@ -0,0 +1,184 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct Vulnerability { + #[serde(rename = "affected_version")] + affected_version: ::models::VulnerabilityScanVersion, + #[serde(rename = "description")] + description: String, + #[serde(rename = "fixed_version")] + fixed_version: ::models::VulnerabilityScanVersion, + #[serde(rename = "package_name")] + package_name: String, + #[serde(rename = "references")] + references: Vec, + #[serde(rename = "severity")] + severity: Option, + #[serde(rename = "severity_source")] + severity_source: String, + #[serde(rename = "title")] + title: String, + #[serde(rename = "vulnerability_id")] + vulnerability_id: String +} + +impl Vulnerability { + pub fn new(affected_version: ::models::VulnerabilityScanVersion, description: String, fixed_version: ::models::VulnerabilityScanVersion, package_name: String, references: Vec, severity_source: String, title: String, vulnerability_id: String) -> Vulnerability { + Vulnerability { + affected_version: affected_version, + description: description, + fixed_version: fixed_version, + package_name: package_name, + references: references, + severity: None, + severity_source: severity_source, + title: title, + vulnerability_id: vulnerability_id + } + } + + pub fn set_affected_version(&mut self, affected_version: ::models::VulnerabilityScanVersion) { + self.affected_version = affected_version; + } + + pub fn with_affected_version(mut self, affected_version: ::models::VulnerabilityScanVersion) -> Vulnerability { + self.affected_version = affected_version; + self + } + + pub fn affected_version(&self) -> &::models::VulnerabilityScanVersion { + &self.affected_version + } + + + pub fn set_description(&mut self, description: String) { + self.description = description; + } + + pub fn with_description(mut self, description: String) -> Vulnerability { + self.description = description; + self + } + + pub fn description(&self) -> &String { + &self.description + } + + + pub fn set_fixed_version(&mut self, fixed_version: ::models::VulnerabilityScanVersion) { + self.fixed_version = fixed_version; + } + + pub fn with_fixed_version(mut self, fixed_version: ::models::VulnerabilityScanVersion) -> Vulnerability { + self.fixed_version = fixed_version; + self + } + + pub fn fixed_version(&self) -> &::models::VulnerabilityScanVersion { + &self.fixed_version + } + + + pub fn set_package_name(&mut self, package_name: String) { + self.package_name = package_name; + } + + pub fn with_package_name(mut self, package_name: String) -> Vulnerability { + self.package_name = package_name; + self + } + + pub fn package_name(&self) -> &String { + &self.package_name + } + + + pub fn set_references(&mut self, references: Vec) { + self.references = references; + } + + pub fn with_references(mut self, references: Vec) -> Vulnerability { + self.references = references; + self + } + + pub fn references(&self) -> &Vec { + &self.references + } + + + pub fn set_severity(&mut self, severity: String) { + self.severity = Some(severity); + } + + pub fn with_severity(mut self, severity: String) -> Vulnerability { + self.severity = Some(severity); + self + } + + pub fn severity(&self) -> Option<&String> { + self.severity.as_ref() + } + + pub fn reset_severity(&mut self) { + self.severity = None; + } + + pub fn set_severity_source(&mut self, severity_source: String) { + self.severity_source = severity_source; + } + + pub fn with_severity_source(mut self, severity_source: String) -> Vulnerability { + self.severity_source = severity_source; + self + } + + pub fn severity_source(&self) -> &String { + &self.severity_source + } + + + pub fn set_title(&mut self, title: String) { + self.title = title; + } + + pub fn with_title(mut self, title: String) -> Vulnerability { + self.title = title; + self + } + + pub fn title(&self) -> &String { + &self.title + } + + + pub fn set_vulnerability_id(&mut self, vulnerability_id: String) { + self.vulnerability_id = vulnerability_id; + } + + pub fn with_vulnerability_id(mut self, vulnerability_id: String) -> Vulnerability { + self.vulnerability_id = vulnerability_id; + self + } + + pub fn vulnerability_id(&self) -> &String { + &self.vulnerability_id + } + + +} + + + diff --git a/bindings/rust/src/src/models/vulnerability_scan.rs b/bindings/rust/src/src/models/vulnerability_scan.rs new file mode 100644 index 00000000..7dc4b558 --- /dev/null +++ b/bindings/rust/src/src/models/vulnerability_scan.rs @@ -0,0 +1,79 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct VulnerabilityScan { + #[serde(rename = "results")] + results: Vec<::models::Vulnerability>, + #[serde(rename = "target")] + target: String, + #[serde(rename = "type")] + _type: String +} + +impl VulnerabilityScan { + pub fn new(results: Vec<::models::Vulnerability>, target: String, _type: String) -> VulnerabilityScan { + VulnerabilityScan { + results: results, + target: target, + _type: _type + } + } + + pub fn set_results(&mut self, results: Vec<::models::Vulnerability>) { + self.results = results; + } + + pub fn with_results(mut self, results: Vec<::models::Vulnerability>) -> VulnerabilityScan { + self.results = results; + self + } + + pub fn results(&self) -> &Vec<::models::Vulnerability> { + &self.results + } + + + pub fn set_target(&mut self, target: String) { + self.target = target; + } + + pub fn with_target(mut self, target: String) -> VulnerabilityScan { + self.target = target; + self + } + + pub fn target(&self) -> &String { + &self.target + } + + + pub fn set__type(&mut self, _type: String) { + self._type = _type; + } + + pub fn with__type(mut self, _type: String) -> VulnerabilityScan { + self._type = _type; + self + } + + pub fn _type(&self) -> &String { + &self._type + } + + +} + + + diff --git a/bindings/rust/src/src/models/vulnerability_scan_results.rs b/bindings/rust/src/src/models/vulnerability_scan_results.rs new file mode 100644 index 00000000..a3116858 --- /dev/null +++ b/bindings/rust/src/src/models/vulnerability_scan_results.rs @@ -0,0 +1,179 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct VulnerabilityScanResults { + /// The time this scan result was stored. + #[serde(rename = "created_at")] + created_at: Option, + /// Do the results contain any known vulnerabilities? + #[serde(rename = "has_vulnerabilities")] + has_vulnerabilities: Option, + #[serde(rename = "identifier")] + identifier: String, + #[serde(rename = "max_severity")] + max_severity: Option, + #[serde(rename = "num_vulnerabilities")] + num_vulnerabilities: Option, + #[serde(rename = "package")] + package: ::models::PackageVulnerability, + /// Deprecated (23-05-15): Please use 'identifier' instead. Previously: A monotonically increasing number that identified a scan within a repository. + #[serde(rename = "scan_id")] + scan_id: i32, + #[serde(rename = "scans")] + scans: Vec<::models::VulnerabilityScan> +} + +impl VulnerabilityScanResults { + pub fn new(identifier: String, package: ::models::PackageVulnerability, scan_id: i32, scans: Vec<::models::VulnerabilityScan>) -> VulnerabilityScanResults { + VulnerabilityScanResults { + created_at: None, + has_vulnerabilities: None, + identifier: identifier, + max_severity: None, + num_vulnerabilities: None, + package: package, + scan_id: scan_id, + scans: scans + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> VulnerabilityScanResults { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_has_vulnerabilities(&mut self, has_vulnerabilities: bool) { + self.has_vulnerabilities = Some(has_vulnerabilities); + } + + pub fn with_has_vulnerabilities(mut self, has_vulnerabilities: bool) -> VulnerabilityScanResults { + self.has_vulnerabilities = Some(has_vulnerabilities); + self + } + + pub fn has_vulnerabilities(&self) -> Option<&bool> { + self.has_vulnerabilities.as_ref() + } + + pub fn reset_has_vulnerabilities(&mut self) { + self.has_vulnerabilities = None; + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = identifier; + } + + pub fn with_identifier(mut self, identifier: String) -> VulnerabilityScanResults { + self.identifier = identifier; + self + } + + pub fn identifier(&self) -> &String { + &self.identifier + } + + + pub fn set_max_severity(&mut self, max_severity: String) { + self.max_severity = Some(max_severity); + } + + pub fn with_max_severity(mut self, max_severity: String) -> VulnerabilityScanResults { + self.max_severity = Some(max_severity); + self + } + + pub fn max_severity(&self) -> Option<&String> { + self.max_severity.as_ref() + } + + pub fn reset_max_severity(&mut self) { + self.max_severity = None; + } + + pub fn set_num_vulnerabilities(&mut self, num_vulnerabilities: i32) { + self.num_vulnerabilities = Some(num_vulnerabilities); + } + + pub fn with_num_vulnerabilities(mut self, num_vulnerabilities: i32) -> VulnerabilityScanResults { + self.num_vulnerabilities = Some(num_vulnerabilities); + self + } + + pub fn num_vulnerabilities(&self) -> Option<&i32> { + self.num_vulnerabilities.as_ref() + } + + pub fn reset_num_vulnerabilities(&mut self) { + self.num_vulnerabilities = None; + } + + pub fn set_package(&mut self, package: ::models::PackageVulnerability) { + self.package = package; + } + + pub fn with_package(mut self, package: ::models::PackageVulnerability) -> VulnerabilityScanResults { + self.package = package; + self + } + + pub fn package(&self) -> &::models::PackageVulnerability { + &self.package + } + + + pub fn set_scan_id(&mut self, scan_id: i32) { + self.scan_id = scan_id; + } + + pub fn with_scan_id(mut self, scan_id: i32) -> VulnerabilityScanResults { + self.scan_id = scan_id; + self + } + + pub fn scan_id(&self) -> &i32 { + &self.scan_id + } + + + pub fn set_scans(&mut self, scans: Vec<::models::VulnerabilityScan>) { + self.scans = scans; + } + + pub fn with_scans(mut self, scans: Vec<::models::VulnerabilityScan>) -> VulnerabilityScanResults { + self.scans = scans; + self + } + + pub fn scans(&self) -> &Vec<::models::VulnerabilityScan> { + &self.scans + } + + +} + + + diff --git a/bindings/rust/src/src/models/vulnerability_scan_results_list.rs b/bindings/rust/src/src/models/vulnerability_scan_results_list.rs new file mode 100644 index 00000000..df93ddb4 --- /dev/null +++ b/bindings/rust/src/src/models/vulnerability_scan_results_list.rs @@ -0,0 +1,162 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct VulnerabilityScanResultsList { + /// The time this scan result was stored. + #[serde(rename = "created_at")] + created_at: Option, + /// Do the results contain any known vulnerabilities? + #[serde(rename = "has_vulnerabilities")] + has_vulnerabilities: Option, + #[serde(rename = "identifier")] + identifier: String, + #[serde(rename = "max_severity")] + max_severity: Option, + #[serde(rename = "num_vulnerabilities")] + num_vulnerabilities: Option, + #[serde(rename = "package")] + package: ::models::PackageVulnerability, + /// Deprecated (23-05-15): Please use 'identifier' instead. Previously: A monotonically increasing number that identified a scan within a repository. + #[serde(rename = "scan_id")] + scan_id: i32 +} + +impl VulnerabilityScanResultsList { + pub fn new(identifier: String, package: ::models::PackageVulnerability, scan_id: i32) -> VulnerabilityScanResultsList { + VulnerabilityScanResultsList { + created_at: None, + has_vulnerabilities: None, + identifier: identifier, + max_severity: None, + num_vulnerabilities: None, + package: package, + scan_id: scan_id + } + } + + pub fn set_created_at(&mut self, created_at: String) { + self.created_at = Some(created_at); + } + + pub fn with_created_at(mut self, created_at: String) -> VulnerabilityScanResultsList { + self.created_at = Some(created_at); + self + } + + pub fn created_at(&self) -> Option<&String> { + self.created_at.as_ref() + } + + pub fn reset_created_at(&mut self) { + self.created_at = None; + } + + pub fn set_has_vulnerabilities(&mut self, has_vulnerabilities: bool) { + self.has_vulnerabilities = Some(has_vulnerabilities); + } + + pub fn with_has_vulnerabilities(mut self, has_vulnerabilities: bool) -> VulnerabilityScanResultsList { + self.has_vulnerabilities = Some(has_vulnerabilities); + self + } + + pub fn has_vulnerabilities(&self) -> Option<&bool> { + self.has_vulnerabilities.as_ref() + } + + pub fn reset_has_vulnerabilities(&mut self) { + self.has_vulnerabilities = None; + } + + pub fn set_identifier(&mut self, identifier: String) { + self.identifier = identifier; + } + + pub fn with_identifier(mut self, identifier: String) -> VulnerabilityScanResultsList { + self.identifier = identifier; + self + } + + pub fn identifier(&self) -> &String { + &self.identifier + } + + + pub fn set_max_severity(&mut self, max_severity: String) { + self.max_severity = Some(max_severity); + } + + pub fn with_max_severity(mut self, max_severity: String) -> VulnerabilityScanResultsList { + self.max_severity = Some(max_severity); + self + } + + pub fn max_severity(&self) -> Option<&String> { + self.max_severity.as_ref() + } + + pub fn reset_max_severity(&mut self) { + self.max_severity = None; + } + + pub fn set_num_vulnerabilities(&mut self, num_vulnerabilities: i32) { + self.num_vulnerabilities = Some(num_vulnerabilities); + } + + pub fn with_num_vulnerabilities(mut self, num_vulnerabilities: i32) -> VulnerabilityScanResultsList { + self.num_vulnerabilities = Some(num_vulnerabilities); + self + } + + pub fn num_vulnerabilities(&self) -> Option<&i32> { + self.num_vulnerabilities.as_ref() + } + + pub fn reset_num_vulnerabilities(&mut self) { + self.num_vulnerabilities = None; + } + + pub fn set_package(&mut self, package: ::models::PackageVulnerability) { + self.package = package; + } + + pub fn with_package(mut self, package: ::models::PackageVulnerability) -> VulnerabilityScanResultsList { + self.package = package; + self + } + + pub fn package(&self) -> &::models::PackageVulnerability { + &self.package + } + + + pub fn set_scan_id(&mut self, scan_id: i32) { + self.scan_id = scan_id; + } + + pub fn with_scan_id(mut self, scan_id: i32) -> VulnerabilityScanResultsList { + self.scan_id = scan_id; + self + } + + pub fn scan_id(&self) -> &i32 { + &self.scan_id + } + + +} + + + diff --git a/bindings/rust/src/src/models/vulnerability_scan_version.rs b/bindings/rust/src/src/models/vulnerability_scan_version.rs new file mode 100644 index 00000000..03f8182c --- /dev/null +++ b/bindings/rust/src/src/models/vulnerability_scan_version.rs @@ -0,0 +1,139 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct VulnerabilityScanVersion { + #[serde(rename = "major")] + major: i32, + #[serde(rename = "minor")] + minor: i32, + #[serde(rename = "operator")] + operator: Option, + #[serde(rename = "patch")] + patch: i32, + #[serde(rename = "raw_version")] + raw_version: Option, + #[serde(rename = "version")] + version: Option +} + +impl VulnerabilityScanVersion { + pub fn new(major: i32, minor: i32, patch: i32) -> VulnerabilityScanVersion { + VulnerabilityScanVersion { + major: major, + minor: minor, + operator: None, + patch: patch, + raw_version: None, + version: None + } + } + + pub fn set_major(&mut self, major: i32) { + self.major = major; + } + + pub fn with_major(mut self, major: i32) -> VulnerabilityScanVersion { + self.major = major; + self + } + + pub fn major(&self) -> &i32 { + &self.major + } + + + pub fn set_minor(&mut self, minor: i32) { + self.minor = minor; + } + + pub fn with_minor(mut self, minor: i32) -> VulnerabilityScanVersion { + self.minor = minor; + self + } + + pub fn minor(&self) -> &i32 { + &self.minor + } + + + pub fn set_operator(&mut self, operator: String) { + self.operator = Some(operator); + } + + pub fn with_operator(mut self, operator: String) -> VulnerabilityScanVersion { + self.operator = Some(operator); + self + } + + pub fn operator(&self) -> Option<&String> { + self.operator.as_ref() + } + + pub fn reset_operator(&mut self) { + self.operator = None; + } + + pub fn set_patch(&mut self, patch: i32) { + self.patch = patch; + } + + pub fn with_patch(mut self, patch: i32) -> VulnerabilityScanVersion { + self.patch = patch; + self + } + + pub fn patch(&self) -> &i32 { + &self.patch + } + + + pub fn set_raw_version(&mut self, raw_version: String) { + self.raw_version = Some(raw_version); + } + + pub fn with_raw_version(mut self, raw_version: String) -> VulnerabilityScanVersion { + self.raw_version = Some(raw_version); + self + } + + pub fn raw_version(&self) -> Option<&String> { + self.raw_version.as_ref() + } + + pub fn reset_raw_version(&mut self) { + self.raw_version = None; + } + + pub fn set_version(&mut self, version: String) { + self.version = Some(version); + } + + pub fn with_version(mut self, version: String) -> VulnerabilityScanVersion { + self.version = Some(version); + self + } + + pub fn version(&self) -> Option<&String> { + self.version.as_ref() + } + + pub fn reset_version(&mut self) { + self.version = None; + } + +} + + + diff --git a/bindings/rust/src/src/models/webhook_template.rs b/bindings/rust/src/src/models/webhook_template.rs new file mode 100644 index 00000000..ac129057 --- /dev/null +++ b/bindings/rust/src/src/models/webhook_template.rs @@ -0,0 +1,65 @@ +/* + * Cloudsmith API (v1) + * + * The API to the Cloudsmith Service + * + * OpenAPI spec version: v1 + * Contact: support@cloudsmith.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +#[allow(unused_imports)] +use serde_json::Value; + +#[derive(Debug, Serialize, Deserialize)] +pub struct WebhookTemplate { + #[serde(rename = "event")] + event: String, + #[serde(rename = "template")] + template: Option +} + +impl WebhookTemplate { + pub fn new(event: String) -> WebhookTemplate { + WebhookTemplate { + event: event, + template: None + } + } + + pub fn set_event(&mut self, event: String) { + self.event = event; + } + + pub fn with_event(mut self, event: String) -> WebhookTemplate { + self.event = event; + self + } + + pub fn event(&self) -> &String { + &self.event + } + + + pub fn set_template(&mut self, template: String) { + self.template = Some(template); + } + + pub fn with_template(mut self, template: String) -> WebhookTemplate { + self.template = Some(template); + self + } + + pub fn template(&self) -> Option<&String> { + self.template.as_ref() + } + + pub fn reset_template(&mut self) { + self.template = None; + } + +} + + + diff --git a/bindings/rust/templates/Cargo.mustache b/bindings/rust/templates/Cargo.mustache new file mode 100644 index 00000000..16f6b864 --- /dev/null +++ b/bindings/rust/templates/Cargo.mustache @@ -0,0 +1,20 @@ +[package] +name = "{{{packageName}}}" +version = "{{{packageVersion}}}" +authors = ["Cloudsmith Ltd "] +license = "Apache-2.0" +homepage = "https://cloudsmith.com/" +repository = "https://github.com/cloudsmith-io/cloudsmith-api" + +[dependencies] +serde = "1.0" +serde_derive = "1.0" +serde_yaml = "0.7" +serde_json = "1.0" +base64 = "~0.7.0" +futures = "0.1.16" +hyper = "0.11.6" +url = "1.5" + +[dev-dependencies] +tokio-core = "*" diff --git a/bindings/rust/templates/api.mustache b/bindings/rust/templates/api.mustache new file mode 100644 index 00000000..cab8dc2d --- /dev/null +++ b/bindings/rust/templates/api.mustache @@ -0,0 +1,168 @@ +{{>partial_header}} +use std::rc::Rc; +use std::borrow::Borrow; +use std::borrow::Cow; +use std::collections::HashMap; + +use hyper; +use serde_json; +use futures; +use futures::{Future, Stream}; + +use hyper::header::UserAgent; + +use super::{Error, configuration}; + +pub struct {{{classname}}}Client { + configuration: Rc>, +} + +impl {{{classname}}}Client { + pub fn new(configuration: Rc>) -> {{{classname}}}Client { + {{{classname}}}Client { + configuration: configuration, + } + } +} + +pub trait {{classname}} { +{{#operations}} +{{#operation}} + fn {{{operationId}}}(&self, {{#allParams}}{{paramName}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; +{{/operation}} +{{/operations}} +} + + +impl{{classname}} for {{classname}}Client { +{{#operations}} +{{#operation}} + fn {{{operationId}}}(&self, {{#allParams}}{{paramName}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + +{{#hasAuthMethods}} + let mut auth_headers = HashMap::::new(); + let mut auth_query = HashMap::::new(); +{{#authMethods}} +{{#isApiKey}} + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + {{#isKeyInHeader}} + auth_headers.insert("{{keyParamName}}".to_owned(), val); + {{/isKeyInHeader}} + {{#isKeyInQuery}} + auth_query.insert("{{keyParamName}}".to_owned(), val); + {{/isKeyInQuery}} + }; +{{/isApiKey}} +{{#isBasic}} + if let Some(ref auth_conf) = configuration.basic_auth { + let auth = hyper::header::Authorization( + hyper::header::Basic { + username: auth_conf.0.to_owned(), + password: auth_conf.1.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; +{{/isBasic}} +{{#isOAuth}} + if let Some(ref token) = configuration.oauth_access_token { + let auth = hyper::header::Authorization( + hyper::header::Bearer { + token: token.to_owned(), + } + ); + auth_headers.insert("Authorization".to_owned(), auth.to_string()); + }; +{{/isOAuth}} +{{/authMethods}} +{{/hasAuthMethods}} + let method = hyper::Method::{{httpMethod}}; + + let query_string = { + let mut url_query_param = ::url::form_urlencoded::Serializer::new(String::new()); +{{#queryParams}} + url_query_param.append_pair("{{baseName}}", &{{paramName}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); +{{/queryParams}} +{{#hasAuthMethods}} + for (key, val) in &auth_query { + url_query_param.append_pair(key, val); + } +{{/hasAuthMethods}} + url_query_param.finish() + }; + let uri_str = format!("{}{{{path}}}?{}", configuration.base_path, query_string{{#pathParams}}, {{baseName}}={{paramName}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{/pathParams}}); + + // TODO(farcaller): handle error + // if let Err(e) = uri { + // return Box::new(futures::future::err(e)); + // } + let mut uri: hyper::Uri = uri_str.parse().unwrap(); + + let mut req = hyper::Request::new(method, uri); + + if let Some(ref user_agent) = configuration.user_agent { + req.headers_mut().set(UserAgent::new(Cow::Owned(user_agent.clone()))); + } + + {{#hasHeaderParams}} + { + let mut headers = req.headers_mut(); + {{#headerParams}} + headers.set_raw("{{baseName}}", {{paramName}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}); + {{/headerParams}} + } + {{/hasHeaderParams}} + + {{#hasAuthMethods}} + for (key, val) in auth_headers { + req.headers_mut().set_raw(key, val); + } + {{/hasAuthMethods}} + + {{#hasBodyParam}} + {{#bodyParams}} + let serialized = serde_json::to_string(&{{paramName}}).unwrap(); + req.headers_mut().set(hyper::header::ContentType::json()); + req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); + req.set_body(serialized); + {{/bodyParams}} + {{/hasBodyParam}} + + // send request + Box::new( + configuration.client.request(req) + .map_err(|e| Error::from(e)) + .and_then(|resp| { + let status = resp.status(); + resp.body().concat2() + .and_then(move |body| Ok((status, body))) + .map_err(|e| Error::from(e)) + }) + .and_then(|(status, body)| { + if status.is_success() { + Ok(body) + } else { + Err(Error::from((status, &*body))) + } + }) + {{^returnType}} + .and_then(|_| futures::future::ok(())) + {{/returnType}} + {{#returnType}} + .and_then(|body| { + let parsed: Result<{{{returnType}}}, _> = serde_json::from_slice(&body); + parsed.map_err(|e| Error::from(e)) + }) + {{/returnType}} + ) + } + +{{/operation}} +{{/operations}} +} \ No newline at end of file diff --git a/bindings/rust/test.sh b/bindings/rust/test.sh new file mode 100755 index 00000000..5043027e --- /dev/null +++ b/bindings/rust/test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e + +self=$(readlink -f $BASH_SOURCE) +self_dir=$(dirname $self) +root_dir=$(readlink -f "$self_dir/../..") +. $root_dir/scripts/common.sh $1 + +src_dir="$self_dir/src" + +cd $src_dir +cargo test \ No newline at end of file