java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
io.apicurio.registry.rest.client.groups.item.artifacts.item.branches.item.versions.VersionsRequestBuilder

@Generated("com.microsoft.kiota") public class VersionsRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Manage the versions in a branch.
  • Constructor Details

    • VersionsRequestBuilder

      public VersionsRequestBuilder(@Nonnull HashMap<String,Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new VersionsRequestBuilder and sets the default values.
      Parameters:
      pathParameters - Path parameters for the request
      requestAdapter - The request adapter to use to execute the requests.
    • VersionsRequestBuilder

      public VersionsRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new VersionsRequestBuilder and sets the default values.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      requestAdapter - The request adapter to use to execute the requests.
  • Method Details

    • get

      @Nullable public VersionSearchResults get()
      Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Returns:
      a VersionSearchResults
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 500 status code
    • get

      @Nullable public VersionSearchResults get(@Nullable Consumer<VersionsRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a VersionSearchResults
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 500 status code
    • post

      public void post(@Nonnull AddVersionToBranch body)
      Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 409 status code
      ProblemDetails - When receiving a 500 status code
    • post

      public void post(@Nonnull AddVersionToBranch body, @Nullable Consumer<VersionsRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 409 status code
      ProblemDetails - When receiving a 500 status code
    • put

      public void put(@Nonnull ReplaceBranchVersions body)
      Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 500 status code
    • put

      public void put(@Nonnull ReplaceBranchVersions body, @Nullable Consumer<VersionsRequestBuilder.PutRequestConfiguration> requestConfiguration)
      Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 500 status code
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<VersionsRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull AddVersionToBranch body)
      Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull AddVersionToBranch body, @Nullable Consumer<VersionsRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPutRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull ReplaceBranchVersions body)
      Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPutRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull ReplaceBranchVersions body, @Nullable Consumer<VersionsRequestBuilder.PutRequestConfiguration> requestConfiguration)
      Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public VersionsRequestBuilder withUrl(@Nonnull String rawUrl)
      Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      Returns:
      a VersionsRequestBuilder