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

@Generated("com.microsoft.kiota") public class VersionsRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Manage all the versions of an artifact in the registry.
  • 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

    • byVersionExpression

      @Nonnull public WithVersionExpressionItemRequestBuilder byVersionExpression(@Nonnull String versionExpression)
      Manage a single version of a single artifact in the registry.
      Parameters:
      versionExpression - An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form "branch={branchId}", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the "[a-zA-Z0-9._//-+]{1,256}" pattern.
      Returns:
      a WithVersionExpressionItemRequestBuilder
    • get

      @Nullable public VersionSearchResults get()
      Returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` 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)
      Returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` 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

      @Nullable public VersionMetaData post(@Nonnull CreateVersion body)
      Creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was provided (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `400`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      Returns:
      a VersionMetaData
      Throws:
      RuleViolationProblemDetails - When receiving a 400 status code
      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 422 status code
      ProblemDetails - When receiving a 500 status code
    • post

      @Nullable public VersionMetaData post(@Nonnull CreateVersion body, @Nullable Consumer<VersionsRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was provided (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `400`)* 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 VersionMetaData
      Throws:
      RuleViolationProblemDetails - When receiving a 400 status code
      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 422 status code
      ProblemDetails - When receiving a 500 status code
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      Returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` 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)
      Returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` 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 CreateVersion body)
      Creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was provided (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `400`)* A server error occurred (HTTP error `500`)
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull CreateVersion body, @Nullable Consumer<VersionsRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was provided (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `400`)* 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