Class WithArtifactItemRequestBuilder

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

@Generated("com.microsoft.kiota") public class WithArtifactItemRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Manage a single artifact.
  • Constructor Details

    • WithArtifactItemRequestBuilder

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

      public WithArtifactItemRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new WithArtifactItemRequestBuilder 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

    • meta

      @Nonnull public MetaRequestBuilder meta()
      Manage the metadata of a single artifact.
      Returns:
      a MetaRequestBuilder
    • owner

      @Nonnull public OwnerRequestBuilder owner()
      Manage the ownership of a single artifact.
      Returns:
      a OwnerRequestBuilder
    • rules

      @Nonnull public RulesRequestBuilder rules()
      Manage the rules for a single artifact.
      Returns:
      a RulesRequestBuilder
    • state

      @Nonnull public StateRequestBuilder state()
      Manage the state of an artifact.
      Returns:
      a StateRequestBuilder
    • test

      @Nonnull public TestRequestBuilder test()
      Test whether content would pass update rules.
      Returns:
      a TestRequestBuilder
    • versions

      @Nonnull public VersionsRequestBuilder versions()
      Manage all the versions of an artifact in the registry.
      Returns:
      a VersionsRequestBuilder
    • delete

      public void delete()
      Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 500 status code
    • delete

      public void delete(@Nullable Consumer<WithArtifactItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `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.
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 500 status code
    • get

      @Nullable public InputStream get()
      Returns the latest version of the artifact in its raw form. The `Content-Type` of theresponse depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used.This operation may fail for one of the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Returns:
      a InputStream
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 500 status code
    • get

      @Nullable public InputStream get(@Nullable Consumer<WithArtifactItemRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Returns the latest version of the artifact in its raw form. The `Content-Type` of theresponse depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used.This operation may fail for one of the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (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 InputStream
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 500 status code
    • put

      @Nullable public ArtifactMetaData put(@Nonnull ArtifactContent body)
      Updates an artifact by uploading new content. The body of the request canbe the raw content of the artifact or a JSON object containing both the raw content anda set of references to other artifacts.. This is typically in JSON format for *most*of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The type of the content should be compatible with the artifact's type (it would bean error to update an `AVRO` artifact with new `OPENAPI` content, for example).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`)When successful, this creates a new version of the artifact, making it the most recent(and therefore official) version of the artifact.
      Parameters:
      body - The request body
      Returns:
      a ArtifactMetaData
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 409 status code
      Error - When receiving a 500 status code
    • put

      @Nullable public ArtifactMetaData put(@Nonnull ArtifactContent body, @Nullable Consumer<WithArtifactItemRequestBuilder.PutRequestConfiguration> requestConfiguration)
      Updates an artifact by uploading new content. The body of the request canbe the raw content of the artifact or a JSON object containing both the raw content anda set of references to other artifacts.. This is typically in JSON format for *most*of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The type of the content should be compatible with the artifact's type (it would bean error to update an `AVRO` artifact with new `OPENAPI` content, for example).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`)When successful, this creates a new version of the artifact, making it the most recent(and therefore official) version of the artifact.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a ArtifactMetaData
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 409 status code
      Error - When receiving a 500 status code
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()
      Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Returns:
      a RequestInformation
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<WithArtifactItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `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
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      Returns the latest version of the artifact in its raw form. The `Content-Type` of theresponse depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used.This operation may fail for one of the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`)
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<WithArtifactItemRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Returns the latest version of the artifact in its raw form. The `Content-Type` of theresponse depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used.This operation may fail for one of the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (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
    • toPutRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull ArtifactContent body)
      Updates an artifact by uploading new content. The body of the request canbe the raw content of the artifact or a JSON object containing both the raw content anda set of references to other artifacts.. This is typically in JSON format for *most*of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The type of the content should be compatible with the artifact's type (it would bean error to update an `AVRO` artifact with new `OPENAPI` content, for example).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`)When successful, this creates a new version of the artifact, making it the most recent(and therefore official) version of the artifact.
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPutRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull ArtifactContent body, @Nullable Consumer<WithArtifactItemRequestBuilder.PutRequestConfiguration> requestConfiguration)
      Updates an artifact by uploading new content. The body of the request canbe the raw content of the artifact or a JSON object containing both the raw content anda set of references to other artifacts.. This is typically in JSON format for *most*of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The type of the content should be compatible with the artifact's type (it would bean error to update an `AVRO` artifact with new `OPENAPI` content, for example).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`)When successful, this creates a new version of the artifact, making it the most recent(and therefore official) version of the artifact.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public WithArtifactItemRequestBuilder 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 WithArtifactItemRequestBuilder