diff --git a/harness/har/README.md b/harness/har/README.md new file mode 100644 index 00000000..e1a17052 --- /dev/null +++ b/harness/har/README.md @@ -0,0 +1,136 @@ +# Go API client for swagger + +No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + +## 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: 1.0.0 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen +For more information, please visit [https://www.harness.io](https://www.harness.io) + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./har" +``` + +## Documentation for API Endpoints + +All URIs are relative to */gateway/har/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ArtifactsApi* | [**DeleteArtifact**](docs/ArtifactsApi.md#deleteartifact) | **Delete** /registry/{registry_ref}/artifact/{artifact} | Delete Artifact +*ArtifactsApi* | [**DeleteArtifactVersion**](docs/ArtifactsApi.md#deleteartifactversion) | **Delete** /registry/{registry_ref}/artifact/{artifact}/version/{version} | Delete an Artifact Version +*ArtifactsApi* | [**GetAllArtifactVersions**](docs/ArtifactsApi.md#getallartifactversions) | **Get** /registry/{registry_ref}/artifact/{artifact}/versions | List Artifact Versions +*ArtifactsApi* | [**GetArtifactDeployments**](docs/ArtifactsApi.md#getartifactdeployments) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/deploymentdetails | Describe Artifact Deployments +*ArtifactsApi* | [**GetArtifactStats**](docs/ArtifactsApi.md#getartifactstats) | **Get** /registry/{registry_ref}/artifact/{artifact}/stats | Get Artifact Stats +*ArtifactsApi* | [**GetArtifactStatsForRegistry**](docs/ArtifactsApi.md#getartifactstatsforregistry) | **Get** /registry/{registry_ref}/artifact/stats | Get Artifact Stats +*ArtifactsApi* | [**GetArtifactStatsForSpace**](docs/ArtifactsApi.md#getartifactstatsforspace) | **Get** /spaces/{space_ref}/artifact/stats | Get Artifact Stats +*ArtifactsApi* | [**GetArtifactSummary**](docs/ArtifactsApi.md#getartifactsummary) | **Get** /registry/{registry_ref}/artifact/{artifact}/summary | Get Artifact Summary +*ArtifactsApi* | [**GetArtifactVersionSummary**](docs/ArtifactsApi.md#getartifactversionsummary) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/summary | Get Artifact Version Summary +*ArtifactsApi* | [**ListArtifactLabels**](docs/ArtifactsApi.md#listartifactlabels) | **Get** /registry/{registry_ref}/artifact/labels | List Artifact Labels +*ArtifactsApi* | [**RedirectHarnessArtifact**](docs/ArtifactsApi.md#redirectharnessartifact) | **Get** /registry/{registry_identifier}/artifact/{artifact}/redirect | Redirect to Harness Artifact Page +*ArtifactsApi* | [**UpdateArtifactLabels**](docs/ArtifactsApi.md#updateartifactlabels) | **Put** /registry/{registry_ref}/artifact/{artifact}/labels | Update Artifact Labels +*DockerArtifactsApi* | [**GetDockerArtifactDetails**](docs/DockerArtifactsApi.md#getdockerartifactdetails) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details | Describe Docker Artifact Detail +*DockerArtifactsApi* | [**GetDockerArtifactIntegrationDetails**](docs/DockerArtifactsApi.md#getdockerartifactintegrationdetails) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/integrationdetails | Describe Docker Artifact Integration Detail +*DockerArtifactsApi* | [**GetDockerArtifactLayers**](docs/DockerArtifactsApi.md#getdockerartifactlayers) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers | Describe Docker Artifact Layers +*DockerArtifactsApi* | [**GetDockerArtifactManifest**](docs/DockerArtifactsApi.md#getdockerartifactmanifest) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest | Describe Docker Artifact Manifest +*DockerArtifactsApi* | [**GetDockerArtifactManifests**](docs/DockerArtifactsApi.md#getdockerartifactmanifests) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests | Describe Docker Artifact Manifests +*HelmArtifactsApi* | [**GetHelmArtifactDetails**](docs/HelmArtifactsApi.md#gethelmartifactdetails) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details | Describe Helm Artifact Detail +*HelmArtifactsApi* | [**GetHelmArtifactManifest**](docs/HelmArtifactsApi.md#gethelmartifactmanifest) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest | Describe Helm Artifact Manifest +*RegistriesApi* | [**CreateRegistry**](docs/RegistriesApi.md#createregistry) | **Post** /registry | Create Registry. +*RegistriesApi* | [**DeleteRegistry**](docs/RegistriesApi.md#deleteregistry) | **Delete** /registry/{registry_ref} | Delete a Registry +*RegistriesApi* | [**GetAllArtifactsByRegistry**](docs/RegistriesApi.md#getallartifactsbyregistry) | **Get** /registry/{registry_ref}/artifacts | List Artifacts for Registry +*RegistriesApi* | [**GetClientSetupDetails**](docs/RegistriesApi.md#getclientsetupdetails) | **Get** /registry/{registry_ref}/client-setup-details | Returns CLI Client Setup Details +*RegistriesApi* | [**GetRegistry**](docs/RegistriesApi.md#getregistry) | **Get** /registry/{registry_ref} | Returns Registry Details +*RegistriesApi* | [**ModifyRegistry**](docs/RegistriesApi.md#modifyregistry) | **Put** /registry/{registry_ref} | Updates a Registry +*SpacesApi* | [**GetAllHarnessArtifacts**](docs/SpacesApi.md#getallharnessartifacts) | **Get** /spaces/{space_ref}/artifacts | List Harness Artifacts +*SpacesApi* | [**GetAllRegistries**](docs/SpacesApi.md#getallregistries) | **Get** /spaces/{space_ref}/registries | List Registries + +## Documentation For Models + + - [ArtifactDeploymentsDetail](docs/ArtifactDeploymentsDetail.md) + - [ArtifactDeploymentsDetails](docs/ArtifactDeploymentsDetails.md) + - [ArtifactDeploymentsList](docs/ArtifactDeploymentsList.md) + - [ArtifactLabelRequest](docs/ArtifactLabelRequest.md) + - [ArtifactMetadata](docs/ArtifactMetadata.md) + - [ArtifactStats](docs/ArtifactStats.md) + - [ArtifactSummary](docs/ArtifactSummary.md) + - [ArtifactVersionMetadata](docs/ArtifactVersionMetadata.md) + - [ArtifactVersionSummary](docs/ArtifactVersionSummary.md) + - [AuthType](docs/AuthType.md) + - [BuildDetails](docs/BuildDetails.md) + - [CleanupPolicy](docs/CleanupPolicy.md) + - [ClientSetupDetails](docs/ClientSetupDetails.md) + - [ClientSetupSection](docs/ClientSetupSection.md) + - [ClientSetupStep](docs/ClientSetupStep.md) + - [ClientSetupStepCommand](docs/ClientSetupStepCommand.md) + - [ClientSetupStepType](docs/ClientSetupStepType.md) + - [DeploymentDetails](docs/DeploymentDetails.md) + - [DeploymentMetadata](docs/DeploymentMetadata.md) + - [DeploymentStats](docs/DeploymentStats.md) + - [DockerArtifactDetail](docs/DockerArtifactDetail.md) + - [DockerArtifactIntegrationDetail](docs/DockerArtifactIntegrationDetail.md) + - [DockerArtifactManifest](docs/DockerArtifactManifest.md) + - [DockerLayerEntry](docs/DockerLayerEntry.md) + - [DockerLayersSummary](docs/DockerLayersSummary.md) + - [DockerManifestDetails](docs/DockerManifestDetails.md) + - [DockerManifests](docs/DockerManifests.md) + - [EnvironmentType](docs/EnvironmentType.md) + - [HelmArtifactDetail](docs/HelmArtifactDetail.md) + - [HelmArtifactManifest](docs/HelmArtifactManifest.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse20010](docs/InlineResponse20010.md) + - [InlineResponse20011](docs/InlineResponse20011.md) + - [InlineResponse20012](docs/InlineResponse20012.md) + - [InlineResponse20013](docs/InlineResponse20013.md) + - [InlineResponse20014](docs/InlineResponse20014.md) + - [InlineResponse20015](docs/InlineResponse20015.md) + - [InlineResponse20016](docs/InlineResponse20016.md) + - [InlineResponse20017](docs/InlineResponse20017.md) + - [InlineResponse2002](docs/InlineResponse2002.md) + - [InlineResponse2003](docs/InlineResponse2003.md) + - [InlineResponse2004](docs/InlineResponse2004.md) + - [InlineResponse2005](docs/InlineResponse2005.md) + - [InlineResponse2006](docs/InlineResponse2006.md) + - [InlineResponse2007](docs/InlineResponse2007.md) + - [InlineResponse2008](docs/InlineResponse2008.md) + - [InlineResponse2009](docs/InlineResponse2009.md) + - [InlineResponse201](docs/InlineResponse201.md) + - [ListArtifact](docs/ListArtifact.md) + - [ListArtifactLabel](docs/ListArtifactLabel.md) + - [ListArtifactVersion](docs/ListArtifactVersion.md) + - [ListRegistry](docs/ListRegistry.md) + - [ListRegistryArtifact](docs/ListRegistryArtifact.md) + - [ModelError](docs/ModelError.md) + - [OneOfRegistryConfig](docs/OneOfRegistryConfig.md) + - [OneOfUpstreamConfigAuth](docs/OneOfUpstreamConfigAuth.md) + - [PackageType](docs/PackageType.md) + - [Registry](docs/Registry.md) + - [RegistryArtifactMetadata](docs/RegistryArtifactMetadata.md) + - [RegistryConfig](docs/RegistryConfig.md) + - [RegistryMetadata](docs/RegistryMetadata.md) + - [RegistryRequest](docs/RegistryRequest.md) + - [RegistryType](docs/RegistryType.md) + - [SbomDetails](docs/SbomDetails.md) + - [Scanner](docs/Scanner.md) + - [SlsaDetails](docs/SlsaDetails.md) + - [Status](docs/Status.md) + - [StoDetails](docs/StoDetails.md) + - [StoDigestMetadata](docs/StoDigestMetadata.md) + - [StoMetadata](docs/StoMetadata.md) + - [UpstreamConfig](docs/UpstreamConfig.md) + - [UserPassword](docs/UserPassword.md) + - [VirtualConfig](docs/VirtualConfig.md) + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + + diff --git a/harness/har/api/swagger.yaml b/harness/har/api/swagger.yaml new file mode 100644 index 00000000..65a7c021 --- /dev/null +++ b/harness/har/api/swagger.yaml @@ -0,0 +1,4768 @@ +openapi: 3.0.0 +info: + title: Harness Artifact Registry API + contact: + name: Harness Artifact Registry - developers + url: https://www.harness.io + version: 1.0.0 +servers: +- url: /gateway/har/api/v1 + description: Registry +tags: +- name: Registries + description: "APIs to create, update, list registries" +- name: Artifacts + description: "APIs to get, list artifacts" +- name: Docker Artifacts + description: APIs to get details of docker artifacts +- name: Helm Artifacts + description: APIs to get details of helm artifacts +paths: + /registry: + post: + tags: + - Registries + summary: Create Registry. + description: Create a Registry. + operationId: CreateRegistry + parameters: + - name: space_ref + in: query + description: Unique space path + required: false + style: form + explode: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/RegistryRequest' + responses: + "201": + description: "response for create, get and update registry" + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_identifier}/artifact/{artifact}/redirect: + get: + tags: + - Artifacts + summary: Redirect to Harness Artifact Page + description: Redirect to Harness Artifact Page + operationId: RedirectHarnessArtifact + parameters: + - name: registry_identifier + in: path + description: Unique registry Identifier in a account. + required: true + style: simple + explode: false + schema: + type: string + - name: accountIdentifier + in: query + description: Account Identifier + required: false + style: form + explode: true + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: query + description: Version + required: false + style: form + explode: true + schema: + type: string + responses: + "302": + description: Temporary Redirect + headers: + Location: + description: The URL of the redirected resource + style: simple + explode: false + schema: + type: string + format: uri + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}: + get: + tags: + - Registries + summary: Returns Registry Details + description: Returns Registry Details in the account for the given key + operationId: GetRegistry + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "response for create, get and update registry" + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + tags: + - Registries + summary: Updates a Registry + description: Updates a Registry in the account for the given key + operationId: ModifyRegistry + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/RegistryRequest' + responses: + "200": + description: "response for create, get and update registry" + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Registries + summary: Delete a Registry + description: Delete a Registry in the account for the given key + operationId: DeleteRegistry + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Success Response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}: + delete: + tags: + - Artifacts + summary: Delete Artifact + description: Delete Artifact. + operationId: DeleteArtifact + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Success Response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/labels: + put: + tags: + - Artifacts + summary: Update Artifact Labels + description: Update Artifact Labels. + operationId: UpdateArtifactLabels + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ArtifactLabelRequest' + responses: + "200": + description: response to get artifact label response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/stats: + get: + tags: + - Artifacts + summary: Get Artifact Stats + description: Get Artifact Stats. + operationId: GetArtifactStats + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: from + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + - name: to + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get artifact stats response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_2' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/summary: + get: + tags: + - Artifacts + summary: Get Artifact Summary + description: Get Artifact Summary. + operationId: GetArtifactSummary + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: response to get artifact summary + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}: + delete: + tags: + - Artifacts + summary: Delete an Artifact Version + description: Delete Artifact Version. + operationId: DeleteArtifactVersion + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Success Response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/deploymentdetails: + get: + tags: + - Artifacts + summary: Describe Artifact Deployments + description: Get Artifact Deployments + operationId: GetArtifactDeployments + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + - name: env_type + in: query + description: env type + required: false + style: form + explode: true + schema: + type: string + description: Environment Type + enum: + - PreProduction + - Production + - name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + - name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + - name: sort_order + in: query + description: sortOrder + required: false + style: form + explode: true + schema: + type: string + - name: sort_field + in: query + description: sortField + required: false + style: form + explode: true + schema: + type: string + - name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get docker artifact deployments details + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_3' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details: + get: + tags: + - Docker Artifacts + summary: Describe Docker Artifact Detail + description: Get Docker Artifact Details + operationId: GetDockerArtifactDetails + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + - name: digest + in: query + description: Digest. + required: true + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get docker artifact detail + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_4' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/integrationdetails: + get: + tags: + - Docker Artifacts + summary: Describe Docker Artifact Integration Detail + description: Get Docker Artifact Integration Details + operationId: GetDockerArtifactIntegrationDetails + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + - name: digest + in: query + description: Digest. + required: true + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get docker artifact integration detail + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_5' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers: + get: + tags: + - Docker Artifacts + summary: Describe Docker Artifact Layers + description: Get Docker Artifact Layers + operationId: GetDockerArtifactLayers + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + - name: digest + in: query + description: Digest. + required: true + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get artifact layers + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_6' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest: + get: + tags: + - Docker Artifacts + summary: Describe Docker Artifact Manifest + description: Get Docker Artifact Manifest + operationId: GetDockerArtifactManifest + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + - name: digest + in: query + description: Digest. + required: true + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get docker artifact manifest + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_7' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests: + get: + tags: + - Docker Artifacts + summary: Describe Docker Artifact Manifests + description: Get Docker Artifact Manifests + operationId: GetDockerArtifactManifests + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: response to get artifact layers + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_8' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details: + get: + tags: + - Helm Artifacts + summary: Describe Helm Artifact Detail + description: Get Helm Artifact Details + operationId: GetHelmArtifactDetails + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: response to get helm artifact detail + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_9' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest: + get: + tags: + - Helm Artifacts + summary: Describe Helm Artifact Manifest + description: Get Helm Artifact Manifest + operationId: GetHelmArtifactManifest + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: response to get helm artifact manifest + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_10' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/version/{version}/summary: + get: + tags: + - Artifacts + summary: Get Artifact Version Summary + description: Get Artifact Version Summary. + operationId: GetArtifactVersionSummary + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + - name: digest + in: query + description: Digest. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get docker artifact version summary + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_11' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/{artifact}/versions: + get: + tags: + - Artifacts + summary: List Artifact Versions + description: Lists all the Artifact Versions. + operationId: GetAllArtifactVersions + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + - name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + - name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + - name: sort_order + in: query + description: sortOrder + required: false + style: form + explode: true + schema: + type: string + - name: sort_field + in: query + description: sortField + required: false + style: form + explode: true + schema: + type: string + - name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response for list versions of artifact + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_12' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/labels: + get: + tags: + - Artifacts + summary: List Artifact Labels + description: List Artifact Labels. + operationId: ListArtifactLabels + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + - name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + - name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response for list artifact labels + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_13' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifact/stats: + get: + tags: + - Artifacts + summary: Get Artifact Stats + description: Get Artifact Stats. + operationId: GetArtifactStatsForRegistry + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: from + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + - name: to + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get artifact stats response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_2' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/artifacts: + get: + tags: + - Registries + summary: List Artifacts for Registry + description: Lists all the Artifacts for Registry + operationId: GetAllArtifactsByRegistry + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: label + in: query + description: Label. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + - name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + - name: sort_order + in: query + description: sortOrder + required: false + style: form + explode: true + schema: + type: string + - name: sort_field + in: query + description: sortField + required: false + style: form + explode: true + schema: + type: string + - name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response for list artifact + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_14' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registry/{registry_ref}/client-setup-details: + get: + tags: + - Registries + summary: Returns CLI Client Setup Details + description: Returns CLI Client Setup Details based on package type + operationId: GetClientSetupDetails + parameters: + - name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + - name: artifact + in: query + description: Artifat + required: false + style: form + explode: true + schema: + type: string + - name: version + in: query + description: Version + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response for client setup details + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_15' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /spaces/{space_ref}/artifact/stats: + get: + tags: + - Artifacts + summary: Get Artifact Stats + description: Get Artifact Stats. + operationId: GetArtifactStatsForSpace + parameters: + - name: space_ref + in: path + description: Unique space path. + required: true + style: simple + explode: false + schema: + type: string + - name: from + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + - name: to + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: response to get artifact stats response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_2' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /spaces/{space_ref}/artifacts: + get: + tags: + - Spaces + summary: List Harness Artifacts + description: Lists all the Harness Artifacts. + operationId: GetAllHarnessArtifacts + parameters: + - name: space_ref + in: path + description: Unique space path. + required: true + style: simple + explode: false + schema: + type: string + - name: reg_identifier + in: query + description: Registry Identifier + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + - name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + - name: sort_order + in: query + description: sortOrder + required: false + style: form + explode: true + schema: + type: string + - name: sort_field + in: query + description: sortField + required: false + style: form + explode: true + schema: + type: string + - name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + - name: latest_version + in: query + description: Latest Version Filter. + required: false + style: form + explode: true + schema: + type: boolean + - name: deployed_artifact + in: query + description: Deployed Artifact Filter. + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: response for list artifact + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_16' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /spaces/{space_ref}/registries: + get: + tags: + - Spaces + summary: List Registries + description: Lists all the Registries. + operationId: GetAllRegistries + parameters: + - name: space_ref + in: path + description: Unique space path. + required: true + style: simple + explode: false + schema: + type: string + - name: package_type + in: query + description: Registry Package Type + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: type + in: query + description: Registry Type + required: false + style: form + explode: true + schema: + type: string + enum: + - VIRTUAL + - UPSTREAM + - name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + - name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + - name: sort_order + in: query + description: sortOrder + required: false + style: form + explode: true + schema: + type: string + - name: sort_field + in: query + description: sortField + required: false + style: form + explode: true + schema: + type: string + - name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + - name: recursive + in: query + description: Whether to list registries recursively. + required: false + style: form + explode: true + schema: + type: boolean + default: false + responses: + "200": + description: response for list registry + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_17' + "400": + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "500": + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +components: + schemas: + Anonymous: {} + ArtifactDeploymentsDetail: + type: object + properties: + count: + type: integer + envIdentifier: + type: string + envName: + type: string + envType: + $ref: '#/components/schemas/EnvironmentType' + infraIdentifier: + type: string + infraName: + type: string + lastDeployedAt: + type: string + lastDeployedById: + type: string + lastDeployedByName: + type: string + lastPipelineExecutionId: + type: string + lastPipelineExecutionName: + type: string + orgIdentifier: + type: string + pipelineId: + type: string + projectIdentifier: + type: string + serviceIdentifier: + type: string + serviceName: + type: string + description: Artifact deployments Detail + example: + lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + ArtifactDeploymentsDetails: + required: + - deployments + type: object + properties: + deployments: + $ref: '#/components/schemas/ArtifactDeploymentsList' + deploymentsStats: + $ref: '#/components/schemas/DeploymentStats' + description: Docker Artifact deployments Details + example: + deployments: + deployments: + - lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + - lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + pageCount: 100 + pageIndex: 0 + pageSize: 1 + itemCount: 1 + deploymentsStats: + Production: 1 + PreProduction: 6 + ArtifactDeploymentsList: + required: + - artifacts + type: object + properties: + deployments: + type: array + description: A list of Artifact + items: + $ref: '#/components/schemas/ArtifactDeploymentsDetail' + itemCount: + type: integer + description: The total number of items + format: int64 + example: 1 + pageCount: + type: integer + description: The total number of pages + format: int64 + example: 100 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + pageSize: + type: integer + description: The number of items per page + example: 1 + description: A list of Artifact Deployments + example: + deployments: + - lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + - lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + pageCount: 100 + pageIndex: 0 + pageSize: 1 + itemCount: 1 + ArtifactLabelRequest: + required: + - labels + type: object + properties: + labels: + type: array + items: + type: string + ArtifactMetadata: + required: + - latestVersion + - name + - registryIdentifier + - registryPath + - version + type: object + properties: + deploymentMetadata: + $ref: '#/components/schemas/DeploymentMetadata' + downloadsCount: + type: integer + format: int64 + labels: + type: array + items: + type: string + lastModified: + type: string + latestVersion: + type: string + name: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + pullCommand: + type: string + registryIdentifier: + type: string + registryPath: + type: string + scannedDigest: + type: array + items: + $ref: '#/components/schemas/STODigestMetadata' + scannedDigestCount: + type: integer + format: int64 + stoMetadata: + $ref: '#/components/schemas/STOMetadata' + totalDigestCount: + type: integer + format: int64 + version: + type: string + description: Artifact Metadata + example: + scannedDigest: + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + stoMetadata: + scannedCount: 1 + totalCount: 5 + digestMetadata: + - null + - null + packageType: DOCKER + version: version + labels: + - labels + - labels + downloadsCount: 0 + scannedDigestCount: 6 + totalDigestCount: 5 + latestVersion: latestVersion + name: name + lastModified: lastModified + pullCommand: pullCommand + registryIdentifier: registryIdentifier + ArtifactStats: + type: object + properties: + downloadCount: + type: integer + format: int64 + downloadSize: + type: integer + format: int64 + totalStorageSize: + type: integer + format: int64 + uploadSize: + type: integer + format: int64 + description: Harness Artifact Stats + example: + uploadSize: 5 + downloadSize: 6 + downloadCount: 0 + totalStorageSize: 1 + ArtifactSummary: + required: + - imageName + - packageType + type: object + properties: + createdAt: + type: string + downloadsCount: + type: integer + format: int64 + imageName: + type: string + labels: + type: array + items: + type: string + modifiedAt: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + description: Harness Artifact Summary + example: + createdAt: createdAt + downloadsCount: 0 + imageName: imageName + modifiedAt: modifiedAt + packageType: DOCKER + labels: + - labels + - labels + ArtifactVersionMetadata: + required: + - latestVersion + - name + - registryIdentifier + - registryPath + type: object + properties: + deploymentMetadata: + $ref: '#/components/schemas/DeploymentMetadata' + digestCount: + type: integer + format: int64 + downloadsCount: + type: integer + format: int64 + islatestVersion: + type: boolean + lastModified: + type: string + name: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + pullCommand: + type: string + registryIdentifier: + type: string + registryPath: + type: string + size: + type: string + description: Artifact Version Metadata + example: + downloadsCount: 5 + islatestVersion: true + size: size + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + name: name + lastModified: lastModified + digestCount: 1 + packageType: DOCKER + pullCommand: pullCommand + registryIdentifier: registryIdentifier + ArtifactVersionSummary: + required: + - imageName + - packageType + - version + type: object + properties: + imageName: + type: string + isLatestVersion: + type: boolean + packageType: + $ref: '#/components/schemas/PackageType' + sscaArtifactId: + type: string + sscaArtifactSourceId: + type: string + stoExecutionId: + type: string + stoPipelineId: + type: string + version: + type: string + description: Docker Artifact Version Summary + example: + imageName: imageName + isLatestVersion: true + stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + sscaArtifactId: sscaArtifactId + sscaArtifactSourceId: sscaArtifactSourceId + packageType: DOCKER + version: version + AuthType: + type: string + description: Authentication type + enum: + - UserPassword + - Anonymous + BuildDetails: + type: object + properties: + orgIdentifier: + type: string + pipelineDisplayName: + type: string + pipelineExecutionId: + type: string + pipelineIdentifier: + type: string + projectIdentifier: + type: string + stageExecutionId: + type: string + stepExecutionId: + type: string + example: + stepExecutionId: stepExecutionId + pipelineIdentifier: pipelineIdentifier + stageExecutionId: stageExecutionId + orgIdentifier: orgIdentifier + pipelineDisplayName: pipelineDisplayName + pipelineExecutionId: pipelineExecutionId + projectIdentifier: projectIdentifier + CleanupPolicy: + type: object + properties: + expireDays: + type: integer + name: + type: string + packagePrefix: + type: array + items: + type: string + versionPrefix: + type: array + items: + type: string + description: Cleanup Policy for Harness Artifact Registries + example: + expireDays: 0 + versionPrefix: + - versionPrefix + - versionPrefix + packagePrefix: + - packagePrefix + - packagePrefix + name: name + ClientSetupDetails: + required: + - mainHeader + - secHeader + - sections + type: object + properties: + mainHeader: + type: string + secHeader: + type: string + sections: + type: array + items: + $ref: '#/components/schemas/ClientSetupSection' + description: Client Setup Details + example: + mainHeader: mainHeader + secHeader: secHeader + sections: + - header: header + steps: + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + steps: + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + ClientSetupSection: + type: object + properties: + header: + type: string + steps: + type: array + items: + $ref: '#/components/schemas/ClientSetupStep' + description: Client Setup Section + example: + header: header + steps: + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + ClientSetupStep: + type: object + properties: + commands: + type: array + items: + $ref: '#/components/schemas/ClientSetupStepCommand' + header: + type: string + type: + $ref: '#/components/schemas/ClientSetupStepType' + description: Client Setup Step + example: + header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + ClientSetupStepCommand: + type: object + properties: + label: + type: string + value: + type: string + description: Client Setup Step Command + example: + label: label + value: value + ClientSetupStepType: + type: string + description: ClientSetupStepType type + enum: + - Static + - GenerateToken + DeploymentDetails: + required: + - nonProdDeployment + - prodDeployment + - totalDeployment + type: object + properties: + nonProdDeployment: + type: integer + prodDeployment: + type: integer + totalDeployment: + type: integer + example: + totalDeployment: 1 + prodDeployment: 6 + nonProdDeployment: 0 + DeploymentMetadata: + required: + - nonProdEnvCount + - prodEnvCount + type: object + properties: + nonProdEnvCount: + type: integer + prodEnvCount: + type: integer + example: + nonProdEnvCount: 0 + prodEnvCount: 6 + DeploymentStats: + required: + - PreProduction + - Production + type: object + properties: + PreProduction: + type: integer + Production: + type: integer + description: DeploymentStats + example: + Production: 1 + PreProduction: 6 + DockerArtifactDetail: + required: + - imageName + - packageType + - registryPath + - url + - version + type: object + properties: + createdAt: + type: string + downloadsCount: + type: integer + format: int64 + imageName: + type: string + isLatestVersion: + type: boolean + modifiedAt: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + pullCommand: + type: string + registryPath: + type: string + size: + type: string + url: + type: string + version: + type: string + description: Docker Artifact Detail + example: + createdAt: createdAt + downloadsCount: 0 + imageName: imageName + isLatestVersion: true + size: size + modifiedAt: modifiedAt + registryPath: registryPath + packageType: DOCKER + pullCommand: pullCommand + version: version + url: url + DockerArtifactIntegrationDetail: + type: object + properties: + buildDetails: + $ref: '#/components/schemas/BuildDetails' + deploymentsDetails: + $ref: '#/components/schemas/DeploymentDetails' + sbomDetails: + $ref: '#/components/schemas/SBOMDetails' + slsaDetails: + $ref: '#/components/schemas/SLSADetails' + stoDetails: + $ref: '#/components/schemas/STODetails' + description: Docker Artifact Detail + example: + stoDetails: + executionId: executionId + ignored: 3 + high: 9 + total: 1 + critical: 7 + low: 4 + medium: 7 + info: 2 + lastScanned: lastScanned + pipelineId: pipelineId + sbomDetails: + avgScore: avgScore + orchestrationId: orchestrationId + allowListViolations: 5 + artifactSourceId: artifactSourceId + artifactId: artifactId + denyListViolations: 2 + maxScore: maxScore + componentsCount: 5 + projectId: projectId + orgId: orgId + slsaDetails: + provenanceId: provenanceId + status: status + deploymentsDetails: + totalDeployment: 1 + prodDeployment: 6 + nonProdDeployment: 0 + buildDetails: + stepExecutionId: stepExecutionId + pipelineIdentifier: pipelineIdentifier + stageExecutionId: stageExecutionId + orgIdentifier: orgIdentifier + pipelineDisplayName: pipelineDisplayName + pipelineExecutionId: pipelineExecutionId + projectIdentifier: projectIdentifier + DockerArtifactManifest: + required: + - manifest + type: object + properties: + manifest: + type: string + description: Docker Artifact Manifest + example: + manifest: manifest + DockerLayerEntry: + required: + - command + type: object + properties: + command: + type: string + size: + type: string + description: Harness Artifact Layers + example: + size: size + command: command + DockerLayersSummary: + required: + - digest + type: object + properties: + digest: + type: string + layers: + type: array + items: + $ref: '#/components/schemas/DockerLayerEntry' + osArch: + type: string + description: Harness Layers Summary + example: + osArch: osArch + digest: digest + layers: + - size: size + command: command + - size: size + command: command + DockerManifestDetails: + required: + - digest + - layers + - osArch + type: object + properties: + createdAt: + type: string + digest: + type: string + osArch: + type: string + size: + type: string + stoExecutionId: + type: string + stoPipelineId: + type: string + description: Harness Artifact Layers + example: + createdAt: createdAt + stoPipelineId: stoPipelineId + size: size + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + DockerManifests: + required: + - imageName + - version + type: object + properties: + imageName: + type: string + isLatestVersion: + type: boolean + manifests: + type: array + items: + $ref: '#/components/schemas/DockerManifestDetails' + version: + type: string + description: Harness Manifests + example: + imageName: imageName + isLatestVersion: true + manifests: + - createdAt: createdAt + stoPipelineId: stoPipelineId + size: size + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - createdAt: createdAt + stoPipelineId: stoPipelineId + size: size + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + version: version + EnvironmentType: + type: string + description: Environment Type + enum: + - PreProduction + - Production + Error: + required: + - code + - message + type: object + properties: + code: + type: string + description: The http error code + example: "404" + details: + type: object + description: Additional details about the error + message: + type: string + description: The reason the request failed + HelmArtifactDetail: + required: + - imageName + - packageType + - registryPath + - url + - version + type: object + properties: + artifact: + type: string + createdAt: + type: string + downloadsCount: + type: integer + format: int64 + isLatestVersion: + type: boolean + modifiedAt: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + pullCommand: + type: string + registryPath: + type: string + size: + type: string + url: + type: string + version: + type: string + description: Helm Artifact Detail + example: + artifact: artifact + createdAt: createdAt + downloadsCount: 0 + isLatestVersion: true + size: size + modifiedAt: modifiedAt + registryPath: registryPath + packageType: DOCKER + pullCommand: pullCommand + version: version + url: url + HelmArtifactManifest: + required: + - manifest + type: object + properties: + manifest: + type: string + description: Helm Artifact Manifest + example: + manifest: manifest + ListArtifact: + required: + - artifacts + type: object + properties: + artifacts: + type: array + description: A list of Artifact + items: + $ref: '#/components/schemas/ArtifactMetadata' + itemCount: + type: integer + description: The total number of items + format: int64 + example: 1 + pageCount: + type: integer + description: The total number of pages + format: int64 + example: 100 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + pageSize: + type: integer + description: The number of items per page + example: 1 + description: A list of Artifacts + example: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + artifacts: + - scannedDigest: + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + stoMetadata: + scannedCount: 1 + totalCount: 5 + digestMetadata: + - null + - null + packageType: DOCKER + version: version + labels: + - labels + - labels + downloadsCount: 0 + scannedDigestCount: 6 + totalDigestCount: 5 + latestVersion: latestVersion + name: name + lastModified: lastModified + pullCommand: pullCommand + registryIdentifier: registryIdentifier + - scannedDigest: + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + stoMetadata: + scannedCount: 1 + totalCount: 5 + digestMetadata: + - null + - null + packageType: DOCKER + version: version + labels: + - labels + - labels + downloadsCount: 0 + scannedDigestCount: 6 + totalDigestCount: 5 + latestVersion: latestVersion + name: name + lastModified: lastModified + pullCommand: pullCommand + registryIdentifier: registryIdentifier + itemCount: 1 + ListArtifactLabel: + required: + - labels + type: object + properties: + itemCount: + type: integer + description: The total number of items + format: int64 + example: 1 + labels: + type: array + items: + type: string + pageCount: + type: integer + description: The total number of pages + format: int64 + example: 100 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + pageSize: + type: integer + description: The number of items per page + example: 1 + description: A list of Harness Artifact Labels + example: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + itemCount: 1 + labels: + - labels + - labels + ListArtifactVersion: + required: + - artifacts + type: object + properties: + artifactVersions: + type: array + description: A list of Artifact versions + items: + $ref: '#/components/schemas/ArtifactVersionMetadata' + itemCount: + type: integer + description: The total number of items + format: int64 + example: 1 + pageCount: + type: integer + description: The total number of pages + format: int64 + example: 100 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + pageSize: + type: integer + description: The number of items per page + example: 1 + description: A list of Artifact versions + example: + pageCount: 100 + artifactVersions: + - downloadsCount: 5 + islatestVersion: true + size: size + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + name: name + lastModified: lastModified + digestCount: 1 + packageType: DOCKER + pullCommand: pullCommand + registryIdentifier: registryIdentifier + - downloadsCount: 5 + islatestVersion: true + size: size + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + name: name + lastModified: lastModified + digestCount: 1 + packageType: DOCKER + pullCommand: pullCommand + registryIdentifier: registryIdentifier + pageIndex: 0 + pageSize: 1 + itemCount: 1 + ListRegistry: + required: + - registries + type: object + properties: + itemCount: + type: integer + description: The total number of items + format: int64 + example: 1 + pageCount: + type: integer + description: The total number of pages + format: int64 + example: 100 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + pageSize: + type: integer + description: The number of items per page + example: 1 + registries: + type: array + description: A list of Harness Artifact Registries + items: + $ref: '#/components/schemas/RegistryMetadata' + description: A list of Harness Artifact Registries + example: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + registries: + - downloadsCount: 6 + identifier: identifier + path: path + artifactsCount: 0 + description: description + registrySize: registrySize + lastModified: lastModified + type: VIRTUAL + packageType: DOCKER + url: url + labels: + - labels + - labels + - downloadsCount: 6 + identifier: identifier + path: path + artifactsCount: 0 + description: description + registrySize: registrySize + lastModified: lastModified + type: VIRTUAL + packageType: DOCKER + url: url + labels: + - labels + - labels + itemCount: 1 + ListRegistryArtifact: + required: + - artifacts + type: object + properties: + artifacts: + type: array + description: A list of Artifact + items: + $ref: '#/components/schemas/RegistryArtifactMetadata' + itemCount: + type: integer + description: The total number of items + format: int64 + example: 1 + pageCount: + type: integer + description: The total number of pages + format: int64 + example: 100 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + pageSize: + type: integer + description: The number of items per page + example: 1 + description: A list of Artifacts + example: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + artifacts: + - downloadsCount: 0 + latestVersion: latestVersion + registryPath: registryPath + name: name + lastModified: lastModified + packageType: DOCKER + labels: + - labels + - labels + registryIdentifier: registryIdentifier + - downloadsCount: 0 + latestVersion: latestVersion + registryPath: registryPath + name: name + lastModified: lastModified + packageType: DOCKER + labels: + - labels + - labels + registryIdentifier: registryIdentifier + itemCount: 1 + PackageType: + type: string + description: refers to package + enum: + - DOCKER + - MAVEN + - GENERIC + - HELM + Registry: + required: + - identifier + - name + - packageType + - type + - url + type: object + properties: + allowedPattern: + type: array + items: + type: string + blockedPattern: + type: array + items: + type: string + cleanupPolicy: + type: array + items: + $ref: '#/components/schemas/CleanupPolicy' + config: + $ref: '#/components/schemas/RegistryConfig' + createdAt: + type: string + description: + type: string + identifier: + type: string + labels: + type: array + items: + type: string + modifiedAt: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + url: + type: string + description: Harness Artifact Registry + example: + createdAt: createdAt + identifier: identifier + modifiedAt: modifiedAt + description: description + blockedPattern: + - blockedPattern + - blockedPattern + allowedPattern: + - allowedPattern + - allowedPattern + config: + type: VIRTUAL + packageType: DOCKER + url: url + cleanupPolicy: + - expireDays: 0 + versionPrefix: + - versionPrefix + - versionPrefix + packagePrefix: + - packagePrefix + - packagePrefix + name: name + - expireDays: 0 + versionPrefix: + - versionPrefix + - versionPrefix + packagePrefix: + - packagePrefix + - packagePrefix + name: name + labels: + - labels + - labels + RegistryArtifactMetadata: + required: + - latestVersion + - name + - registryIdentifier + - registryPath + type: object + properties: + downloadsCount: + type: integer + format: int64 + labels: + type: array + items: + type: string + lastModified: + type: string + latestVersion: + type: string + name: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + registryIdentifier: + type: string + registryPath: + type: string + description: Artifact Metadata + example: + downloadsCount: 0 + latestVersion: latestVersion + registryPath: registryPath + name: name + lastModified: lastModified + packageType: DOCKER + labels: + - labels + - labels + registryIdentifier: registryIdentifier + RegistryConfig: + required: + - type + type: object + properties: + type: + $ref: '#/components/schemas/RegistryType' + description: SubConfig specific for Virtual or Upstream Registry + example: + type: VIRTUAL + discriminator: + propertyName: type + mapping: + UPSTREAM: '#/components/schemas/UpstreamConfig' + VIRTUAL: '#/components/schemas/VirtualConfig' + oneOf: + - $ref: '#/components/schemas/VirtualConfig' + - $ref: '#/components/schemas/UpstreamConfig' + RegistryMetadata: + required: + - identifier + - packageType + - type + - url + type: object + properties: + artifactsCount: + type: integer + format: int64 + description: + type: string + downloadsCount: + type: integer + format: int64 + identifier: + type: string + labels: + type: array + items: + type: string + lastModified: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + path: + type: string + registrySize: + type: string + type: + $ref: '#/components/schemas/RegistryType' + url: + type: string + description: Harness Artifact Registry Metadata + example: + downloadsCount: 6 + identifier: identifier + path: path + artifactsCount: 0 + description: description + registrySize: registrySize + lastModified: lastModified + type: VIRTUAL + packageType: DOCKER + url: url + labels: + - labels + - labels + RegistryRequest: + required: + - identifier + - packageType + - type + type: object + properties: + allowedPattern: + type: array + items: + type: string + blockedPattern: + type: array + items: + type: string + cleanupPolicy: + type: array + items: + $ref: '#/components/schemas/CleanupPolicy' + config: + $ref: '#/components/schemas/RegistryConfig' + description: + type: string + identifier: + type: string + labels: + type: array + items: + type: string + packageType: + $ref: '#/components/schemas/PackageType' + parentRef: + type: string + scanners: + type: array + items: + $ref: '#/components/schemas/Scanner' + RegistryType: + type: string + description: refers to type of registry i.e virtual or upstream + discriminator: + propertyName: type + enum: + - VIRTUAL + - UPSTREAM + SBOMDetails: + type: object + properties: + allowListViolations: + type: integer + artifactId: + type: string + artifactSourceId: + type: string + avgScore: + type: string + componentsCount: + type: integer + denyListViolations: + type: integer + maxScore: + type: string + orchestrationId: + type: string + orgId: + type: string + projectId: + type: string + example: + avgScore: avgScore + orchestrationId: orchestrationId + allowListViolations: 5 + artifactSourceId: artifactSourceId + artifactId: artifactId + denyListViolations: 2 + maxScore: maxScore + componentsCount: 5 + projectId: projectId + orgId: orgId + SLSADetails: + type: object + properties: + provenanceId: + type: string + status: + type: string + example: + provenanceId: provenanceId + status: status + STODetails: + type: object + properties: + critical: + type: integer + executionId: + type: string + high: + type: integer + ignored: + type: integer + info: + type: integer + lastScanned: + type: string + low: + type: integer + medium: + type: integer + pipelineId: + type: string + total: + type: integer + example: + executionId: executionId + ignored: 3 + high: 9 + total: 1 + critical: 7 + low: 4 + medium: 7 + info: 2 + lastScanned: lastScanned + pipelineId: pipelineId + STODigestMetadata: + type: object + properties: + digest: + type: string + osArch: + type: string + stoExecutionId: + type: string + stoPipelineId: + type: string + example: + stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + STOMetadata: + type: object + properties: + digestMetadata: + type: array + items: + $ref: '#/components/schemas/STODigestMetadata' + scannedCount: + type: integer + format: int64 + totalCount: + type: integer + format: int64 + example: + scannedCount: 1 + totalCount: 5 + digestMetadata: + - null + - null + Scanner: + type: object + properties: + name: + type: string + enum: + - AQUA_TRIVY + - GRYPE + description: Scanner for Harness Artifact Registries + Status: + type: string + description: Indicates if the request was successful or not + enum: + - SUCCESS + - FAILURE + - ERROR + UpstreamConfig: + required: + - authType + type: object + properties: + auth: + oneOf: + - $ref: '#/components/schemas/UserPassword' + - $ref: '#/components/schemas/Anonymous' + authType: + $ref: '#/components/schemas/AuthType' + source: + type: string + enum: + - Dockerhub + - Custom + url: + type: string + description: Configuration for Harness Artifact UpstreamProxies + x-discriminator-value: UPSTREAM + UserPassword: + required: + - password + - userName + properties: + secretIdentifier: + type: string + secretSpaceId: + type: integer + secretSpacePath: + type: string + userName: + type: string + VirtualConfig: + type: object + properties: + upstreamProxies: + type: array + items: + type: string + description: Configuration for Harness Virtual Artifact Registries + inline_response_201: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/Registry' + status: + $ref: '#/components/schemas/Status' + example: + data: + createdAt: createdAt + identifier: identifier + modifiedAt: modifiedAt + description: description + blockedPattern: + - blockedPattern + - blockedPattern + allowedPattern: + - allowedPattern + - allowedPattern + config: + type: VIRTUAL + packageType: DOCKER + url: url + cleanupPolicy: + - expireDays: 0 + versionPrefix: + - versionPrefix + - versionPrefix + packagePrefix: + - packagePrefix + - packagePrefix + name: name + - expireDays: 0 + versionPrefix: + - versionPrefix + - versionPrefix + packagePrefix: + - packagePrefix + - packagePrefix + name: name + labels: + - labels + - labels + status: SUCCESS + inline_response_200: + required: + - status + type: object + properties: + status: + $ref: '#/components/schemas/Status' + example: + status: SUCCESS + inline_response_200_1: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ArtifactSummary' + status: + $ref: '#/components/schemas/Status' + example: + data: + createdAt: createdAt + downloadsCount: 0 + imageName: imageName + modifiedAt: modifiedAt + packageType: DOCKER + labels: + - labels + - labels + status: SUCCESS + inline_response_200_2: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ArtifactStats' + status: + $ref: '#/components/schemas/Status' + example: + data: + uploadSize: 5 + downloadSize: 6 + downloadCount: 0 + totalStorageSize: 1 + status: SUCCESS + inline_response_200_3: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ArtifactDeploymentsDetails' + status: + $ref: '#/components/schemas/Status' + example: + data: + deployments: + deployments: + - lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + - lastDeployedAt: lastDeployedAt + infraIdentifier: infraIdentifier + orgIdentifier: orgIdentifier + count: 0 + infraName: infraName + lastDeployedById: lastDeployedById + serviceName: serviceName + pipelineId: pipelineId + serviceIdentifier: serviceIdentifier + lastDeployedByName: lastDeployedByName + envName: envName + envType: PreProduction + lastPipelineExecutionId: lastPipelineExecutionId + projectIdentifier: projectIdentifier + envIdentifier: envIdentifier + lastPipelineExecutionName: lastPipelineExecutionName + pageCount: 100 + pageIndex: 0 + pageSize: 1 + itemCount: 1 + deploymentsStats: + Production: 1 + PreProduction: 6 + status: SUCCESS + inline_response_200_4: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/DockerArtifactDetail' + status: + $ref: '#/components/schemas/Status' + example: + data: + createdAt: createdAt + downloadsCount: 0 + imageName: imageName + isLatestVersion: true + size: size + modifiedAt: modifiedAt + registryPath: registryPath + packageType: DOCKER + pullCommand: pullCommand + version: version + url: url + status: SUCCESS + inline_response_200_5: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/DockerArtifactIntegrationDetail' + status: + $ref: '#/components/schemas/Status' + example: + data: + stoDetails: + executionId: executionId + ignored: 3 + high: 9 + total: 1 + critical: 7 + low: 4 + medium: 7 + info: 2 + lastScanned: lastScanned + pipelineId: pipelineId + sbomDetails: + avgScore: avgScore + orchestrationId: orchestrationId + allowListViolations: 5 + artifactSourceId: artifactSourceId + artifactId: artifactId + denyListViolations: 2 + maxScore: maxScore + componentsCount: 5 + projectId: projectId + orgId: orgId + slsaDetails: + provenanceId: provenanceId + status: status + deploymentsDetails: + totalDeployment: 1 + prodDeployment: 6 + nonProdDeployment: 0 + buildDetails: + stepExecutionId: stepExecutionId + pipelineIdentifier: pipelineIdentifier + stageExecutionId: stageExecutionId + orgIdentifier: orgIdentifier + pipelineDisplayName: pipelineDisplayName + pipelineExecutionId: pipelineExecutionId + projectIdentifier: projectIdentifier + status: SUCCESS + inline_response_200_6: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/DockerLayersSummary' + status: + $ref: '#/components/schemas/Status' + example: + data: + osArch: osArch + digest: digest + layers: + - size: size + command: command + - size: size + command: command + status: SUCCESS + inline_response_200_7: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/DockerArtifactManifest' + status: + $ref: '#/components/schemas/Status' + example: + data: + manifest: manifest + status: SUCCESS + inline_response_200_8: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/DockerManifests' + status: + $ref: '#/components/schemas/Status' + example: + data: + imageName: imageName + isLatestVersion: true + manifests: + - createdAt: createdAt + stoPipelineId: stoPipelineId + size: size + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - createdAt: createdAt + stoPipelineId: stoPipelineId + size: size + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + version: version + status: SUCCESS + inline_response_200_9: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/HelmArtifactDetail' + status: + $ref: '#/components/schemas/Status' + example: + data: + artifact: artifact + createdAt: createdAt + downloadsCount: 0 + isLatestVersion: true + size: size + modifiedAt: modifiedAt + registryPath: registryPath + packageType: DOCKER + pullCommand: pullCommand + version: version + url: url + status: SUCCESS + inline_response_200_10: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/HelmArtifactManifest' + status: + $ref: '#/components/schemas/Status' + example: + data: + manifest: manifest + status: SUCCESS + inline_response_200_11: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ArtifactVersionSummary' + status: + $ref: '#/components/schemas/Status' + example: + data: + imageName: imageName + isLatestVersion: true + stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + sscaArtifactId: sscaArtifactId + sscaArtifactSourceId: sscaArtifactSourceId + packageType: DOCKER + version: version + status: SUCCESS + inline_response_200_12: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ListArtifactVersion' + status: + $ref: '#/components/schemas/Status' + example: + data: + pageCount: 100 + artifactVersions: + - downloadsCount: 5 + islatestVersion: true + size: size + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + name: name + lastModified: lastModified + digestCount: 1 + packageType: DOCKER + pullCommand: pullCommand + registryIdentifier: registryIdentifier + - downloadsCount: 5 + islatestVersion: true + size: size + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + name: name + lastModified: lastModified + digestCount: 1 + packageType: DOCKER + pullCommand: pullCommand + registryIdentifier: registryIdentifier + pageIndex: 0 + pageSize: 1 + itemCount: 1 + status: SUCCESS + inline_response_200_13: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ListArtifactLabel' + status: + $ref: '#/components/schemas/Status' + example: + data: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + itemCount: 1 + labels: + - labels + - labels + status: SUCCESS + inline_response_200_14: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ListRegistryArtifact' + status: + $ref: '#/components/schemas/Status' + example: + data: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + artifacts: + - downloadsCount: 0 + latestVersion: latestVersion + registryPath: registryPath + name: name + lastModified: lastModified + packageType: DOCKER + labels: + - labels + - labels + registryIdentifier: registryIdentifier + - downloadsCount: 0 + latestVersion: latestVersion + registryPath: registryPath + name: name + lastModified: lastModified + packageType: DOCKER + labels: + - labels + - labels + registryIdentifier: registryIdentifier + itemCount: 1 + status: SUCCESS + inline_response_200_15: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ClientSetupDetails' + status: + $ref: '#/components/schemas/Status' + example: + data: + mainHeader: mainHeader + secHeader: secHeader + sections: + - header: header + steps: + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + steps: + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + - header: header + type: Static + commands: + - label: label + value: value + - label: label + value: value + status: SUCCESS + inline_response_200_16: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ListArtifact' + status: + $ref: '#/components/schemas/Status' + example: + data: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + artifacts: + - scannedDigest: + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + stoMetadata: + scannedCount: 1 + totalCount: 5 + digestMetadata: + - null + - null + packageType: DOCKER + version: version + labels: + - labels + - labels + downloadsCount: 0 + scannedDigestCount: 6 + totalDigestCount: 5 + latestVersion: latestVersion + name: name + lastModified: lastModified + pullCommand: pullCommand + registryIdentifier: registryIdentifier + - scannedDigest: + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + - stoPipelineId: stoPipelineId + stoExecutionId: stoExecutionId + osArch: osArch + digest: digest + deploymentMetadata: + nonProdEnvCount: 0 + prodEnvCount: 6 + registryPath: registryPath + stoMetadata: + scannedCount: 1 + totalCount: 5 + digestMetadata: + - null + - null + packageType: DOCKER + version: version + labels: + - labels + - labels + downloadsCount: 0 + scannedDigestCount: 6 + totalDigestCount: 5 + latestVersion: latestVersion + name: name + lastModified: lastModified + pullCommand: pullCommand + registryIdentifier: registryIdentifier + itemCount: 1 + status: SUCCESS + inline_response_200_17: + required: + - data + - status + type: object + properties: + data: + $ref: '#/components/schemas/ListRegistry' + status: + $ref: '#/components/schemas/Status' + example: + data: + pageCount: 100 + pageIndex: 0 + pageSize: 1 + registries: + - downloadsCount: 6 + identifier: identifier + path: path + artifactsCount: 0 + description: description + registrySize: registrySize + lastModified: lastModified + type: VIRTUAL + packageType: DOCKER + url: url + labels: + - labels + - labels + - downloadsCount: 6 + identifier: identifier + path: path + artifactsCount: 0 + description: description + registrySize: registrySize + lastModified: lastModified + type: VIRTUAL + packageType: DOCKER + url: url + labels: + - labels + - labels + itemCount: 1 + status: SUCCESS + responses: + ArtifactDeploymentsResponse: + description: response to get docker artifact deployments details + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_3' + ArtifactLabelResponse: + description: response to get artifact label response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + ArtifactStatsResponse: + description: response to get artifact stats response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_2' + ArtifactSummaryResponse: + description: response to get artifact summary + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + ArtifactVersionSummaryResponse: + description: response to get docker artifact version summary + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_11' + BadRequest: + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + ClientSetupDetailsResponse: + description: response for client setup details + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_15' + DockerArtifactDetailIntegrationResponse: + description: response to get docker artifact integration detail + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_5' + DockerArtifactDetailResponse: + description: response to get docker artifact detail + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_4' + DockerArtifactManifestResponse: + description: response to get docker artifact manifest + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_7' + DockerLayersResponse: + description: response to get artifact layers + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_6' + DockerManifestsResponse: + description: response to get artifact layers + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_8' + HelmArtifactDetailResponse: + description: response to get helm artifact detail + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_9' + HelmArtifactManifestResponse: + description: response to get helm artifact manifest + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_10' + InternalServerError: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + ListArtifactLabelResponse: + description: response for list artifact labels + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_13' + ListArtifactResponse: + description: response for list artifact + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_16' + ListArtifactVersionResponse: + description: response for list versions of artifact + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_12' + ListRegistryArtifactResponse: + description: response for list artifact + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_14' + ListRegistryResponse: + description: response for list registry + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_17' + NotFound: + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + Redirect: + description: Temporary Redirect + headers: + Location: + description: The URL of the redirected resource + style: simple + explode: false + schema: + type: string + format: uri + RegistryResponse: + description: "response for create, get and update registry" + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201' + Success: + description: Success Response + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + Unauthenticated: + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + Unauthorized: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + parameters: + AccountIdentifierParam: + name: accountIdentifier + in: query + description: Account Identifier + required: false + style: form + explode: true + schema: + type: string + LabelsParam: + name: label + in: query + description: Label. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + RegistryIdentifierParam: + name: reg_identifier + in: query + description: Registry Identifier + required: false + style: form + explode: true + schema: + type: array + items: + type: string + RegistryIdentifierPathParam: + name: registry_identifier + in: path + description: Unique registry Identifier in a account. + required: true + style: simple + explode: false + schema: + type: string + RegistryTypeParam: + name: type + in: query + description: Registry Type + required: false + style: form + explode: true + schema: + type: string + enum: + - VIRTUAL + - UPSTREAM + artifactParam: + name: artifact + in: query + description: Artifat + required: false + style: form + explode: true + schema: + type: string + artifactPathParam: + name: artifact + in: path + description: Name of artifact. + required: true + style: simple + explode: false + schema: + type: string + deployedArtifact: + name: deployed_artifact + in: query + description: Deployed Artifact Filter. + required: false + style: form + explode: true + schema: + type: boolean + digestOptParam: + name: digest + in: query + description: Digest. + required: false + style: form + explode: true + schema: + type: string + digestParam: + name: digest + in: query + description: Digest. + required: true + style: form + explode: true + schema: + type: string + envType: + name: env_type + in: query + description: env type + required: false + style: form + explode: true + schema: + type: string + description: Environment Type + enum: + - PreProduction + - Production + fromDateParam: + name: from + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + latestVersion: + name: latest_version + in: query + description: Latest Version Filter. + required: false + style: form + explode: true + schema: + type: boolean + packageTypeParam: + name: package_type + in: query + description: Registry Package Type + required: false + style: form + explode: true + schema: + type: array + items: + type: string + pageNumber: + name: page + in: query + description: Current page number + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 1 + pageSize: + name: size + in: query + description: Number of items per page + required: false + style: form + explode: true + schema: + type: integer + format: int64 + default: 20 + recursiveParam: + name: recursive + in: query + description: Whether to list registries recursively. + required: false + style: form + explode: true + schema: + type: boolean + default: false + registryRefPathParam: + name: registry_ref + in: path + description: Unique registry path. + required: true + style: simple + explode: false + schema: + type: string + searchTerm: + name: search_term + in: query + description: search Term. + required: false + style: form + explode: true + schema: + type: string + sortField: + name: sort_field + in: query + description: sortField + required: false + style: form + explode: true + schema: + type: string + sortOrder: + name: sort_order + in: query + description: sortOrder + required: false + style: form + explode: true + schema: + type: string + spaceRefPathParam: + name: space_ref + in: path + description: Unique space path. + required: true + style: simple + explode: false + schema: + type: string + spaceRefQueryParam: + name: space_ref + in: query + description: Unique space path + required: false + style: form + explode: true + schema: + type: string + toDateParam: + name: to + in: query + description: Date. Format - MM/DD/YYYY + required: false + style: form + explode: true + schema: + type: string + versionParam: + name: version + in: query + description: Version + required: false + style: form + explode: true + schema: + type: string + versionPathParam: + name: version + in: path + description: Name of Artifact Version. + required: true + style: simple + explode: false + schema: + type: string + requestBodies: + ArtifactLabelRequest: + description: request to update artifact labels + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactLabelRequest' + RegistryRequest: + description: request for create and update registry + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryRequest' diff --git a/harness/har/api_artifacts.go b/harness/har/api_artifacts.go new file mode 100644 index 00000000..1ff6355a --- /dev/null +++ b/harness/har/api_artifacts.go @@ -0,0 +1,1835 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type ArtifactsApiService service + +/* +ArtifactsApiService Delete Artifact +Delete Artifact. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + +@return InlineResponse200 +*/ +func (a *ArtifactsApiService) DeleteArtifact(ctx context.Context, registryRef string, artifact string) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Delete an Artifact Version +Delete Artifact Version. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + +@return InlineResponse200 +*/ +func (a *ArtifactsApiService) DeleteArtifactVersion(ctx context.Context, registryRef string, artifact string, version string) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService List Artifact Versions +Lists all the Artifact Versions. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param artifact Name of artifact. + * @param optional nil or *ArtifactsApiGetAllArtifactVersionsOpts - Optional Parameters: + * @param "Page" (optional.Int64) - Current page number + * @param "Size" (optional.Int64) - Number of items per page + * @param "SortOrder" (optional.String) - sortOrder + * @param "SortField" (optional.String) - sortField + * @param "SearchTerm" (optional.String) - search Term. +@return InlineResponse20012 +*/ + +type ArtifactsApiGetAllArtifactVersionsOpts struct { + Page optional.Int64 + Size optional.Int64 + SortOrder optional.String + SortField optional.String + SearchTerm optional.String +} + +func (a *ArtifactsApiService) GetAllArtifactVersions(ctx context.Context, registryRef string, artifact string, localVarOptionals *ArtifactsApiGetAllArtifactVersionsOpts) (InlineResponse20012, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20012 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/versions" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortOrder.IsSet() { + localVarQueryParams.Add("sort_order", parameterToString(localVarOptionals.SortOrder.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortField.IsSet() { + localVarQueryParams.Add("sort_field", parameterToString(localVarOptionals.SortField.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SearchTerm.IsSet() { + localVarQueryParams.Add("search_term", parameterToString(localVarOptionals.SearchTerm.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20012 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Describe Artifact Deployments +Get Artifact Deployments + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param artifact Name of artifact. + * @param version Name of Artifact Version. + * @param optional nil or *ArtifactsApiGetArtifactDeploymentsOpts - Optional Parameters: + * @param "EnvType" (optional.String) - env type + * @param "Page" (optional.Int64) - Current page number + * @param "Size" (optional.Int64) - Number of items per page + * @param "SortOrder" (optional.String) - sortOrder + * @param "SortField" (optional.String) - sortField + * @param "SearchTerm" (optional.String) - search Term. +@return InlineResponse2003 +*/ + +type ArtifactsApiGetArtifactDeploymentsOpts struct { + EnvType optional.String + Page optional.Int64 + Size optional.Int64 + SortOrder optional.String + SortField optional.String + SearchTerm optional.String +} + +func (a *ArtifactsApiService) GetArtifactDeployments(ctx context.Context, registryRef string, artifact string, version string, localVarOptionals *ArtifactsApiGetArtifactDeploymentsOpts) (InlineResponse2003, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2003 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/deploymentdetails" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.EnvType.IsSet() { + localVarQueryParams.Add("env_type", parameterToString(localVarOptionals.EnvType.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortOrder.IsSet() { + localVarQueryParams.Add("sort_order", parameterToString(localVarOptionals.SortOrder.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortField.IsSet() { + localVarQueryParams.Add("sort_field", parameterToString(localVarOptionals.SortField.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SearchTerm.IsSet() { + localVarQueryParams.Add("search_term", parameterToString(localVarOptionals.SearchTerm.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2003 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Get Artifact Stats +Get Artifact Stats. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param artifact Name of artifact. + * @param optional nil or *ArtifactsApiGetArtifactStatsOpts - Optional Parameters: + * @param "From" (optional.String) - Date. Format - MM/DD/YYYY + * @param "To" (optional.String) - Date. Format - MM/DD/YYYY +@return InlineResponse2002 +*/ + +type ArtifactsApiGetArtifactStatsOpts struct { + From optional.String + To optional.String +} + +func (a *ArtifactsApiService) GetArtifactStats(ctx context.Context, registryRef string, artifact string, localVarOptionals *ArtifactsApiGetArtifactStatsOpts) (InlineResponse2002, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2002 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/stats" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.From.IsSet() { + localVarQueryParams.Add("from", parameterToString(localVarOptionals.From.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.To.IsSet() { + localVarQueryParams.Add("to", parameterToString(localVarOptionals.To.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2002 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Get Artifact Stats +Get Artifact Stats. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param optional nil or *ArtifactsApiGetArtifactStatsForRegistryOpts - Optional Parameters: + * @param "From" (optional.String) - Date. Format - MM/DD/YYYY + * @param "To" (optional.String) - Date. Format - MM/DD/YYYY +@return InlineResponse2002 +*/ + +type ArtifactsApiGetArtifactStatsForRegistryOpts struct { + From optional.String + To optional.String +} + +func (a *ArtifactsApiService) GetArtifactStatsForRegistry(ctx context.Context, registryRef string, localVarOptionals *ArtifactsApiGetArtifactStatsForRegistryOpts) (InlineResponse2002, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2002 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/stats" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.From.IsSet() { + localVarQueryParams.Add("from", parameterToString(localVarOptionals.From.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.To.IsSet() { + localVarQueryParams.Add("to", parameterToString(localVarOptionals.To.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2002 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Get Artifact Stats +Get Artifact Stats. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param spaceRef Unique space path. + * @param optional nil or *ArtifactsApiGetArtifactStatsForSpaceOpts - Optional Parameters: + * @param "From" (optional.String) - Date. Format - MM/DD/YYYY + * @param "To" (optional.String) - Date. Format - MM/DD/YYYY +@return InlineResponse2002 +*/ + +type ArtifactsApiGetArtifactStatsForSpaceOpts struct { + From optional.String + To optional.String +} + +func (a *ArtifactsApiService) GetArtifactStatsForSpace(ctx context.Context, spaceRef string, localVarOptionals *ArtifactsApiGetArtifactStatsForSpaceOpts) (InlineResponse2002, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2002 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/spaces/{space_ref}/artifact/stats" + localVarPath = strings.Replace(localVarPath, "{"+"space_ref"+"}", fmt.Sprintf("%v", spaceRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.From.IsSet() { + localVarQueryParams.Add("from", parameterToString(localVarOptionals.From.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.To.IsSet() { + localVarQueryParams.Add("to", parameterToString(localVarOptionals.To.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2002 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Get Artifact Summary +Get Artifact Summary. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + +@return InlineResponse2001 +*/ +func (a *ArtifactsApiService) GetArtifactSummary(ctx context.Context, registryRef string, artifact string) (InlineResponse2001, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2001 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/summary" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2001 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Get Artifact Version Summary +Get Artifact Version Summary. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param artifact Name of artifact. + * @param version Name of Artifact Version. + * @param optional nil or *ArtifactsApiGetArtifactVersionSummaryOpts - Optional Parameters: + * @param "Digest" (optional.String) - Digest. +@return InlineResponse20011 +*/ + +type ArtifactsApiGetArtifactVersionSummaryOpts struct { + Digest optional.String +} + +func (a *ArtifactsApiService) GetArtifactVersionSummary(ctx context.Context, registryRef string, artifact string, version string, localVarOptionals *ArtifactsApiGetArtifactVersionSummaryOpts) (InlineResponse20011, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20011 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/summary" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Digest.IsSet() { + localVarQueryParams.Add("digest", parameterToString(localVarOptionals.Digest.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20011 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService List Artifact Labels +List Artifact Labels. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param optional nil or *ArtifactsApiListArtifactLabelsOpts - Optional Parameters: + * @param "Page" (optional.Int64) - Current page number + * @param "Size" (optional.Int64) - Number of items per page + * @param "SearchTerm" (optional.String) - search Term. +@return InlineResponse20013 +*/ + +type ArtifactsApiListArtifactLabelsOpts struct { + Page optional.Int64 + Size optional.Int64 + SearchTerm optional.String +} + +func (a *ArtifactsApiService) ListArtifactLabels(ctx context.Context, registryRef string, localVarOptionals *ArtifactsApiListArtifactLabelsOpts) (InlineResponse20013, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20013 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/labels" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SearchTerm.IsSet() { + localVarQueryParams.Add("search_term", parameterToString(localVarOptionals.SearchTerm.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20013 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ArtifactsApiService Redirect to Harness Artifact Page +Redirect to Harness Artifact Page + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryIdentifier Unique registry Identifier in a account. + * @param artifact Name of artifact. + * @param optional nil or *ArtifactsApiRedirectHarnessArtifactOpts - Optional Parameters: + * @param "AccountIdentifier" (optional.String) - Account Identifier + * @param "Version" (optional.String) - Version + +*/ + +type ArtifactsApiRedirectHarnessArtifactOpts struct { + AccountIdentifier optional.String + Version optional.String +} + +func (a *ArtifactsApiService) RedirectHarnessArtifact(ctx context.Context, registryIdentifier string, artifact string, localVarOptionals *ArtifactsApiRedirectHarnessArtifactOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_identifier}/artifact/{artifact}/redirect" + localVarPath = strings.Replace(localVarPath, "{"+"registry_identifier"+"}", fmt.Sprintf("%v", registryIdentifier), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.AccountIdentifier.IsSet() { + localVarQueryParams.Add("accountIdentifier", parameterToString(localVarOptionals.AccountIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Version.IsSet() { + localVarQueryParams.Add("version", parameterToString(localVarOptionals.Version.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +ArtifactsApiService Update Artifact Labels +Update Artifact Labels. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param artifact Name of artifact. + * @param optional nil or *ArtifactsApiUpdateArtifactLabelsOpts - Optional Parameters: + * @param "Body" (optional.Interface of ArtifactLabelRequest) - request to update artifact labels +@return InlineResponse2001 +*/ + +type ArtifactsApiUpdateArtifactLabelsOpts struct { + Body optional.Interface +} + +func (a *ArtifactsApiService) UpdateArtifactLabels(ctx context.Context, registryRef string, artifact string, localVarOptionals *ArtifactsApiUpdateArtifactLabelsOpts) (InlineResponse2001, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2001 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/labels" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + + localVarOptionalBody := localVarOptionals.Body.Value() + localVarPostBody = &localVarOptionalBody + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2001 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/harness/har/api_docker_artifacts.go b/harness/har/api_docker_artifacts.go new file mode 100644 index 00000000..0444a416 --- /dev/null +++ b/harness/har/api_docker_artifacts.go @@ -0,0 +1,738 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type DockerArtifactsApiService service + +/* +DockerArtifactsApiService Describe Docker Artifact Detail +Get Docker Artifact Details + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + - @param digest Digest. + +@return InlineResponse2004 +*/ +func (a *DockerArtifactsApiService) GetDockerArtifactDetails(ctx context.Context, registryRef string, artifact string, version string, digest string) (InlineResponse2004, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2004 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("digest", parameterToString(digest, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2004 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DockerArtifactsApiService Describe Docker Artifact Integration Detail +Get Docker Artifact Integration Details + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + - @param digest Digest. + +@return InlineResponse2005 +*/ +func (a *DockerArtifactsApiService) GetDockerArtifactIntegrationDetails(ctx context.Context, registryRef string, artifact string, version string, digest string) (InlineResponse2005, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2005 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/integrationdetails" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("digest", parameterToString(digest, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2005 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DockerArtifactsApiService Describe Docker Artifact Layers +Get Docker Artifact Layers + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + - @param digest Digest. + +@return InlineResponse2006 +*/ +func (a *DockerArtifactsApiService) GetDockerArtifactLayers(ctx context.Context, registryRef string, artifact string, version string, digest string) (InlineResponse2006, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2006 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("digest", parameterToString(digest, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2006 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DockerArtifactsApiService Describe Docker Artifact Manifest +Get Docker Artifact Manifest + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + - @param digest Digest. + +@return InlineResponse2007 +*/ +func (a *DockerArtifactsApiService) GetDockerArtifactManifest(ctx context.Context, registryRef string, artifact string, version string, digest string) (InlineResponse2007, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2007 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("digest", parameterToString(digest, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2007 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DockerArtifactsApiService Describe Docker Artifact Manifests +Get Docker Artifact Manifests + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + +@return InlineResponse2008 +*/ +func (a *DockerArtifactsApiService) GetDockerArtifactManifests(ctx context.Context, registryRef string, artifact string, version string) (InlineResponse2008, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2008 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2008 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/harness/har/api_helm_artifacts.go b/harness/har/api_helm_artifacts.go new file mode 100644 index 00000000..ae219761 --- /dev/null +++ b/harness/har/api_helm_artifacts.go @@ -0,0 +1,307 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type HelmArtifactsApiService service + +/* +HelmArtifactsApiService Describe Helm Artifact Detail +Get Helm Artifact Details + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + +@return InlineResponse2009 +*/ +func (a *HelmArtifactsApiService) GetHelmArtifactDetails(ctx context.Context, registryRef string, artifact string, version string) (InlineResponse2009, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2009 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2009 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +HelmArtifactsApiService Describe Helm Artifact Manifest +Get Helm Artifact Manifest + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + - @param artifact Name of artifact. + - @param version Name of Artifact Version. + +@return InlineResponse20010 +*/ +func (a *HelmArtifactsApiService) GetHelmArtifactManifest(ctx context.Context, registryRef string, artifact string, version string) (InlineResponse20010, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20010 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact"+"}", fmt.Sprintf("%v", artifact), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", fmt.Sprintf("%v", version), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20010 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/harness/har/api_registries.go b/harness/har/api_registries.go new file mode 100644 index 00000000..7d803692 --- /dev/null +++ b/harness/har/api_registries.go @@ -0,0 +1,914 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type RegistriesApiService service + +/* +RegistriesApiService Create Registry. +Create a Registry. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *RegistriesApiCreateRegistryOpts - Optional Parameters: + * @param "Body" (optional.Interface of RegistryRequest) - request for create and update registry + * @param "SpaceRef" (optional.String) - Unique space path +@return InlineResponse201 +*/ + +type RegistriesApiCreateRegistryOpts struct { + Body optional.Interface + SpaceRef optional.String +} + +func (a *RegistriesApiService) CreateRegistry(ctx context.Context, localVarOptionals *RegistriesApiCreateRegistryOpts) (InlineResponse201, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse201 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SpaceRef.IsSet() { + localVarQueryParams.Add("space_ref", parameterToString(localVarOptionals.SpaceRef.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + + localVarOptionalBody := localVarOptionals.Body.Value() + localVarPostBody = &localVarOptionalBody + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 201 { + var v InlineResponse201 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RegistriesApiService Delete a Registry +Delete a Registry in the account for the given key + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + +@return InlineResponse200 +*/ +func (a *RegistriesApiService) DeleteRegistry(ctx context.Context, registryRef string) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RegistriesApiService List Artifacts for Registry +Lists all the Artifacts for Registry + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param optional nil or *RegistriesApiGetAllArtifactsByRegistryOpts - Optional Parameters: + * @param "Label" (optional.Interface of []string) - Label. + * @param "Page" (optional.Int64) - Current page number + * @param "Size" (optional.Int64) - Number of items per page + * @param "SortOrder" (optional.String) - sortOrder + * @param "SortField" (optional.String) - sortField + * @param "SearchTerm" (optional.String) - search Term. +@return InlineResponse20014 +*/ + +type RegistriesApiGetAllArtifactsByRegistryOpts struct { + Label optional.Interface + Page optional.Int64 + Size optional.Int64 + SortOrder optional.String + SortField optional.String + SearchTerm optional.String +} + +func (a *RegistriesApiService) GetAllArtifactsByRegistry(ctx context.Context, registryRef string, localVarOptionals *RegistriesApiGetAllArtifactsByRegistryOpts) (InlineResponse20014, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20014 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/artifacts" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Label.IsSet() { + localVarQueryParams.Add("label", parameterToString(localVarOptionals.Label.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortOrder.IsSet() { + localVarQueryParams.Add("sort_order", parameterToString(localVarOptionals.SortOrder.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortField.IsSet() { + localVarQueryParams.Add("sort_field", parameterToString(localVarOptionals.SortField.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SearchTerm.IsSet() { + localVarQueryParams.Add("search_term", parameterToString(localVarOptionals.SearchTerm.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20014 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RegistriesApiService Returns CLI Client Setup Details +Returns CLI Client Setup Details based on package type + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param optional nil or *RegistriesApiGetClientSetupDetailsOpts - Optional Parameters: + * @param "Artifact" (optional.String) - Artifat + * @param "Version" (optional.String) - Version +@return InlineResponse20015 +*/ + +type RegistriesApiGetClientSetupDetailsOpts struct { + Artifact optional.String + Version optional.String +} + +func (a *RegistriesApiService) GetClientSetupDetails(ctx context.Context, registryRef string, localVarOptionals *RegistriesApiGetClientSetupDetailsOpts) (InlineResponse20015, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20015 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}/client-setup-details" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Artifact.IsSet() { + localVarQueryParams.Add("artifact", parameterToString(localVarOptionals.Artifact.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Version.IsSet() { + localVarQueryParams.Add("version", parameterToString(localVarOptionals.Version.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20015 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RegistriesApiService Returns Registry Details +Returns Registry Details in the account for the given key + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryRef Unique registry path. + +@return InlineResponse201 +*/ +func (a *RegistriesApiService) GetRegistry(ctx context.Context, registryRef string) (InlineResponse201, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse201 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse201 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RegistriesApiService Updates a Registry +Updates a Registry in the account for the given key + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryRef Unique registry path. + * @param optional nil or *RegistriesApiModifyRegistryOpts - Optional Parameters: + * @param "Body" (optional.Interface of RegistryRequest) - request for create and update registry +@return InlineResponse201 +*/ + +type RegistriesApiModifyRegistryOpts struct { + Body optional.Interface +} + +func (a *RegistriesApiService) ModifyRegistry(ctx context.Context, registryRef string, localVarOptionals *RegistriesApiModifyRegistryOpts) (InlineResponse201, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse201 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registry/{registry_ref}" + localVarPath = strings.Replace(localVarPath, "{"+"registry_ref"+"}", fmt.Sprintf("%v", registryRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + + localVarOptionalBody := localVarOptionals.Body.Value() + localVarPostBody = &localVarOptionalBody + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse201 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/harness/har/api_spaces.go b/harness/har/api_spaces.go new file mode 100644 index 00000000..9075c4e7 --- /dev/null +++ b/harness/har/api_spaces.go @@ -0,0 +1,389 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type SpacesApiService service + +/* +SpacesApiService List Harness Artifacts +Lists all the Harness Artifacts. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param spaceRef Unique space path. + * @param optional nil or *SpacesApiGetAllHarnessArtifactsOpts - Optional Parameters: + * @param "RegIdentifier" (optional.Interface of []string) - Registry Identifier + * @param "Page" (optional.Int64) - Current page number + * @param "Size" (optional.Int64) - Number of items per page + * @param "SortOrder" (optional.String) - sortOrder + * @param "SortField" (optional.String) - sortField + * @param "SearchTerm" (optional.String) - search Term. + * @param "LatestVersion" (optional.Bool) - Latest Version Filter. + * @param "DeployedArtifact" (optional.Bool) - Deployed Artifact Filter. +@return InlineResponse20016 +*/ + +type SpacesApiGetAllHarnessArtifactsOpts struct { + RegIdentifier optional.Interface + Page optional.Int64 + Size optional.Int64 + SortOrder optional.String + SortField optional.String + SearchTerm optional.String + LatestVersion optional.Bool + DeployedArtifact optional.Bool +} + +func (a *SpacesApiService) GetAllHarnessArtifacts(ctx context.Context, spaceRef string, localVarOptionals *SpacesApiGetAllHarnessArtifactsOpts) (InlineResponse20016, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20016 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/spaces/{space_ref}/artifacts" + localVarPath = strings.Replace(localVarPath, "{"+"space_ref"+"}", fmt.Sprintf("%v", spaceRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.RegIdentifier.IsSet() { + localVarQueryParams.Add("reg_identifier", parameterToString(localVarOptionals.RegIdentifier.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortOrder.IsSet() { + localVarQueryParams.Add("sort_order", parameterToString(localVarOptionals.SortOrder.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortField.IsSet() { + localVarQueryParams.Add("sort_field", parameterToString(localVarOptionals.SortField.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SearchTerm.IsSet() { + localVarQueryParams.Add("search_term", parameterToString(localVarOptionals.SearchTerm.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.LatestVersion.IsSet() { + localVarQueryParams.Add("latest_version", parameterToString(localVarOptionals.LatestVersion.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.DeployedArtifact.IsSet() { + localVarQueryParams.Add("deployed_artifact", parameterToString(localVarOptionals.DeployedArtifact.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20016 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SpacesApiService List Registries +Lists all the Registries. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param spaceRef Unique space path. + * @param optional nil or *SpacesApiGetAllRegistriesOpts - Optional Parameters: + * @param "PackageType" (optional.Interface of []string) - Registry Package Type + * @param "Type_" (optional.String) - Registry Type + * @param "Page" (optional.Int64) - Current page number + * @param "Size" (optional.Int64) - Number of items per page + * @param "SortOrder" (optional.String) - sortOrder + * @param "SortField" (optional.String) - sortField + * @param "SearchTerm" (optional.String) - search Term. + * @param "Recursive" (optional.Bool) - Whether to list registries recursively. +@return InlineResponse20017 +*/ + +type SpacesApiGetAllRegistriesOpts struct { + PackageType optional.Interface + Type_ optional.String + Page optional.Int64 + Size optional.Int64 + SortOrder optional.String + SortField optional.String + SearchTerm optional.String + Recursive optional.Bool +} + +func (a *SpacesApiService) GetAllRegistries(ctx context.Context, spaceRef string, localVarOptionals *SpacesApiGetAllRegistriesOpts) (InlineResponse20017, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20017 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/spaces/{space_ref}/registries" + localVarPath = strings.Replace(localVarPath, "{"+"space_ref"+"}", fmt.Sprintf("%v", spaceRef), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.PackageType.IsSet() { + localVarQueryParams.Add("package_type", parameterToString(localVarOptionals.PackageType.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.Type_.IsSet() { + localVarQueryParams.Add("type", parameterToString(localVarOptionals.Type_.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortOrder.IsSet() { + localVarQueryParams.Add("sort_order", parameterToString(localVarOptionals.SortOrder.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortField.IsSet() { + localVarQueryParams.Add("sort_field", parameterToString(localVarOptionals.SortField.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SearchTerm.IsSet() { + localVarQueryParams.Add("search_term", parameterToString(localVarOptionals.SearchTerm.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Recursive.IsSet() { + localVarQueryParams.Add("recursive", parameterToString(localVarOptionals.Recursive.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse20017 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/harness/har/client.go b/harness/har/client.go new file mode 100644 index 00000000..d0be1911 --- /dev/null +++ b/harness/har/client.go @@ -0,0 +1,491 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") +) + +// APIClient manages communication with the Harness Artifact Registry API API v1.0.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + AccountId string + ApiKey string + Endpoint string + // API Services + + ArtifactsApi *ArtifactsApiService + + DockerArtifactsApi *DockerArtifactsApiService + + HelmArtifactsApi *HelmArtifactsApiService + + RegistriesApi *RegistriesApiService + + SpacesApi *SpacesApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + c.ApiKey = cfg.ApiKey + c.AccountId = cfg.AccountId + c.Endpoint = cfg.BasePath + + // API Services + c.ArtifactsApi = (*ArtifactsApiService)(&c.common) + c.DockerArtifactsApi = (*DockerArtifactsApiService)(&c.common) + c.HelmArtifactsApi = (*HelmArtifactsApiService)(&c.common) + c.RegistriesApi = (*RegistriesApiService)(&c.common) + c.SpacesApi = (*SpacesApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } + + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + } + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericSwaggerError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericSwaggerError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericSwaggerError) Model() interface{} { + return e.model +} diff --git a/harness/har/client_utils.go b/harness/har/client_utils.go new file mode 100644 index 00000000..957aa7d7 --- /dev/null +++ b/harness/har/client_utils.go @@ -0,0 +1,8 @@ +package har + +import "context" + +func (c *APIClient) WithAuthContext(ctx context.Context) (*APIClient, context.Context) { + authCtx := context.WithValue(ctx, ContextAPIKey, APIKey{Key: c.ApiKey}) + return c, authCtx +} diff --git a/harness/har/configuration.go b/harness/har/configuration.go new file mode 100644 index 00000000..a34f31a4 --- /dev/null +++ b/harness/har/configuration.go @@ -0,0 +1,77 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "github.com/harness/harness-go-sdk/harness/helpers" + "github.com/harness/harness-go-sdk/harness/utils" + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +type Configuration struct { + AccountId string `json:"accountId,omitempty"` + ApiKey string `json:"apiKey,omitempty"` + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + cfg := &Configuration{ + AccountId: helpers.EnvVars.AccountId.Get(), + ApiKey: helpers.EnvVars.PlatformApiKey.Get(), + BasePath: helpers.EnvVars.Endpoint.GetWithDefault(utils.BaseUrl) + "/har/api/v1", + DefaultHeader: make(map[string]string), + UserAgent: "Swagger-Codegen/1.0.0/go", + } + return cfg +} + +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/harness/har/docs/ArtifactDeploymentsDetail.md b/harness/har/docs/ArtifactDeploymentsDetail.md new file mode 100644 index 00000000..794a1d33 --- /dev/null +++ b/harness/har/docs/ArtifactDeploymentsDetail.md @@ -0,0 +1,24 @@ +# ArtifactDeploymentsDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **int32** | | [optional] [default to null] +**EnvIdentifier** | **string** | | [optional] [default to null] +**EnvName** | **string** | | [optional] [default to null] +**EnvType** | [***EnvironmentType**](EnvironmentType.md) | | [optional] [default to null] +**InfraIdentifier** | **string** | | [optional] [default to null] +**InfraName** | **string** | | [optional] [default to null] +**LastDeployedAt** | **string** | | [optional] [default to null] +**LastDeployedById** | **string** | | [optional] [default to null] +**LastDeployedByName** | **string** | | [optional] [default to null] +**LastPipelineExecutionId** | **string** | | [optional] [default to null] +**LastPipelineExecutionName** | **string** | | [optional] [default to null] +**OrgIdentifier** | **string** | | [optional] [default to null] +**PipelineId** | **string** | | [optional] [default to null] +**ProjectIdentifier** | **string** | | [optional] [default to null] +**ServiceIdentifier** | **string** | | [optional] [default to null] +**ServiceName** | **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/harness/har/docs/ArtifactDeploymentsDetails.md b/harness/har/docs/ArtifactDeploymentsDetails.md new file mode 100644 index 00000000..1e638c89 --- /dev/null +++ b/harness/har/docs/ArtifactDeploymentsDetails.md @@ -0,0 +1,10 @@ +# ArtifactDeploymentsDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deployments** | [***ArtifactDeploymentsList**](ArtifactDeploymentsList.md) | | [default to null] +**DeploymentsStats** | [***DeploymentStats**](DeploymentStats.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/harness/har/docs/ArtifactDeploymentsList.md b/harness/har/docs/ArtifactDeploymentsList.md new file mode 100644 index 00000000..fa79da8d --- /dev/null +++ b/harness/har/docs/ArtifactDeploymentsList.md @@ -0,0 +1,13 @@ +# ArtifactDeploymentsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deployments** | [**[]ArtifactDeploymentsDetail**](ArtifactDeploymentsDetail.md) | A list of Artifact | [optional] [default to null] +**ItemCount** | **int64** | The total number of items | [optional] [default to null] +**PageCount** | **int64** | The total number of pages | [optional] [default to null] +**PageIndex** | **int64** | The current page | [optional] [default to null] +**PageSize** | **int32** | The number of items per page | [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/harness/har/docs/ArtifactLabelRequest.md b/harness/har/docs/ArtifactLabelRequest.md new file mode 100644 index 00000000..73f90124 --- /dev/null +++ b/harness/har/docs/ArtifactLabelRequest.md @@ -0,0 +1,9 @@ +# ArtifactLabelRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Labels** | **[]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/harness/har/docs/ArtifactMetadata.md b/harness/har/docs/ArtifactMetadata.md new file mode 100644 index 00000000..0d0756ac --- /dev/null +++ b/harness/har/docs/ArtifactMetadata.md @@ -0,0 +1,23 @@ +# ArtifactMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeploymentMetadata** | [***DeploymentMetadata**](DeploymentMetadata.md) | | [optional] [default to null] +**DownloadsCount** | **int64** | | [optional] [default to null] +**Labels** | **[]string** | | [optional] [default to null] +**LastModified** | **string** | | [optional] [default to null] +**LatestVersion** | **string** | | [default to null] +**Name** | **string** | | [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [optional] [default to null] +**PullCommand** | **string** | | [optional] [default to null] +**RegistryIdentifier** | **string** | | [default to null] +**RegistryPath** | **string** | | [default to null] +**ScannedDigest** | [**[]StoDigestMetadata**](STODigestMetadata.md) | | [optional] [default to null] +**ScannedDigestCount** | **int64** | | [optional] [default to null] +**StoMetadata** | [***StoMetadata**](STOMetadata.md) | | [optional] [default to null] +**TotalDigestCount** | **int64** | | [optional] [default to null] +**Version** | **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/harness/har/docs/ArtifactStats.md b/harness/har/docs/ArtifactStats.md new file mode 100644 index 00000000..832c92ea --- /dev/null +++ b/harness/har/docs/ArtifactStats.md @@ -0,0 +1,12 @@ +# ArtifactStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DownloadCount** | **int64** | | [optional] [default to null] +**DownloadSize** | **int64** | | [optional] [default to null] +**TotalStorageSize** | **int64** | | [optional] [default to null] +**UploadSize** | **int64** | | [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/harness/har/docs/ArtifactSummary.md b/harness/har/docs/ArtifactSummary.md new file mode 100644 index 00000000..12811bf3 --- /dev/null +++ b/harness/har/docs/ArtifactSummary.md @@ -0,0 +1,14 @@ +# ArtifactSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **string** | | [optional] [default to null] +**DownloadsCount** | **int64** | | [optional] [default to null] +**ImageName** | **string** | | [default to null] +**Labels** | **[]string** | | [optional] [default to null] +**ModifiedAt** | **string** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.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/harness/har/docs/ArtifactVersionMetadata.md b/harness/har/docs/ArtifactVersionMetadata.md new file mode 100644 index 00000000..1fef64a4 --- /dev/null +++ b/harness/har/docs/ArtifactVersionMetadata.md @@ -0,0 +1,19 @@ +# ArtifactVersionMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeploymentMetadata** | [***DeploymentMetadata**](DeploymentMetadata.md) | | [optional] [default to null] +**DigestCount** | **int64** | | [optional] [default to null] +**DownloadsCount** | **int64** | | [optional] [default to null] +**IslatestVersion** | **bool** | | [optional] [default to null] +**LastModified** | **string** | | [optional] [default to null] +**Name** | **string** | | [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [optional] [default to null] +**PullCommand** | **string** | | [optional] [default to null] +**RegistryIdentifier** | **string** | | [default to null] +**RegistryPath** | **string** | | [default to null] +**Size** | **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/harness/har/docs/ArtifactVersionSummary.md b/harness/har/docs/ArtifactVersionSummary.md new file mode 100644 index 00000000..d5acd2ed --- /dev/null +++ b/harness/har/docs/ArtifactVersionSummary.md @@ -0,0 +1,16 @@ +# ArtifactVersionSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ImageName** | **string** | | [default to null] +**IsLatestVersion** | **bool** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [default to null] +**SscaArtifactId** | **string** | | [optional] [default to null] +**SscaArtifactSourceId** | **string** | | [optional] [default to null] +**StoExecutionId** | **string** | | [optional] [default to null] +**StoPipelineId** | **string** | | [optional] [default to null] +**Version** | **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/harness/har/docs/ArtifactsApi.md b/harness/har/docs/ArtifactsApi.md new file mode 100644 index 00000000..61608a19 --- /dev/null +++ b/harness/har/docs/ArtifactsApi.md @@ -0,0 +1,462 @@ +# har{{classname}} + +All URIs are relative to */gateway/har/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteArtifact**](ArtifactsApi.md#DeleteArtifact) | **Delete** /registry/{registry_ref}/artifact/{artifact} | Delete Artifact +[**DeleteArtifactVersion**](ArtifactsApi.md#DeleteArtifactVersion) | **Delete** /registry/{registry_ref}/artifact/{artifact}/version/{version} | Delete an Artifact Version +[**GetAllArtifactVersions**](ArtifactsApi.md#GetAllArtifactVersions) | **Get** /registry/{registry_ref}/artifact/{artifact}/versions | List Artifact Versions +[**GetArtifactDeployments**](ArtifactsApi.md#GetArtifactDeployments) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/deploymentdetails | Describe Artifact Deployments +[**GetArtifactStats**](ArtifactsApi.md#GetArtifactStats) | **Get** /registry/{registry_ref}/artifact/{artifact}/stats | Get Artifact Stats +[**GetArtifactStatsForRegistry**](ArtifactsApi.md#GetArtifactStatsForRegistry) | **Get** /registry/{registry_ref}/artifact/stats | Get Artifact Stats +[**GetArtifactStatsForSpace**](ArtifactsApi.md#GetArtifactStatsForSpace) | **Get** /spaces/{space_ref}/artifact/stats | Get Artifact Stats +[**GetArtifactSummary**](ArtifactsApi.md#GetArtifactSummary) | **Get** /registry/{registry_ref}/artifact/{artifact}/summary | Get Artifact Summary +[**GetArtifactVersionSummary**](ArtifactsApi.md#GetArtifactVersionSummary) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/summary | Get Artifact Version Summary +[**ListArtifactLabels**](ArtifactsApi.md#ListArtifactLabels) | **Get** /registry/{registry_ref}/artifact/labels | List Artifact Labels +[**RedirectHarnessArtifact**](ArtifactsApi.md#RedirectHarnessArtifact) | **Get** /registry/{registry_identifier}/artifact/{artifact}/redirect | Redirect to Harness Artifact Page +[**UpdateArtifactLabels**](ArtifactsApi.md#UpdateArtifactLabels) | **Put** /registry/{registry_ref}/artifact/{artifact}/labels | Update Artifact Labels + +# **DeleteArtifact** +> InlineResponse200 DeleteArtifact(ctx, registryRef, artifact) +Delete Artifact + +Delete Artifact. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + +### Return type + +[**InlineResponse200**](inline_response_200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteArtifactVersion** +> InlineResponse200 DeleteArtifactVersion(ctx, registryRef, artifact, version) +Delete an Artifact Version + +Delete Artifact Version. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + +### Return type + +[**InlineResponse200**](inline_response_200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetAllArtifactVersions** +> InlineResponse20012 GetAllArtifactVersions(ctx, registryRef, artifact, optional) +List Artifact Versions + +Lists all the Artifact Versions. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **optional** | ***ArtifactsApiGetAllArtifactVersionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiGetAllArtifactVersionsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **page** | **optional.Int64**| Current page number | [default to 1] + **size** | **optional.Int64**| Number of items per page | [default to 20] + **sortOrder** | **optional.String**| sortOrder | + **sortField** | **optional.String**| sortField | + **searchTerm** | **optional.String**| search Term. | + +### Return type + +[**InlineResponse20012**](inline_response_200_12.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetArtifactDeployments** +> InlineResponse2003 GetArtifactDeployments(ctx, registryRef, artifact, version, optional) +Describe Artifact Deployments + +Get Artifact Deployments + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + **optional** | ***ArtifactsApiGetArtifactDeploymentsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiGetArtifactDeploymentsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **envType** | **optional.String**| env type | + **page** | **optional.Int64**| Current page number | [default to 1] + **size** | **optional.Int64**| Number of items per page | [default to 20] + **sortOrder** | **optional.String**| sortOrder | + **sortField** | **optional.String**| sortField | + **searchTerm** | **optional.String**| search Term. | + +### Return type + +[**InlineResponse2003**](inline_response_200_3.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetArtifactStats** +> InlineResponse2002 GetArtifactStats(ctx, registryRef, artifact, optional) +Get Artifact Stats + +Get Artifact Stats. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **optional** | ***ArtifactsApiGetArtifactStatsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiGetArtifactStatsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **from** | **optional.String**| Date. Format - MM/DD/YYYY | + **to** | **optional.String**| Date. Format - MM/DD/YYYY | + +### Return type + +[**InlineResponse2002**](inline_response_200_2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetArtifactStatsForRegistry** +> InlineResponse2002 GetArtifactStatsForRegistry(ctx, registryRef, optional) +Get Artifact Stats + +Get Artifact Stats. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **optional** | ***ArtifactsApiGetArtifactStatsForRegistryOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiGetArtifactStatsForRegistryOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **from** | **optional.String**| Date. Format - MM/DD/YYYY | + **to** | **optional.String**| Date. Format - MM/DD/YYYY | + +### Return type + +[**InlineResponse2002**](inline_response_200_2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetArtifactStatsForSpace** +> InlineResponse2002 GetArtifactStatsForSpace(ctx, spaceRef, optional) +Get Artifact Stats + +Get Artifact Stats. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceRef** | **string**| Unique space path. | + **optional** | ***ArtifactsApiGetArtifactStatsForSpaceOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiGetArtifactStatsForSpaceOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **from** | **optional.String**| Date. Format - MM/DD/YYYY | + **to** | **optional.String**| Date. Format - MM/DD/YYYY | + +### Return type + +[**InlineResponse2002**](inline_response_200_2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetArtifactSummary** +> InlineResponse2001 GetArtifactSummary(ctx, registryRef, artifact) +Get Artifact Summary + +Get Artifact Summary. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + +### Return type + +[**InlineResponse2001**](inline_response_200_1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetArtifactVersionSummary** +> InlineResponse20011 GetArtifactVersionSummary(ctx, registryRef, artifact, version, optional) +Get Artifact Version Summary + +Get Artifact Version Summary. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + **optional** | ***ArtifactsApiGetArtifactVersionSummaryOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiGetArtifactVersionSummaryOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **digest** | **optional.String**| Digest. | + +### Return type + +[**InlineResponse20011**](inline_response_200_11.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListArtifactLabels** +> InlineResponse20013 ListArtifactLabels(ctx, registryRef, optional) +List Artifact Labels + +List Artifact Labels. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **optional** | ***ArtifactsApiListArtifactLabelsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiListArtifactLabelsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **page** | **optional.Int64**| Current page number | [default to 1] + **size** | **optional.Int64**| Number of items per page | [default to 20] + **searchTerm** | **optional.String**| search Term. | + +### Return type + +[**InlineResponse20013**](inline_response_200_13.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RedirectHarnessArtifact** +> RedirectHarnessArtifact(ctx, registryIdentifier, artifact, optional) +Redirect to Harness Artifact Page + +Redirect to Harness Artifact Page + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryIdentifier** | **string**| Unique registry Identifier in a account. | + **artifact** | **string**| Name of artifact. | + **optional** | ***ArtifactsApiRedirectHarnessArtifactOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiRedirectHarnessArtifactOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **accountIdentifier** | **optional.String**| Account Identifier | + **version** | **optional.String**| Version | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateArtifactLabels** +> InlineResponse2001 UpdateArtifactLabels(ctx, registryRef, artifact, optional) +Update Artifact Labels + +Update Artifact Labels. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **optional** | ***ArtifactsApiUpdateArtifactLabelsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ArtifactsApiUpdateArtifactLabelsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**optional.Interface of ArtifactLabelRequest**](ArtifactLabelRequest.md)| request to update artifact labels | + +### Return type + +[**InlineResponse2001**](inline_response_200_1.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/harness/har/docs/AuthType.md b/harness/har/docs/AuthType.md new file mode 100644 index 00000000..fa50849d --- /dev/null +++ b/harness/har/docs/AuthType.md @@ -0,0 +1,8 @@ +# AuthType + +## 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/harness/har/docs/BuildDetails.md b/harness/har/docs/BuildDetails.md new file mode 100644 index 00000000..25f5b518 --- /dev/null +++ b/harness/har/docs/BuildDetails.md @@ -0,0 +1,15 @@ +# BuildDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrgIdentifier** | **string** | | [optional] [default to null] +**PipelineDisplayName** | **string** | | [optional] [default to null] +**PipelineExecutionId** | **string** | | [optional] [default to null] +**PipelineIdentifier** | **string** | | [optional] [default to null] +**ProjectIdentifier** | **string** | | [optional] [default to null] +**StageExecutionId** | **string** | | [optional] [default to null] +**StepExecutionId** | **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/harness/har/docs/CleanupPolicy.md b/harness/har/docs/CleanupPolicy.md new file mode 100644 index 00000000..27fe391a --- /dev/null +++ b/harness/har/docs/CleanupPolicy.md @@ -0,0 +1,12 @@ +# CleanupPolicy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExpireDays** | **int32** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**PackagePrefix** | **[]string** | | [optional] [default to null] +**VersionPrefix** | **[]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/harness/har/docs/ClientSetupDetails.md b/harness/har/docs/ClientSetupDetails.md new file mode 100644 index 00000000..5fb3b405 --- /dev/null +++ b/harness/har/docs/ClientSetupDetails.md @@ -0,0 +1,11 @@ +# ClientSetupDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MainHeader** | **string** | | [default to null] +**SecHeader** | **string** | | [default to null] +**Sections** | [**[]ClientSetupSection**](ClientSetupSection.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/harness/har/docs/ClientSetupSection.md b/harness/har/docs/ClientSetupSection.md new file mode 100644 index 00000000..f77ea333 --- /dev/null +++ b/harness/har/docs/ClientSetupSection.md @@ -0,0 +1,10 @@ +# ClientSetupSection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Header** | **string** | | [optional] [default to null] +**Steps** | [**[]ClientSetupStep**](ClientSetupStep.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/harness/har/docs/ClientSetupStep.md b/harness/har/docs/ClientSetupStep.md new file mode 100644 index 00000000..2ec27d1b --- /dev/null +++ b/harness/har/docs/ClientSetupStep.md @@ -0,0 +1,11 @@ +# ClientSetupStep + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commands** | [**[]ClientSetupStepCommand**](ClientSetupStepCommand.md) | | [optional] [default to null] +**Header** | **string** | | [optional] [default to null] +**Type_** | [***ClientSetupStepType**](ClientSetupStepType.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/harness/har/docs/ClientSetupStepCommand.md b/harness/har/docs/ClientSetupStepCommand.md new file mode 100644 index 00000000..4c51bdfa --- /dev/null +++ b/harness/har/docs/ClientSetupStepCommand.md @@ -0,0 +1,10 @@ +# ClientSetupStepCommand + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Label** | **string** | | [optional] [default to null] +**Value** | **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/harness/har/docs/ClientSetupStepType.md b/harness/har/docs/ClientSetupStepType.md new file mode 100644 index 00000000..50d5659b --- /dev/null +++ b/harness/har/docs/ClientSetupStepType.md @@ -0,0 +1,8 @@ +# ClientSetupStepType + +## 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/harness/har/docs/DeploymentDetails.md b/harness/har/docs/DeploymentDetails.md new file mode 100644 index 00000000..c176330e --- /dev/null +++ b/harness/har/docs/DeploymentDetails.md @@ -0,0 +1,11 @@ +# DeploymentDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NonProdDeployment** | **int32** | | [default to null] +**ProdDeployment** | **int32** | | [default to null] +**TotalDeployment** | **int32** | | [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/harness/har/docs/DeploymentMetadata.md b/harness/har/docs/DeploymentMetadata.md new file mode 100644 index 00000000..0490ad50 --- /dev/null +++ b/harness/har/docs/DeploymentMetadata.md @@ -0,0 +1,10 @@ +# DeploymentMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NonProdEnvCount** | **int32** | | [default to null] +**ProdEnvCount** | **int32** | | [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/harness/har/docs/DeploymentStats.md b/harness/har/docs/DeploymentStats.md new file mode 100644 index 00000000..b5680286 --- /dev/null +++ b/harness/har/docs/DeploymentStats.md @@ -0,0 +1,10 @@ +# DeploymentStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PreProduction** | **int32** | | [default to null] +**Production** | **int32** | | [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/harness/har/docs/DockerArtifactDetail.md b/harness/har/docs/DockerArtifactDetail.md new file mode 100644 index 00000000..5320e896 --- /dev/null +++ b/harness/har/docs/DockerArtifactDetail.md @@ -0,0 +1,19 @@ +# DockerArtifactDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **string** | | [optional] [default to null] +**DownloadsCount** | **int64** | | [optional] [default to null] +**ImageName** | **string** | | [default to null] +**IsLatestVersion** | **bool** | | [optional] [default to null] +**ModifiedAt** | **string** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [default to null] +**PullCommand** | **string** | | [optional] [default to null] +**RegistryPath** | **string** | | [default to null] +**Size** | **string** | | [optional] [default to null] +**Url** | **string** | | [default to null] +**Version** | **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/harness/har/docs/DockerArtifactIntegrationDetail.md b/harness/har/docs/DockerArtifactIntegrationDetail.md new file mode 100644 index 00000000..d71870d5 --- /dev/null +++ b/harness/har/docs/DockerArtifactIntegrationDetail.md @@ -0,0 +1,13 @@ +# DockerArtifactIntegrationDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BuildDetails** | [***BuildDetails**](BuildDetails.md) | | [optional] [default to null] +**DeploymentsDetails** | [***DeploymentDetails**](DeploymentDetails.md) | | [optional] [default to null] +**SbomDetails** | [***SbomDetails**](SBOMDetails.md) | | [optional] [default to null] +**SlsaDetails** | [***SlsaDetails**](SLSADetails.md) | | [optional] [default to null] +**StoDetails** | [***StoDetails**](STODetails.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/harness/har/docs/DockerArtifactManifest.md b/harness/har/docs/DockerArtifactManifest.md new file mode 100644 index 00000000..db2bd0c6 --- /dev/null +++ b/harness/har/docs/DockerArtifactManifest.md @@ -0,0 +1,9 @@ +# DockerArtifactManifest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manifest** | **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/harness/har/docs/DockerArtifactsApi.md b/harness/har/docs/DockerArtifactsApi.md new file mode 100644 index 00000000..e81a498c --- /dev/null +++ b/harness/har/docs/DockerArtifactsApi.md @@ -0,0 +1,166 @@ +# har{{classname}} + +All URIs are relative to */gateway/har/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetDockerArtifactDetails**](DockerArtifactsApi.md#GetDockerArtifactDetails) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details | Describe Docker Artifact Detail +[**GetDockerArtifactIntegrationDetails**](DockerArtifactsApi.md#GetDockerArtifactIntegrationDetails) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/integrationdetails | Describe Docker Artifact Integration Detail +[**GetDockerArtifactLayers**](DockerArtifactsApi.md#GetDockerArtifactLayers) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers | Describe Docker Artifact Layers +[**GetDockerArtifactManifest**](DockerArtifactsApi.md#GetDockerArtifactManifest) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest | Describe Docker Artifact Manifest +[**GetDockerArtifactManifests**](DockerArtifactsApi.md#GetDockerArtifactManifests) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests | Describe Docker Artifact Manifests + +# **GetDockerArtifactDetails** +> InlineResponse2004 GetDockerArtifactDetails(ctx, registryRef, artifact, version, digest) +Describe Docker Artifact Detail + +Get Docker Artifact Details + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + **digest** | **string**| Digest. | + +### Return type + +[**InlineResponse2004**](inline_response_200_4.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetDockerArtifactIntegrationDetails** +> InlineResponse2005 GetDockerArtifactIntegrationDetails(ctx, registryRef, artifact, version, digest) +Describe Docker Artifact Integration Detail + +Get Docker Artifact Integration Details + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + **digest** | **string**| Digest. | + +### Return type + +[**InlineResponse2005**](inline_response_200_5.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetDockerArtifactLayers** +> InlineResponse2006 GetDockerArtifactLayers(ctx, registryRef, artifact, version, digest) +Describe Docker Artifact Layers + +Get Docker Artifact Layers + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + **digest** | **string**| Digest. | + +### Return type + +[**InlineResponse2006**](inline_response_200_6.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetDockerArtifactManifest** +> InlineResponse2007 GetDockerArtifactManifest(ctx, registryRef, artifact, version, digest) +Describe Docker Artifact Manifest + +Get Docker Artifact Manifest + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + **digest** | **string**| Digest. | + +### Return type + +[**InlineResponse2007**](inline_response_200_7.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetDockerArtifactManifests** +> InlineResponse2008 GetDockerArtifactManifests(ctx, registryRef, artifact, version) +Describe Docker Artifact Manifests + +Get Docker Artifact Manifests + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + +### Return type + +[**InlineResponse2008**](inline_response_200_8.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[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/harness/har/docs/DockerLayerEntry.md b/harness/har/docs/DockerLayerEntry.md new file mode 100644 index 00000000..6b099e03 --- /dev/null +++ b/harness/har/docs/DockerLayerEntry.md @@ -0,0 +1,10 @@ +# DockerLayerEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Command** | **string** | | [default to null] +**Size** | **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/harness/har/docs/DockerLayersSummary.md b/harness/har/docs/DockerLayersSummary.md new file mode 100644 index 00000000..9d1e5f40 --- /dev/null +++ b/harness/har/docs/DockerLayersSummary.md @@ -0,0 +1,11 @@ +# DockerLayersSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Digest** | **string** | | [default to null] +**Layers** | [**[]DockerLayerEntry**](DockerLayerEntry.md) | | [optional] [default to null] +**OsArch** | **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/harness/har/docs/DockerManifestDetails.md b/harness/har/docs/DockerManifestDetails.md new file mode 100644 index 00000000..dce3cb4c --- /dev/null +++ b/harness/har/docs/DockerManifestDetails.md @@ -0,0 +1,14 @@ +# DockerManifestDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **string** | | [optional] [default to null] +**Digest** | **string** | | [default to null] +**OsArch** | **string** | | [default to null] +**Size** | **string** | | [optional] [default to null] +**StoExecutionId** | **string** | | [optional] [default to null] +**StoPipelineId** | **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/harness/har/docs/DockerManifests.md b/harness/har/docs/DockerManifests.md new file mode 100644 index 00000000..f632bf48 --- /dev/null +++ b/harness/har/docs/DockerManifests.md @@ -0,0 +1,12 @@ +# DockerManifests + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ImageName** | **string** | | [default to null] +**IsLatestVersion** | **bool** | | [optional] [default to null] +**Manifests** | [**[]DockerManifestDetails**](DockerManifestDetails.md) | | [optional] [default to null] +**Version** | **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/harness/har/docs/EnvironmentType.md b/harness/har/docs/EnvironmentType.md new file mode 100644 index 00000000..d0280416 --- /dev/null +++ b/harness/har/docs/EnvironmentType.md @@ -0,0 +1,8 @@ +# EnvironmentType + +## 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/harness/har/docs/HelmArtifactDetail.md b/harness/har/docs/HelmArtifactDetail.md new file mode 100644 index 00000000..c2142662 --- /dev/null +++ b/harness/har/docs/HelmArtifactDetail.md @@ -0,0 +1,19 @@ +# HelmArtifactDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Artifact** | **string** | | [optional] [default to null] +**CreatedAt** | **string** | | [optional] [default to null] +**DownloadsCount** | **int64** | | [optional] [default to null] +**IsLatestVersion** | **bool** | | [optional] [default to null] +**ModifiedAt** | **string** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [default to null] +**PullCommand** | **string** | | [optional] [default to null] +**RegistryPath** | **string** | | [default to null] +**Size** | **string** | | [optional] [default to null] +**Url** | **string** | | [default to null] +**Version** | **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/harness/har/docs/HelmArtifactManifest.md b/harness/har/docs/HelmArtifactManifest.md new file mode 100644 index 00000000..bcd9fb17 --- /dev/null +++ b/harness/har/docs/HelmArtifactManifest.md @@ -0,0 +1,9 @@ +# HelmArtifactManifest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manifest** | **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/harness/har/docs/HelmArtifactsApi.md b/harness/har/docs/HelmArtifactsApi.md new file mode 100644 index 00000000..3e240f17 --- /dev/null +++ b/harness/har/docs/HelmArtifactsApi.md @@ -0,0 +1,69 @@ +# har{{classname}} + +All URIs are relative to */gateway/har/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetHelmArtifactDetails**](HelmArtifactsApi.md#GetHelmArtifactDetails) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details | Describe Helm Artifact Detail +[**GetHelmArtifactManifest**](HelmArtifactsApi.md#GetHelmArtifactManifest) | **Get** /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest | Describe Helm Artifact Manifest + +# **GetHelmArtifactDetails** +> InlineResponse2009 GetHelmArtifactDetails(ctx, registryRef, artifact, version) +Describe Helm Artifact Detail + +Get Helm Artifact Details + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + +### Return type + +[**InlineResponse2009**](inline_response_200_9.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetHelmArtifactManifest** +> InlineResponse20010 GetHelmArtifactManifest(ctx, registryRef, artifact, version) +Describe Helm Artifact Manifest + +Get Helm Artifact Manifest + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **artifact** | **string**| Name of artifact. | + **version** | **string**| Name of Artifact Version. | + +### Return type + +[**InlineResponse20010**](inline_response_200_10.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[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/harness/har/docs/InlineResponse200.md b/harness/har/docs/InlineResponse200.md new file mode 100644 index 00000000..d32d6ca4 --- /dev/null +++ b/harness/har/docs/InlineResponse200.md @@ -0,0 +1,9 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2001.md b/harness/har/docs/InlineResponse2001.md new file mode 100644 index 00000000..0b9486d5 --- /dev/null +++ b/harness/har/docs/InlineResponse2001.md @@ -0,0 +1,10 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ArtifactSummary**](ArtifactSummary.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20010.md b/harness/har/docs/InlineResponse20010.md new file mode 100644 index 00000000..bae9fc41 --- /dev/null +++ b/harness/har/docs/InlineResponse20010.md @@ -0,0 +1,10 @@ +# InlineResponse20010 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***HelmArtifactManifest**](HelmArtifactManifest.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20011.md b/harness/har/docs/InlineResponse20011.md new file mode 100644 index 00000000..059599da --- /dev/null +++ b/harness/har/docs/InlineResponse20011.md @@ -0,0 +1,10 @@ +# InlineResponse20011 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ArtifactVersionSummary**](ArtifactVersionSummary.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20012.md b/harness/har/docs/InlineResponse20012.md new file mode 100644 index 00000000..8210159f --- /dev/null +++ b/harness/har/docs/InlineResponse20012.md @@ -0,0 +1,10 @@ +# InlineResponse20012 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ListArtifactVersion**](ListArtifactVersion.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20013.md b/harness/har/docs/InlineResponse20013.md new file mode 100644 index 00000000..604affac --- /dev/null +++ b/harness/har/docs/InlineResponse20013.md @@ -0,0 +1,10 @@ +# InlineResponse20013 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ListArtifactLabel**](ListArtifactLabel.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20014.md b/harness/har/docs/InlineResponse20014.md new file mode 100644 index 00000000..48309253 --- /dev/null +++ b/harness/har/docs/InlineResponse20014.md @@ -0,0 +1,10 @@ +# InlineResponse20014 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ListRegistryArtifact**](ListRegistryArtifact.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20015.md b/harness/har/docs/InlineResponse20015.md new file mode 100644 index 00000000..d1943aa8 --- /dev/null +++ b/harness/har/docs/InlineResponse20015.md @@ -0,0 +1,10 @@ +# InlineResponse20015 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ClientSetupDetails**](ClientSetupDetails.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20016.md b/harness/har/docs/InlineResponse20016.md new file mode 100644 index 00000000..93e6575f --- /dev/null +++ b/harness/har/docs/InlineResponse20016.md @@ -0,0 +1,10 @@ +# InlineResponse20016 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ListArtifact**](ListArtifact.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse20017.md b/harness/har/docs/InlineResponse20017.md new file mode 100644 index 00000000..05434c33 --- /dev/null +++ b/harness/har/docs/InlineResponse20017.md @@ -0,0 +1,10 @@ +# InlineResponse20017 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ListRegistry**](ListRegistry.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2002.md b/harness/har/docs/InlineResponse2002.md new file mode 100644 index 00000000..8dfca657 --- /dev/null +++ b/harness/har/docs/InlineResponse2002.md @@ -0,0 +1,10 @@ +# InlineResponse2002 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ArtifactStats**](ArtifactStats.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2003.md b/harness/har/docs/InlineResponse2003.md new file mode 100644 index 00000000..0a111582 --- /dev/null +++ b/harness/har/docs/InlineResponse2003.md @@ -0,0 +1,10 @@ +# InlineResponse2003 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ArtifactDeploymentsDetails**](ArtifactDeploymentsDetails.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2004.md b/harness/har/docs/InlineResponse2004.md new file mode 100644 index 00000000..916dc7a1 --- /dev/null +++ b/harness/har/docs/InlineResponse2004.md @@ -0,0 +1,10 @@ +# InlineResponse2004 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***DockerArtifactDetail**](DockerArtifactDetail.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2005.md b/harness/har/docs/InlineResponse2005.md new file mode 100644 index 00000000..b1a9fa01 --- /dev/null +++ b/harness/har/docs/InlineResponse2005.md @@ -0,0 +1,10 @@ +# InlineResponse2005 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***DockerArtifactIntegrationDetail**](DockerArtifactIntegrationDetail.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2006.md b/harness/har/docs/InlineResponse2006.md new file mode 100644 index 00000000..69dc5932 --- /dev/null +++ b/harness/har/docs/InlineResponse2006.md @@ -0,0 +1,10 @@ +# InlineResponse2006 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***DockerLayersSummary**](DockerLayersSummary.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2007.md b/harness/har/docs/InlineResponse2007.md new file mode 100644 index 00000000..e209f9b8 --- /dev/null +++ b/harness/har/docs/InlineResponse2007.md @@ -0,0 +1,10 @@ +# InlineResponse2007 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***DockerArtifactManifest**](DockerArtifactManifest.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2008.md b/harness/har/docs/InlineResponse2008.md new file mode 100644 index 00000000..309091e6 --- /dev/null +++ b/harness/har/docs/InlineResponse2008.md @@ -0,0 +1,10 @@ +# InlineResponse2008 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***DockerManifests**](DockerManifests.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse2009.md b/harness/har/docs/InlineResponse2009.md new file mode 100644 index 00000000..d903c854 --- /dev/null +++ b/harness/har/docs/InlineResponse2009.md @@ -0,0 +1,10 @@ +# InlineResponse2009 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***HelmArtifactDetail**](HelmArtifactDetail.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/InlineResponse201.md b/harness/har/docs/InlineResponse201.md new file mode 100644 index 00000000..59c8bdb1 --- /dev/null +++ b/harness/har/docs/InlineResponse201.md @@ -0,0 +1,10 @@ +# InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***Registry**](Registry.md) | | [default to null] +**Status** | [***Status**](Status.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/harness/har/docs/ListArtifact.md b/harness/har/docs/ListArtifact.md new file mode 100644 index 00000000..9c2cb399 --- /dev/null +++ b/harness/har/docs/ListArtifact.md @@ -0,0 +1,13 @@ +# ListArtifact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Artifacts** | [**[]ArtifactMetadata**](ArtifactMetadata.md) | A list of Artifact | [default to null] +**ItemCount** | **int64** | The total number of items | [optional] [default to null] +**PageCount** | **int64** | The total number of pages | [optional] [default to null] +**PageIndex** | **int64** | The current page | [optional] [default to null] +**PageSize** | **int32** | The number of items per page | [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/harness/har/docs/ListArtifactLabel.md b/harness/har/docs/ListArtifactLabel.md new file mode 100644 index 00000000..a756da64 --- /dev/null +++ b/harness/har/docs/ListArtifactLabel.md @@ -0,0 +1,13 @@ +# ListArtifactLabel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ItemCount** | **int64** | The total number of items | [optional] [default to null] +**Labels** | **[]string** | | [default to null] +**PageCount** | **int64** | The total number of pages | [optional] [default to null] +**PageIndex** | **int64** | The current page | [optional] [default to null] +**PageSize** | **int32** | The number of items per page | [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/harness/har/docs/ListArtifactVersion.md b/harness/har/docs/ListArtifactVersion.md new file mode 100644 index 00000000..d2845cb8 --- /dev/null +++ b/harness/har/docs/ListArtifactVersion.md @@ -0,0 +1,13 @@ +# ListArtifactVersion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArtifactVersions** | [**[]ArtifactVersionMetadata**](ArtifactVersionMetadata.md) | A list of Artifact versions | [optional] [default to null] +**ItemCount** | **int64** | The total number of items | [optional] [default to null] +**PageCount** | **int64** | The total number of pages | [optional] [default to null] +**PageIndex** | **int64** | The current page | [optional] [default to null] +**PageSize** | **int32** | The number of items per page | [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/harness/har/docs/ListRegistry.md b/harness/har/docs/ListRegistry.md new file mode 100644 index 00000000..3bacf321 --- /dev/null +++ b/harness/har/docs/ListRegistry.md @@ -0,0 +1,13 @@ +# ListRegistry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ItemCount** | **int64** | The total number of items | [optional] [default to null] +**PageCount** | **int64** | The total number of pages | [optional] [default to null] +**PageIndex** | **int64** | The current page | [optional] [default to null] +**PageSize** | **int32** | The number of items per page | [optional] [default to null] +**Registries** | [**[]RegistryMetadata**](RegistryMetadata.md) | A list of Harness Artifact Registries | [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/harness/har/docs/ListRegistryArtifact.md b/harness/har/docs/ListRegistryArtifact.md new file mode 100644 index 00000000..f2d22221 --- /dev/null +++ b/harness/har/docs/ListRegistryArtifact.md @@ -0,0 +1,13 @@ +# ListRegistryArtifact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Artifacts** | [**[]RegistryArtifactMetadata**](RegistryArtifactMetadata.md) | A list of Artifact | [default to null] +**ItemCount** | **int64** | The total number of items | [optional] [default to null] +**PageCount** | **int64** | The total number of pages | [optional] [default to null] +**PageIndex** | **int64** | The current page | [optional] [default to null] +**PageSize** | **int32** | The number of items per page | [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/harness/har/docs/ModelError.md b/harness/har/docs/ModelError.md new file mode 100644 index 00000000..0042e011 --- /dev/null +++ b/harness/har/docs/ModelError.md @@ -0,0 +1,11 @@ +# ModelError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | The http error code | [default to null] +**Details** | [***interface{}**](interface{}.md) | Additional details about the error | [optional] [default to null] +**Message** | **string** | The reason the request failed | [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/harness/har/docs/OneOfRegistryConfig.md b/harness/har/docs/OneOfRegistryConfig.md new file mode 100644 index 00000000..245ace55 --- /dev/null +++ b/harness/har/docs/OneOfRegistryConfig.md @@ -0,0 +1,8 @@ +# OneOfRegistryConfig + +## 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/harness/har/docs/OneOfUpstreamConfigAuth.md b/harness/har/docs/OneOfUpstreamConfigAuth.md new file mode 100644 index 00000000..f3b54ebe --- /dev/null +++ b/harness/har/docs/OneOfUpstreamConfigAuth.md @@ -0,0 +1,8 @@ +# OneOfUpstreamConfigAuth + +## 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/harness/har/docs/PackageType.md b/harness/har/docs/PackageType.md new file mode 100644 index 00000000..9652ba80 --- /dev/null +++ b/harness/har/docs/PackageType.md @@ -0,0 +1,8 @@ +# PackageType + +## 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/harness/har/docs/RegistriesApi.md b/harness/har/docs/RegistriesApi.md new file mode 100644 index 00000000..a79a01a9 --- /dev/null +++ b/harness/har/docs/RegistriesApi.md @@ -0,0 +1,218 @@ +# har{{classname}} + +All URIs are relative to */gateway/har/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRegistry**](RegistriesApi.md#CreateRegistry) | **Post** /registry | Create Registry. +[**DeleteRegistry**](RegistriesApi.md#DeleteRegistry) | **Delete** /registry/{registry_ref} | Delete a Registry +[**GetAllArtifactsByRegistry**](RegistriesApi.md#GetAllArtifactsByRegistry) | **Get** /registry/{registry_ref}/artifacts | List Artifacts for Registry +[**GetClientSetupDetails**](RegistriesApi.md#GetClientSetupDetails) | **Get** /registry/{registry_ref}/client-setup-details | Returns CLI Client Setup Details +[**GetRegistry**](RegistriesApi.md#GetRegistry) | **Get** /registry/{registry_ref} | Returns Registry Details +[**ModifyRegistry**](RegistriesApi.md#ModifyRegistry) | **Put** /registry/{registry_ref} | Updates a Registry + +# **CreateRegistry** +> InlineResponse201 CreateRegistry(ctx, optional) +Create Registry. + +Create a Registry. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***RegistriesApiCreateRegistryOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegistriesApiCreateRegistryOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**optional.Interface of RegistryRequest**](RegistryRequest.md)| request for create and update registry | + **spaceRef** | **optional.**| Unique space path | + +### Return type + +[**InlineResponse201**](inline_response_201.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) + +# **DeleteRegistry** +> InlineResponse200 DeleteRegistry(ctx, registryRef) +Delete a Registry + +Delete a Registry in the account for the given key + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + +### Return type + +[**InlineResponse200**](inline_response_200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetAllArtifactsByRegistry** +> InlineResponse20014 GetAllArtifactsByRegistry(ctx, registryRef, optional) +List Artifacts for Registry + +Lists all the Artifacts for Registry + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **optional** | ***RegistriesApiGetAllArtifactsByRegistryOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegistriesApiGetAllArtifactsByRegistryOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **label** | [**optional.Interface of []string**](string.md)| Label. | + **page** | **optional.Int64**| Current page number | [default to 1] + **size** | **optional.Int64**| Number of items per page | [default to 20] + **sortOrder** | **optional.String**| sortOrder | + **sortField** | **optional.String**| sortField | + **searchTerm** | **optional.String**| search Term. | + +### Return type + +[**InlineResponse20014**](inline_response_200_14.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetClientSetupDetails** +> InlineResponse20015 GetClientSetupDetails(ctx, registryRef, optional) +Returns CLI Client Setup Details + +Returns CLI Client Setup Details based on package type + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **optional** | ***RegistriesApiGetClientSetupDetailsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegistriesApiGetClientSetupDetailsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **artifact** | **optional.String**| Artifat | + **version** | **optional.String**| Version | + +### Return type + +[**InlineResponse20015**](inline_response_200_15.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetRegistry** +> InlineResponse201 GetRegistry(ctx, registryRef) +Returns Registry Details + +Returns Registry Details in the account for the given key + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + +### Return type + +[**InlineResponse201**](inline_response_201.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ModifyRegistry** +> InlineResponse201 ModifyRegistry(ctx, registryRef, optional) +Updates a Registry + +Updates a Registry in the account for the given key + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registryRef** | **string**| Unique registry path. | + **optional** | ***RegistriesApiModifyRegistryOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegistriesApiModifyRegistryOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**optional.Interface of RegistryRequest**](RegistryRequest.md)| request for create and update registry | + +### Return type + +[**InlineResponse201**](inline_response_201.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/harness/har/docs/Registry.md b/harness/har/docs/Registry.md new file mode 100644 index 00000000..8f6c4aeb --- /dev/null +++ b/harness/har/docs/Registry.md @@ -0,0 +1,19 @@ +# Registry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedPattern** | **[]string** | | [optional] [default to null] +**BlockedPattern** | **[]string** | | [optional] [default to null] +**CleanupPolicy** | [**[]CleanupPolicy**](CleanupPolicy.md) | | [optional] [default to null] +**Config** | [***RegistryConfig**](RegistryConfig.md) | | [optional] [default to null] +**CreatedAt** | **string** | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**Identifier** | **string** | | [default to null] +**Labels** | **[]string** | | [optional] [default to null] +**ModifiedAt** | **string** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [default to null] +**Url** | **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/harness/har/docs/RegistryArtifactMetadata.md b/harness/har/docs/RegistryArtifactMetadata.md new file mode 100644 index 00000000..e4a796a8 --- /dev/null +++ b/harness/har/docs/RegistryArtifactMetadata.md @@ -0,0 +1,16 @@ +# RegistryArtifactMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DownloadsCount** | **int64** | | [optional] [default to null] +**Labels** | **[]string** | | [optional] [default to null] +**LastModified** | **string** | | [optional] [default to null] +**LatestVersion** | **string** | | [default to null] +**Name** | **string** | | [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [optional] [default to null] +**RegistryIdentifier** | **string** | | [default to null] +**RegistryPath** | **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/harness/har/docs/RegistryConfig.md b/harness/har/docs/RegistryConfig.md new file mode 100644 index 00000000..facb8cfc --- /dev/null +++ b/harness/har/docs/RegistryConfig.md @@ -0,0 +1,9 @@ +# RegistryConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | [***RegistryType**](RegistryType.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/harness/har/docs/RegistryMetadata.md b/harness/har/docs/RegistryMetadata.md new file mode 100644 index 00000000..e70de50b --- /dev/null +++ b/harness/har/docs/RegistryMetadata.md @@ -0,0 +1,19 @@ +# RegistryMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArtifactsCount** | **int64** | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**DownloadsCount** | **int64** | | [optional] [default to null] +**Identifier** | **string** | | [default to null] +**Labels** | **[]string** | | [optional] [default to null] +**LastModified** | **string** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [default to null] +**Path** | **string** | | [optional] [default to null] +**RegistrySize** | **string** | | [optional] [default to null] +**Type_** | [***RegistryType**](RegistryType.md) | | [default to null] +**Url** | **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/harness/har/docs/RegistryRequest.md b/harness/har/docs/RegistryRequest.md new file mode 100644 index 00000000..a5bb7399 --- /dev/null +++ b/harness/har/docs/RegistryRequest.md @@ -0,0 +1,18 @@ +# RegistryRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedPattern** | **[]string** | | [optional] [default to null] +**BlockedPattern** | **[]string** | | [optional] [default to null] +**CleanupPolicy** | [**[]CleanupPolicy**](CleanupPolicy.md) | | [optional] [default to null] +**Config** | [***RegistryConfig**](RegistryConfig.md) | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**Identifier** | **string** | | [default to null] +**Labels** | **[]string** | | [optional] [default to null] +**PackageType** | [***PackageType**](PackageType.md) | | [default to null] +**ParentRef** | **string** | | [optional] [default to null] +**Scanners** | [**[]Scanner**](Scanner.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/harness/har/docs/RegistryType.md b/harness/har/docs/RegistryType.md new file mode 100644 index 00000000..d1962d97 --- /dev/null +++ b/harness/har/docs/RegistryType.md @@ -0,0 +1,8 @@ +# RegistryType + +## 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/harness/har/docs/SbomDetails.md b/harness/har/docs/SbomDetails.md new file mode 100644 index 00000000..0fe209fa --- /dev/null +++ b/harness/har/docs/SbomDetails.md @@ -0,0 +1,18 @@ +# SbomDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowListViolations** | **int32** | | [optional] [default to null] +**ArtifactId** | **string** | | [optional] [default to null] +**ArtifactSourceId** | **string** | | [optional] [default to null] +**AvgScore** | **string** | | [optional] [default to null] +**ComponentsCount** | **int32** | | [optional] [default to null] +**DenyListViolations** | **int32** | | [optional] [default to null] +**MaxScore** | **string** | | [optional] [default to null] +**OrchestrationId** | **string** | | [optional] [default to null] +**OrgId** | **string** | | [optional] [default to null] +**ProjectId** | **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/harness/har/docs/Scanner.md b/harness/har/docs/Scanner.md new file mode 100644 index 00000000..5a251f2f --- /dev/null +++ b/harness/har/docs/Scanner.md @@ -0,0 +1,9 @@ +# Scanner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/harness/har/docs/SlsaDetails.md b/harness/har/docs/SlsaDetails.md new file mode 100644 index 00000000..e4ffff17 --- /dev/null +++ b/harness/har/docs/SlsaDetails.md @@ -0,0 +1,10 @@ +# SlsaDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProvenanceId** | **string** | | [optional] [default to null] +**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/harness/har/docs/SpacesApi.md b/harness/har/docs/SpacesApi.md new file mode 100644 index 00000000..5ecb78a2 --- /dev/null +++ b/harness/har/docs/SpacesApi.md @@ -0,0 +1,95 @@ +# har{{classname}} + +All URIs are relative to */gateway/har/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAllHarnessArtifacts**](SpacesApi.md#GetAllHarnessArtifacts) | **Get** /spaces/{space_ref}/artifacts | List Harness Artifacts +[**GetAllRegistries**](SpacesApi.md#GetAllRegistries) | **Get** /spaces/{space_ref}/registries | List Registries + +# **GetAllHarnessArtifacts** +> InlineResponse20016 GetAllHarnessArtifacts(ctx, spaceRef, optional) +List Harness Artifacts + +Lists all the Harness Artifacts. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceRef** | **string**| Unique space path. | + **optional** | ***SpacesApiGetAllHarnessArtifactsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a SpacesApiGetAllHarnessArtifactsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **regIdentifier** | [**optional.Interface of []string**](string.md)| Registry Identifier | + **page** | **optional.Int64**| Current page number | [default to 1] + **size** | **optional.Int64**| Number of items per page | [default to 20] + **sortOrder** | **optional.String**| sortOrder | + **sortField** | **optional.String**| sortField | + **searchTerm** | **optional.String**| search Term. | + **latestVersion** | **optional.Bool**| Latest Version Filter. | + **deployedArtifact** | **optional.Bool**| Deployed Artifact Filter. | + +### Return type + +[**InlineResponse20016**](inline_response_200_16.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetAllRegistries** +> InlineResponse20017 GetAllRegistries(ctx, spaceRef, optional) +List Registries + +Lists all the Registries. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceRef** | **string**| Unique space path. | + **optional** | ***SpacesApiGetAllRegistriesOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a SpacesApiGetAllRegistriesOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **packageType** | [**optional.Interface of []string**](string.md)| Registry Package Type | + **type_** | **optional.String**| Registry Type | + **page** | **optional.Int64**| Current page number | [default to 1] + **size** | **optional.Int64**| Number of items per page | [default to 20] + **sortOrder** | **optional.String**| sortOrder | + **sortField** | **optional.String**| sortField | + **searchTerm** | **optional.String**| search Term. | + **recursive** | **optional.Bool**| Whether to list registries recursively. | [default to false] + +### Return type + +[**InlineResponse20017**](inline_response_200_17.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[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/harness/har/docs/Status.md b/harness/har/docs/Status.md new file mode 100644 index 00000000..fc3ac62e --- /dev/null +++ b/harness/har/docs/Status.md @@ -0,0 +1,8 @@ +# Status + +## 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/harness/har/docs/StoDetails.md b/harness/har/docs/StoDetails.md new file mode 100644 index 00000000..a18eeefb --- /dev/null +++ b/harness/har/docs/StoDetails.md @@ -0,0 +1,18 @@ +# StoDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Critical** | **int32** | | [optional] [default to null] +**ExecutionId** | **string** | | [optional] [default to null] +**High** | **int32** | | [optional] [default to null] +**Ignored** | **int32** | | [optional] [default to null] +**Info** | **int32** | | [optional] [default to null] +**LastScanned** | **string** | | [optional] [default to null] +**Low** | **int32** | | [optional] [default to null] +**Medium** | **int32** | | [optional] [default to null] +**PipelineId** | **string** | | [optional] [default to null] +**Total** | **int32** | | [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/harness/har/docs/StoDigestMetadata.md b/harness/har/docs/StoDigestMetadata.md new file mode 100644 index 00000000..ceb0a112 --- /dev/null +++ b/harness/har/docs/StoDigestMetadata.md @@ -0,0 +1,12 @@ +# StoDigestMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Digest** | **string** | | [optional] [default to null] +**OsArch** | **string** | | [optional] [default to null] +**StoExecutionId** | **string** | | [optional] [default to null] +**StoPipelineId** | **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/harness/har/docs/StoMetadata.md b/harness/har/docs/StoMetadata.md new file mode 100644 index 00000000..273ff461 --- /dev/null +++ b/harness/har/docs/StoMetadata.md @@ -0,0 +1,11 @@ +# StoMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DigestMetadata** | [**[]StoDigestMetadata**](STODigestMetadata.md) | | [optional] [default to null] +**ScannedCount** | **int64** | | [optional] [default to null] +**TotalCount** | **int64** | | [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/harness/har/docs/UpstreamConfig.md b/harness/har/docs/UpstreamConfig.md new file mode 100644 index 00000000..a950f4ea --- /dev/null +++ b/harness/har/docs/UpstreamConfig.md @@ -0,0 +1,12 @@ +# UpstreamConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Auth** | [***OneOfUpstreamConfigAuth**](OneOfUpstreamConfigAuth.md) | | [optional] [default to null] +**AuthType** | [***AuthType**](AuthType.md) | | [default to null] +**Source** | **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/harness/har/docs/UserPassword.md b/harness/har/docs/UserPassword.md new file mode 100644 index 00000000..962b5cf8 --- /dev/null +++ b/harness/har/docs/UserPassword.md @@ -0,0 +1,12 @@ +# UserPassword + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SecretIdentifier** | **string** | | [optional] [default to null] +**SecretSpaceId** | **int32** | | [optional] [default to null] +**SecretSpacePath** | **string** | | [optional] [default to null] +**UserName** | **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/harness/har/docs/VirtualConfig.md b/harness/har/docs/VirtualConfig.md new file mode 100644 index 00000000..21978f25 --- /dev/null +++ b/harness/har/docs/VirtualConfig.md @@ -0,0 +1,9 @@ +# VirtualConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UpstreamProxies** | **[]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/harness/har/git_push.sh b/harness/har/git_push.sh new file mode 100644 index 00000000..ae01b182 --- /dev/null +++ b/harness/har/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="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + 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/harness/har/model_artifact_deployments_detail.go b/harness/har/model_artifact_deployments_detail.go new file mode 100644 index 00000000..43dc6fd6 --- /dev/null +++ b/harness/har/model_artifact_deployments_detail.go @@ -0,0 +1,29 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Artifact deployments Detail +type ArtifactDeploymentsDetail struct { + Count int32 `json:"count,omitempty"` + EnvIdentifier string `json:"envIdentifier,omitempty"` + EnvName string `json:"envName,omitempty"` + EnvType *EnvironmentType `json:"envType,omitempty"` + InfraIdentifier string `json:"infraIdentifier,omitempty"` + InfraName string `json:"infraName,omitempty"` + LastDeployedAt string `json:"lastDeployedAt,omitempty"` + LastDeployedById string `json:"lastDeployedById,omitempty"` + LastDeployedByName string `json:"lastDeployedByName,omitempty"` + LastPipelineExecutionId string `json:"lastPipelineExecutionId,omitempty"` + LastPipelineExecutionName string `json:"lastPipelineExecutionName,omitempty"` + OrgIdentifier string `json:"orgIdentifier,omitempty"` + PipelineId string `json:"pipelineId,omitempty"` + ProjectIdentifier string `json:"projectIdentifier,omitempty"` + ServiceIdentifier string `json:"serviceIdentifier,omitempty"` + ServiceName string `json:"serviceName,omitempty"` +} diff --git a/harness/har/model_artifact_deployments_details.go b/harness/har/model_artifact_deployments_details.go new file mode 100644 index 00000000..5c76b962 --- /dev/null +++ b/harness/har/model_artifact_deployments_details.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Docker Artifact deployments Details +type ArtifactDeploymentsDetails struct { + Deployments *ArtifactDeploymentsList `json:"deployments"` + DeploymentsStats *DeploymentStats `json:"deploymentsStats,omitempty"` +} diff --git a/harness/har/model_artifact_deployments_list.go b/harness/har/model_artifact_deployments_list.go new file mode 100644 index 00000000..e955c6bc --- /dev/null +++ b/harness/har/model_artifact_deployments_list.go @@ -0,0 +1,23 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// A list of Artifact Deployments +type ArtifactDeploymentsList struct { + // A list of Artifact + Deployments []ArtifactDeploymentsDetail `json:"deployments,omitempty"` + // The total number of items + ItemCount int64 `json:"itemCount,omitempty"` + // The total number of pages + PageCount int64 `json:"pageCount,omitempty"` + // The current page + PageIndex int64 `json:"pageIndex,omitempty"` + // The number of items per page + PageSize int32 `json:"pageSize,omitempty"` +} diff --git a/harness/har/model_artifact_label_request.go b/harness/har/model_artifact_label_request.go new file mode 100644 index 00000000..25cf910b --- /dev/null +++ b/harness/har/model_artifact_label_request.go @@ -0,0 +1,13 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type ArtifactLabelRequest struct { + Labels []string `json:"labels"` +} diff --git a/harness/har/model_artifact_metadata.go b/harness/har/model_artifact_metadata.go new file mode 100644 index 00000000..b0f3d3e6 --- /dev/null +++ b/harness/har/model_artifact_metadata.go @@ -0,0 +1,28 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Artifact Metadata +type ArtifactMetadata struct { + DeploymentMetadata *DeploymentMetadata `json:"deploymentMetadata,omitempty"` + DownloadsCount int64 `json:"downloadsCount,omitempty"` + Labels []string `json:"labels,omitempty"` + LastModified string `json:"lastModified,omitempty"` + LatestVersion string `json:"latestVersion"` + Name string `json:"name"` + PackageType *PackageType `json:"packageType,omitempty"` + PullCommand string `json:"pullCommand,omitempty"` + RegistryIdentifier string `json:"registryIdentifier"` + RegistryPath string `json:"registryPath"` + ScannedDigest []StoDigestMetadata `json:"scannedDigest,omitempty"` + ScannedDigestCount int64 `json:"scannedDigestCount,omitempty"` + StoMetadata *StoMetadata `json:"stoMetadata,omitempty"` + TotalDigestCount int64 `json:"totalDigestCount,omitempty"` + Version string `json:"version"` +} diff --git a/harness/har/model_artifact_stats.go b/harness/har/model_artifact_stats.go new file mode 100644 index 00000000..f7ed6686 --- /dev/null +++ b/harness/har/model_artifact_stats.go @@ -0,0 +1,17 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Artifact Stats +type ArtifactStats struct { + DownloadCount int64 `json:"downloadCount,omitempty"` + DownloadSize int64 `json:"downloadSize,omitempty"` + TotalStorageSize int64 `json:"totalStorageSize,omitempty"` + UploadSize int64 `json:"uploadSize,omitempty"` +} diff --git a/harness/har/model_artifact_summary.go b/harness/har/model_artifact_summary.go new file mode 100644 index 00000000..f3aa6932 --- /dev/null +++ b/harness/har/model_artifact_summary.go @@ -0,0 +1,19 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Artifact Summary +type ArtifactSummary struct { + CreatedAt string `json:"createdAt,omitempty"` + DownloadsCount int64 `json:"downloadsCount,omitempty"` + ImageName string `json:"imageName"` + Labels []string `json:"labels,omitempty"` + ModifiedAt string `json:"modifiedAt,omitempty"` + PackageType *PackageType `json:"packageType"` +} diff --git a/harness/har/model_artifact_version_metadata.go b/harness/har/model_artifact_version_metadata.go new file mode 100644 index 00000000..a0a34b59 --- /dev/null +++ b/harness/har/model_artifact_version_metadata.go @@ -0,0 +1,24 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Artifact Version Metadata +type ArtifactVersionMetadata struct { + DeploymentMetadata *DeploymentMetadata `json:"deploymentMetadata,omitempty"` + DigestCount int64 `json:"digestCount,omitempty"` + DownloadsCount int64 `json:"downloadsCount,omitempty"` + IslatestVersion bool `json:"islatestVersion,omitempty"` + LastModified string `json:"lastModified,omitempty"` + Name string `json:"name"` + PackageType *PackageType `json:"packageType,omitempty"` + PullCommand string `json:"pullCommand,omitempty"` + RegistryIdentifier string `json:"registryIdentifier"` + RegistryPath string `json:"registryPath"` + Size string `json:"size,omitempty"` +} diff --git a/harness/har/model_artifact_version_summary.go b/harness/har/model_artifact_version_summary.go new file mode 100644 index 00000000..183f0f57 --- /dev/null +++ b/harness/har/model_artifact_version_summary.go @@ -0,0 +1,21 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Docker Artifact Version Summary +type ArtifactVersionSummary struct { + ImageName string `json:"imageName"` + IsLatestVersion bool `json:"isLatestVersion,omitempty"` + PackageType *PackageType `json:"packageType"` + SscaArtifactId string `json:"sscaArtifactId,omitempty"` + SscaArtifactSourceId string `json:"sscaArtifactSourceId,omitempty"` + StoExecutionId string `json:"stoExecutionId,omitempty"` + StoPipelineId string `json:"stoPipelineId,omitempty"` + Version string `json:"version"` +} diff --git a/harness/har/model_auth_type.go b/harness/har/model_auth_type.go new file mode 100644 index 00000000..5eed87e5 --- /dev/null +++ b/harness/har/model_auth_type.go @@ -0,0 +1,18 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// AuthType : Authentication type +type AuthType string + +// List of AuthType +const ( + USER_PASSWORD_AuthType AuthType = "UserPassword" + ANONYMOUS_AuthType AuthType = "Anonymous" +) diff --git a/harness/har/model_build_details.go b/harness/har/model_build_details.go new file mode 100644 index 00000000..f57d30d2 --- /dev/null +++ b/harness/har/model_build_details.go @@ -0,0 +1,19 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type BuildDetails struct { + OrgIdentifier string `json:"orgIdentifier,omitempty"` + PipelineDisplayName string `json:"pipelineDisplayName,omitempty"` + PipelineExecutionId string `json:"pipelineExecutionId,omitempty"` + PipelineIdentifier string `json:"pipelineIdentifier,omitempty"` + ProjectIdentifier string `json:"projectIdentifier,omitempty"` + StageExecutionId string `json:"stageExecutionId,omitempty"` + StepExecutionId string `json:"stepExecutionId,omitempty"` +} diff --git a/harness/har/model_cleanup_policy.go b/harness/har/model_cleanup_policy.go new file mode 100644 index 00000000..dac011bc --- /dev/null +++ b/harness/har/model_cleanup_policy.go @@ -0,0 +1,17 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Cleanup Policy for Harness Artifact Registries +type CleanupPolicy struct { + ExpireDays int32 `json:"expireDays,omitempty"` + Name string `json:"name,omitempty"` + PackagePrefix []string `json:"packagePrefix,omitempty"` + VersionPrefix []string `json:"versionPrefix,omitempty"` +} diff --git a/harness/har/model_client_setup_details.go b/harness/har/model_client_setup_details.go new file mode 100644 index 00000000..f9e2aca4 --- /dev/null +++ b/harness/har/model_client_setup_details.go @@ -0,0 +1,16 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Client Setup Details +type ClientSetupDetails struct { + MainHeader string `json:"mainHeader"` + SecHeader string `json:"secHeader"` + Sections []ClientSetupSection `json:"sections"` +} diff --git a/harness/har/model_client_setup_section.go b/harness/har/model_client_setup_section.go new file mode 100644 index 00000000..4617776e --- /dev/null +++ b/harness/har/model_client_setup_section.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Client Setup Section +type ClientSetupSection struct { + Header string `json:"header,omitempty"` + Steps []ClientSetupStep `json:"steps,omitempty"` +} diff --git a/harness/har/model_client_setup_step.go b/harness/har/model_client_setup_step.go new file mode 100644 index 00000000..10accfe8 --- /dev/null +++ b/harness/har/model_client_setup_step.go @@ -0,0 +1,16 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Client Setup Step +type ClientSetupStep struct { + Commands []ClientSetupStepCommand `json:"commands,omitempty"` + Header string `json:"header,omitempty"` + Type_ *ClientSetupStepType `json:"type,omitempty"` +} diff --git a/harness/har/model_client_setup_step_command.go b/harness/har/model_client_setup_step_command.go new file mode 100644 index 00000000..7cf4cb28 --- /dev/null +++ b/harness/har/model_client_setup_step_command.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Client Setup Step Command +type ClientSetupStepCommand struct { + Label string `json:"label,omitempty"` + Value string `json:"value,omitempty"` +} diff --git a/harness/har/model_client_setup_step_type.go b/harness/har/model_client_setup_step_type.go new file mode 100644 index 00000000..a26b4116 --- /dev/null +++ b/harness/har/model_client_setup_step_type.go @@ -0,0 +1,18 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// ClientSetupStepType : ClientSetupStepType type +type ClientSetupStepType string + +// List of ClientSetupStepType +const ( + STATIC_ClientSetupStepType ClientSetupStepType = "Static" + GENERATE_TOKEN_ClientSetupStepType ClientSetupStepType = "GenerateToken" +) diff --git a/harness/har/model_deployment_details.go b/harness/har/model_deployment_details.go new file mode 100644 index 00000000..84209bbd --- /dev/null +++ b/harness/har/model_deployment_details.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type DeploymentDetails struct { + NonProdDeployment int32 `json:"nonProdDeployment"` + ProdDeployment int32 `json:"prodDeployment"` + TotalDeployment int32 `json:"totalDeployment"` +} diff --git a/harness/har/model_deployment_metadata.go b/harness/har/model_deployment_metadata.go new file mode 100644 index 00000000..f19b2569 --- /dev/null +++ b/harness/har/model_deployment_metadata.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type DeploymentMetadata struct { + NonProdEnvCount int32 `json:"nonProdEnvCount"` + ProdEnvCount int32 `json:"prodEnvCount"` +} diff --git a/harness/har/model_deployment_stats.go b/harness/har/model_deployment_stats.go new file mode 100644 index 00000000..92036172 --- /dev/null +++ b/harness/har/model_deployment_stats.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// DeploymentStats +type DeploymentStats struct { + PreProduction int32 `json:"PreProduction"` + Production int32 `json:"Production"` +} diff --git a/harness/har/model_docker_artifact_detail.go b/harness/har/model_docker_artifact_detail.go new file mode 100644 index 00000000..90ba829f --- /dev/null +++ b/harness/har/model_docker_artifact_detail.go @@ -0,0 +1,24 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Docker Artifact Detail +type DockerArtifactDetail struct { + CreatedAt string `json:"createdAt,omitempty"` + DownloadsCount int64 `json:"downloadsCount,omitempty"` + ImageName string `json:"imageName"` + IsLatestVersion bool `json:"isLatestVersion,omitempty"` + ModifiedAt string `json:"modifiedAt,omitempty"` + PackageType *PackageType `json:"packageType"` + PullCommand string `json:"pullCommand,omitempty"` + RegistryPath string `json:"registryPath"` + Size string `json:"size,omitempty"` + Url string `json:"url"` + Version string `json:"version"` +} diff --git a/harness/har/model_docker_artifact_integration_detail.go b/harness/har/model_docker_artifact_integration_detail.go new file mode 100644 index 00000000..a25d70a8 --- /dev/null +++ b/harness/har/model_docker_artifact_integration_detail.go @@ -0,0 +1,18 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Docker Artifact Detail +type DockerArtifactIntegrationDetail struct { + BuildDetails *BuildDetails `json:"buildDetails,omitempty"` + DeploymentsDetails *DeploymentDetails `json:"deploymentsDetails,omitempty"` + SbomDetails *SbomDetails `json:"sbomDetails,omitempty"` + SlsaDetails *SlsaDetails `json:"slsaDetails,omitempty"` + StoDetails *StoDetails `json:"stoDetails,omitempty"` +} diff --git a/harness/har/model_docker_artifact_manifest.go b/harness/har/model_docker_artifact_manifest.go new file mode 100644 index 00000000..13f7b573 --- /dev/null +++ b/harness/har/model_docker_artifact_manifest.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Docker Artifact Manifest +type DockerArtifactManifest struct { + Manifest string `json:"manifest"` +} diff --git a/harness/har/model_docker_layer_entry.go b/harness/har/model_docker_layer_entry.go new file mode 100644 index 00000000..f7259520 --- /dev/null +++ b/harness/har/model_docker_layer_entry.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Artifact Layers +type DockerLayerEntry struct { + Command string `json:"command"` + Size string `json:"size,omitempty"` +} diff --git a/harness/har/model_docker_layers_summary.go b/harness/har/model_docker_layers_summary.go new file mode 100644 index 00000000..cbb37f35 --- /dev/null +++ b/harness/har/model_docker_layers_summary.go @@ -0,0 +1,16 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Layers Summary +type DockerLayersSummary struct { + Digest string `json:"digest"` + Layers []DockerLayerEntry `json:"layers,omitempty"` + OsArch string `json:"osArch,omitempty"` +} diff --git a/harness/har/model_docker_manifest_details.go b/harness/har/model_docker_manifest_details.go new file mode 100644 index 00000000..054507e4 --- /dev/null +++ b/harness/har/model_docker_manifest_details.go @@ -0,0 +1,19 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Artifact Layers +type DockerManifestDetails struct { + CreatedAt string `json:"createdAt,omitempty"` + Digest string `json:"digest"` + OsArch string `json:"osArch"` + Size string `json:"size,omitempty"` + StoExecutionId string `json:"stoExecutionId,omitempty"` + StoPipelineId string `json:"stoPipelineId,omitempty"` +} diff --git a/harness/har/model_docker_manifests.go b/harness/har/model_docker_manifests.go new file mode 100644 index 00000000..f59fd0a2 --- /dev/null +++ b/harness/har/model_docker_manifests.go @@ -0,0 +1,17 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Manifests +type DockerManifests struct { + ImageName string `json:"imageName"` + IsLatestVersion bool `json:"isLatestVersion,omitempty"` + Manifests []DockerManifestDetails `json:"manifests,omitempty"` + Version string `json:"version"` +} diff --git a/harness/har/model_environment_type.go b/harness/har/model_environment_type.go new file mode 100644 index 00000000..2d7ace4d --- /dev/null +++ b/harness/har/model_environment_type.go @@ -0,0 +1,18 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// EnvironmentType : Environment Type +type EnvironmentType string + +// List of EnvironmentType +const ( + PRE_PRODUCTION_EnvironmentType EnvironmentType = "PreProduction" + PRODUCTION_EnvironmentType EnvironmentType = "Production" +) diff --git a/harness/har/model_error.go b/harness/har/model_error.go new file mode 100644 index 00000000..f6bbd753 --- /dev/null +++ b/harness/har/model_error.go @@ -0,0 +1,18 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type ModelError struct { + // The http error code + Code string `json:"code"` + // Additional details about the error + Details *interface{} `json:"details,omitempty"` + // The reason the request failed + Message string `json:"message"` +} diff --git a/harness/har/model_helm_artifact_detail.go b/harness/har/model_helm_artifact_detail.go new file mode 100644 index 00000000..e704a9d0 --- /dev/null +++ b/harness/har/model_helm_artifact_detail.go @@ -0,0 +1,24 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Helm Artifact Detail +type HelmArtifactDetail struct { + Artifact string `json:"artifact,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + DownloadsCount int64 `json:"downloadsCount,omitempty"` + IsLatestVersion bool `json:"isLatestVersion,omitempty"` + ModifiedAt string `json:"modifiedAt,omitempty"` + PackageType *PackageType `json:"packageType"` + PullCommand string `json:"pullCommand,omitempty"` + RegistryPath string `json:"registryPath"` + Size string `json:"size,omitempty"` + Url string `json:"url"` + Version string `json:"version"` +} diff --git a/harness/har/model_helm_artifact_manifest.go b/harness/har/model_helm_artifact_manifest.go new file mode 100644 index 00000000..862b2abe --- /dev/null +++ b/harness/har/model_helm_artifact_manifest.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Helm Artifact Manifest +type HelmArtifactManifest struct { + Manifest string `json:"manifest"` +} diff --git a/harness/har/model_inline_response_200.go b/harness/har/model_inline_response_200.go new file mode 100644 index 00000000..c011f66c --- /dev/null +++ b/harness/har/model_inline_response_200.go @@ -0,0 +1,13 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse200 struct { + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_1.go b/harness/har/model_inline_response_200_1.go new file mode 100644 index 00000000..59cccbdd --- /dev/null +++ b/harness/har/model_inline_response_200_1.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2001 struct { + Data *ArtifactSummary `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_10.go b/harness/har/model_inline_response_200_10.go new file mode 100644 index 00000000..48f96d9c --- /dev/null +++ b/harness/har/model_inline_response_200_10.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20010 struct { + Data *HelmArtifactManifest `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_11.go b/harness/har/model_inline_response_200_11.go new file mode 100644 index 00000000..4b5930ee --- /dev/null +++ b/harness/har/model_inline_response_200_11.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20011 struct { + Data *ArtifactVersionSummary `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_12.go b/harness/har/model_inline_response_200_12.go new file mode 100644 index 00000000..cdbe4655 --- /dev/null +++ b/harness/har/model_inline_response_200_12.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20012 struct { + Data *ListArtifactVersion `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_13.go b/harness/har/model_inline_response_200_13.go new file mode 100644 index 00000000..658391e8 --- /dev/null +++ b/harness/har/model_inline_response_200_13.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20013 struct { + Data *ListArtifactLabel `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_14.go b/harness/har/model_inline_response_200_14.go new file mode 100644 index 00000000..6e53c5d9 --- /dev/null +++ b/harness/har/model_inline_response_200_14.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20014 struct { + Data *ListRegistryArtifact `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_15.go b/harness/har/model_inline_response_200_15.go new file mode 100644 index 00000000..adc13650 --- /dev/null +++ b/harness/har/model_inline_response_200_15.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20015 struct { + Data *ClientSetupDetails `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_16.go b/harness/har/model_inline_response_200_16.go new file mode 100644 index 00000000..345425e9 --- /dev/null +++ b/harness/har/model_inline_response_200_16.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20016 struct { + Data *ListArtifact `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_17.go b/harness/har/model_inline_response_200_17.go new file mode 100644 index 00000000..6b705372 --- /dev/null +++ b/harness/har/model_inline_response_200_17.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse20017 struct { + Data *ListRegistry `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_2.go b/harness/har/model_inline_response_200_2.go new file mode 100644 index 00000000..b1687218 --- /dev/null +++ b/harness/har/model_inline_response_200_2.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2002 struct { + Data *ArtifactStats `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_3.go b/harness/har/model_inline_response_200_3.go new file mode 100644 index 00000000..d10d54c1 --- /dev/null +++ b/harness/har/model_inline_response_200_3.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2003 struct { + Data *ArtifactDeploymentsDetails `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_4.go b/harness/har/model_inline_response_200_4.go new file mode 100644 index 00000000..e4e70e75 --- /dev/null +++ b/harness/har/model_inline_response_200_4.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2004 struct { + Data *DockerArtifactDetail `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_5.go b/harness/har/model_inline_response_200_5.go new file mode 100644 index 00000000..67354a68 --- /dev/null +++ b/harness/har/model_inline_response_200_5.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2005 struct { + Data *DockerArtifactIntegrationDetail `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_6.go b/harness/har/model_inline_response_200_6.go new file mode 100644 index 00000000..b5e62e46 --- /dev/null +++ b/harness/har/model_inline_response_200_6.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2006 struct { + Data *DockerLayersSummary `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_7.go b/harness/har/model_inline_response_200_7.go new file mode 100644 index 00000000..3f5794be --- /dev/null +++ b/harness/har/model_inline_response_200_7.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2007 struct { + Data *DockerArtifactManifest `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_8.go b/harness/har/model_inline_response_200_8.go new file mode 100644 index 00000000..66a1c658 --- /dev/null +++ b/harness/har/model_inline_response_200_8.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2008 struct { + Data *DockerManifests `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_200_9.go b/harness/har/model_inline_response_200_9.go new file mode 100644 index 00000000..7bece996 --- /dev/null +++ b/harness/har/model_inline_response_200_9.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse2009 struct { + Data *HelmArtifactDetail `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_inline_response_201.go b/harness/har/model_inline_response_201.go new file mode 100644 index 00000000..9352dc69 --- /dev/null +++ b/harness/har/model_inline_response_201.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type InlineResponse201 struct { + Data *Registry `json:"data"` + Status *Status `json:"status"` +} diff --git a/harness/har/model_list_artifact.go b/harness/har/model_list_artifact.go new file mode 100644 index 00000000..b4c77e6c --- /dev/null +++ b/harness/har/model_list_artifact.go @@ -0,0 +1,23 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// A list of Artifacts +type ListArtifact struct { + // A list of Artifact + Artifacts []ArtifactMetadata `json:"artifacts"` + // The total number of items + ItemCount int64 `json:"itemCount,omitempty"` + // The total number of pages + PageCount int64 `json:"pageCount,omitempty"` + // The current page + PageIndex int64 `json:"pageIndex,omitempty"` + // The number of items per page + PageSize int32 `json:"pageSize,omitempty"` +} diff --git a/harness/har/model_list_artifact_label.go b/harness/har/model_list_artifact_label.go new file mode 100644 index 00000000..d502a962 --- /dev/null +++ b/harness/har/model_list_artifact_label.go @@ -0,0 +1,22 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// A list of Harness Artifact Labels +type ListArtifactLabel struct { + // The total number of items + ItemCount int64 `json:"itemCount,omitempty"` + Labels []string `json:"labels"` + // The total number of pages + PageCount int64 `json:"pageCount,omitempty"` + // The current page + PageIndex int64 `json:"pageIndex,omitempty"` + // The number of items per page + PageSize int32 `json:"pageSize,omitempty"` +} diff --git a/harness/har/model_list_artifact_version.go b/harness/har/model_list_artifact_version.go new file mode 100644 index 00000000..6638fc84 --- /dev/null +++ b/harness/har/model_list_artifact_version.go @@ -0,0 +1,23 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// A list of Artifact versions +type ListArtifactVersion struct { + // A list of Artifact versions + ArtifactVersions []ArtifactVersionMetadata `json:"artifactVersions,omitempty"` + // The total number of items + ItemCount int64 `json:"itemCount,omitempty"` + // The total number of pages + PageCount int64 `json:"pageCount,omitempty"` + // The current page + PageIndex int64 `json:"pageIndex,omitempty"` + // The number of items per page + PageSize int32 `json:"pageSize,omitempty"` +} diff --git a/harness/har/model_list_registry.go b/harness/har/model_list_registry.go new file mode 100644 index 00000000..68467749 --- /dev/null +++ b/harness/har/model_list_registry.go @@ -0,0 +1,23 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// A list of Harness Artifact Registries +type ListRegistry struct { + // The total number of items + ItemCount int64 `json:"itemCount,omitempty"` + // The total number of pages + PageCount int64 `json:"pageCount,omitempty"` + // The current page + PageIndex int64 `json:"pageIndex,omitempty"` + // The number of items per page + PageSize int32 `json:"pageSize,omitempty"` + // A list of Harness Artifact Registries + Registries []RegistryMetadata `json:"registries"` +} diff --git a/harness/har/model_list_registry_artifact.go b/harness/har/model_list_registry_artifact.go new file mode 100644 index 00000000..0c50ad4e --- /dev/null +++ b/harness/har/model_list_registry_artifact.go @@ -0,0 +1,23 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// A list of Artifacts +type ListRegistryArtifact struct { + // A list of Artifact + Artifacts []RegistryArtifactMetadata `json:"artifacts"` + // The total number of items + ItemCount int64 `json:"itemCount,omitempty"` + // The total number of pages + PageCount int64 `json:"pageCount,omitempty"` + // The current page + PageIndex int64 `json:"pageIndex,omitempty"` + // The number of items per page + PageSize int32 `json:"pageSize,omitempty"` +} diff --git a/harness/har/model_login_anonymous.go b/harness/har/model_login_anonymous.go new file mode 100644 index 00000000..d1bd7874 --- /dev/null +++ b/harness/har/model_login_anonymous.go @@ -0,0 +1,12 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type Anonymous struct { +} diff --git a/harness/har/model_one_of_registry_config.go b/harness/har/model_one_of_registry_config.go new file mode 100644 index 00000000..49d89f95 --- /dev/null +++ b/harness/har/model_one_of_registry_config.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type OneOfRegistryConfig struct { + VirtualConfig + UpstreamConfig +} diff --git a/harness/har/model_one_of_upstream_config_auth.go b/harness/har/model_one_of_upstream_config_auth.go new file mode 100644 index 00000000..c899a6bb --- /dev/null +++ b/harness/har/model_one_of_upstream_config_auth.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type OneOfUpstreamConfigAuth struct { + UserPassword + Anonymous +} diff --git a/harness/har/model_package_type.go b/harness/har/model_package_type.go new file mode 100644 index 00000000..dfac7838 --- /dev/null +++ b/harness/har/model_package_type.go @@ -0,0 +1,20 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// PackageType : refers to package +type PackageType string + +// List of PackageType +const ( + DOCKER_PackageType PackageType = "DOCKER" + MAVEN_PackageType PackageType = "MAVEN" + GENERIC_PackageType PackageType = "GENERIC" + HELM_PackageType PackageType = "HELM" +) diff --git a/harness/har/model_registry.go b/harness/har/model_registry.go new file mode 100644 index 00000000..14b1ea92 --- /dev/null +++ b/harness/har/model_registry.go @@ -0,0 +1,24 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Artifact Registry +type Registry struct { + AllowedPattern []string `json:"allowedPattern,omitempty"` + BlockedPattern []string `json:"blockedPattern,omitempty"` + CleanupPolicy []CleanupPolicy `json:"cleanupPolicy,omitempty"` + Config *RegistryConfig `json:"config,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + Description string `json:"description,omitempty"` + Identifier string `json:"identifier"` + Labels []string `json:"labels,omitempty"` + ModifiedAt string `json:"modifiedAt,omitempty"` + PackageType *PackageType `json:"packageType"` + Url string `json:"url"` +} diff --git a/harness/har/model_registry_artifact_metadata.go b/harness/har/model_registry_artifact_metadata.go new file mode 100644 index 00000000..87c6d61e --- /dev/null +++ b/harness/har/model_registry_artifact_metadata.go @@ -0,0 +1,21 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Artifact Metadata +type RegistryArtifactMetadata struct { + DownloadsCount int64 `json:"downloadsCount,omitempty"` + Labels []string `json:"labels,omitempty"` + LastModified string `json:"lastModified,omitempty"` + LatestVersion string `json:"latestVersion"` + Name string `json:"name"` + PackageType *PackageType `json:"packageType,omitempty"` + RegistryIdentifier string `json:"registryIdentifier"` + RegistryPath string `json:"registryPath"` +} diff --git a/harness/har/model_registry_config.go b/harness/har/model_registry_config.go new file mode 100644 index 00000000..7b54f116 --- /dev/null +++ b/harness/har/model_registry_config.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// SubConfig specific for Virtual or Upstream Registry +type RegistryConfig struct { + Type_ *RegistryType `json:"type"` +} diff --git a/harness/har/model_registry_metadata.go b/harness/har/model_registry_metadata.go new file mode 100644 index 00000000..c3364ffa --- /dev/null +++ b/harness/har/model_registry_metadata.go @@ -0,0 +1,24 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Harness Artifact Registry Metadata +type RegistryMetadata struct { + ArtifactsCount int64 `json:"artifactsCount,omitempty"` + Description string `json:"description,omitempty"` + DownloadsCount int64 `json:"downloadsCount,omitempty"` + Identifier string `json:"identifier"` + Labels []string `json:"labels,omitempty"` + LastModified string `json:"lastModified,omitempty"` + PackageType *PackageType `json:"packageType"` + Path string `json:"path,omitempty"` + RegistrySize string `json:"registrySize,omitempty"` + Type_ *RegistryType `json:"type"` + Url string `json:"url"` +} diff --git a/harness/har/model_registry_request.go b/harness/har/model_registry_request.go new file mode 100644 index 00000000..aab9278a --- /dev/null +++ b/harness/har/model_registry_request.go @@ -0,0 +1,22 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type RegistryRequest struct { + AllowedPattern []string `json:"allowedPattern,omitempty"` + BlockedPattern []string `json:"blockedPattern,omitempty"` + CleanupPolicy []CleanupPolicy `json:"cleanupPolicy,omitempty"` + Config *RegistryConfig `json:"config,omitempty"` + Description string `json:"description,omitempty"` + Identifier string `json:"identifier"` + Labels []string `json:"labels,omitempty"` + PackageType *PackageType `json:"packageType"` + ParentRef string `json:"parentRef,omitempty"` + Scanners []Scanner `json:"scanners,omitempty"` +} diff --git a/harness/har/model_registry_type.go b/harness/har/model_registry_type.go new file mode 100644 index 00000000..09b7a5a1 --- /dev/null +++ b/harness/har/model_registry_type.go @@ -0,0 +1,18 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// RegistryType : refers to type of registry i.e virtual or upstream +type RegistryType string + +// List of RegistryType +const ( + VIRTUAL_RegistryType RegistryType = "VIRTUAL" + UPSTREAM_RegistryType RegistryType = "UPSTREAM" +) diff --git a/harness/har/model_sbom_details.go b/harness/har/model_sbom_details.go new file mode 100644 index 00000000..965c616d --- /dev/null +++ b/harness/har/model_sbom_details.go @@ -0,0 +1,22 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type SbomDetails struct { + AllowListViolations int32 `json:"allowListViolations,omitempty"` + ArtifactId string `json:"artifactId,omitempty"` + ArtifactSourceId string `json:"artifactSourceId,omitempty"` + AvgScore string `json:"avgScore,omitempty"` + ComponentsCount int32 `json:"componentsCount,omitempty"` + DenyListViolations int32 `json:"denyListViolations,omitempty"` + MaxScore string `json:"maxScore,omitempty"` + OrchestrationId string `json:"orchestrationId,omitempty"` + OrgId string `json:"orgId,omitempty"` + ProjectId string `json:"projectId,omitempty"` +} diff --git a/harness/har/model_scanner.go b/harness/har/model_scanner.go new file mode 100644 index 00000000..dc51512f --- /dev/null +++ b/harness/har/model_scanner.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Scanner for Harness Artifact Registries +type Scanner struct { + Name string `json:"name,omitempty"` +} diff --git a/harness/har/model_slsa_details.go b/harness/har/model_slsa_details.go new file mode 100644 index 00000000..c363b990 --- /dev/null +++ b/harness/har/model_slsa_details.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type SlsaDetails struct { + ProvenanceId string `json:"provenanceId,omitempty"` + Status string `json:"status,omitempty"` +} diff --git a/harness/har/model_status.go b/harness/har/model_status.go new file mode 100644 index 00000000..a2c137ab --- /dev/null +++ b/harness/har/model_status.go @@ -0,0 +1,19 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Status : Indicates if the request was successful or not +type Status string + +// List of Status +const ( + SUCCESS_Status Status = "SUCCESS" + FAILURE_Status Status = "FAILURE" + ERROR__Status Status = "ERROR" +) diff --git a/harness/har/model_sto_details.go b/harness/har/model_sto_details.go new file mode 100644 index 00000000..5a21f921 --- /dev/null +++ b/harness/har/model_sto_details.go @@ -0,0 +1,22 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type StoDetails struct { + Critical int32 `json:"critical,omitempty"` + ExecutionId string `json:"executionId,omitempty"` + High int32 `json:"high,omitempty"` + Ignored int32 `json:"ignored,omitempty"` + Info int32 `json:"info,omitempty"` + LastScanned string `json:"lastScanned,omitempty"` + Low int32 `json:"low,omitempty"` + Medium int32 `json:"medium,omitempty"` + PipelineId string `json:"pipelineId,omitempty"` + Total int32 `json:"total,omitempty"` +} diff --git a/harness/har/model_sto_digest_metadata.go b/harness/har/model_sto_digest_metadata.go new file mode 100644 index 00000000..3e1e5b04 --- /dev/null +++ b/harness/har/model_sto_digest_metadata.go @@ -0,0 +1,16 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type StoDigestMetadata struct { + Digest string `json:"digest,omitempty"` + OsArch string `json:"osArch,omitempty"` + StoExecutionId string `json:"stoExecutionId,omitempty"` + StoPipelineId string `json:"stoPipelineId,omitempty"` +} diff --git a/harness/har/model_sto_metadata.go b/harness/har/model_sto_metadata.go new file mode 100644 index 00000000..0e9cef7c --- /dev/null +++ b/harness/har/model_sto_metadata.go @@ -0,0 +1,15 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type StoMetadata struct { + DigestMetadata []StoDigestMetadata `json:"digestMetadata,omitempty"` + ScannedCount int64 `json:"scannedCount,omitempty"` + TotalCount int64 `json:"totalCount,omitempty"` +} diff --git a/harness/har/model_upstream_config.go b/harness/har/model_upstream_config.go new file mode 100644 index 00000000..0975d868 --- /dev/null +++ b/harness/har/model_upstream_config.go @@ -0,0 +1,17 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Configuration for Harness Artifact UpstreamProxies +type UpstreamConfig struct { + Auth *OneOfUpstreamConfigAuth `json:"auth,omitempty"` + AuthType *AuthType `json:"authType"` + Source string `json:"source,omitempty"` + Url string `json:"url,omitempty"` +} diff --git a/harness/har/model_user_password.go b/harness/har/model_user_password.go new file mode 100644 index 00000000..dd18d969 --- /dev/null +++ b/harness/har/model_user_password.go @@ -0,0 +1,16 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +type UserPassword struct { + SecretIdentifier string `json:"secretIdentifier,omitempty"` + SecretSpaceId int32 `json:"secretSpaceId,omitempty"` + SecretSpacePath string `json:"secretSpacePath,omitempty"` + UserName string `json:"userName"` +} diff --git a/harness/har/model_virtual_config.go b/harness/har/model_virtual_config.go new file mode 100644 index 00000000..7d0b1a6f --- /dev/null +++ b/harness/har/model_virtual_config.go @@ -0,0 +1,14 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +// Configuration for Harness Virtual Artifact Registries +type VirtualConfig struct { + UpstreamProxies []string `json:"upstreamProxies,omitempty"` +} diff --git a/harness/har/response.go b/harness/har/response.go new file mode 100644 index 00000000..74bb8e16 --- /dev/null +++ b/harness/har/response.go @@ -0,0 +1,42 @@ +/* + * Harness Artifact Registry API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package har + +import ( + "net/http" +) + +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the swagger operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +}