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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassConfiguration for the request such as headers, query parameters, and middleware options.classReturns the latest version of the artifact in its raw form.classConfiguration for the request such as headers, query parameters, and middleware options.classConfiguration for the request such as headers, query parameters, and middleware options. -
Field Summary
Fields inherited from class com.microsoft.kiota.BaseRequestBuilder
pathParameters, requestAdapter, urlTemplate -
Constructor Summary
ConstructorsConstructorDescriptionWithArtifactItemRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newWithArtifactItemRequestBuilderand sets the default values.WithArtifactItemRequestBuilder(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newWithArtifactItemRequestBuilderand sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted.voiddelete(Consumer<WithArtifactItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted.get()Returns the latest version of the artifact in its raw form.get(Consumer<WithArtifactItemRequestBuilder.GetRequestConfiguration> requestConfiguration) Returns the latest version of the artifact in its raw form.meta()Manage the metadata of a single artifact.owner()Manage the ownership of a single artifact.put(ArtifactContent body) Updates an artifact by uploading new content.put(ArtifactContent body, Consumer<WithArtifactItemRequestBuilder.PutRequestConfiguration> requestConfiguration) Updates an artifact by uploading new content.rules()Manage the rules for a single artifact.state()Manage the state of an artifact.test()Test whether content would pass update rules.com.microsoft.kiota.RequestInformationDeletes an artifact completely, resulting in all versions of the artifact also beingdeleted.com.microsoft.kiota.RequestInformationtoDeleteRequestInformation(Consumer<WithArtifactItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes an artifact completely, resulting in all versions of the artifact also beingdeleted.com.microsoft.kiota.RequestInformationReturns the latest version of the artifact in its raw form.com.microsoft.kiota.RequestInformationtoGetRequestInformation(Consumer<WithArtifactItemRequestBuilder.GetRequestConfiguration> requestConfiguration) Returns the latest version of the artifact in its raw form.com.microsoft.kiota.RequestInformationUpdates an artifact by uploading new content.com.microsoft.kiota.RequestInformationtoPutRequestInformation(ArtifactContent body, Consumer<WithArtifactItemRequestBuilder.PutRequestConfiguration> requestConfiguration) Updates an artifact by uploading new content.versions()Manage all the versions of an artifact in the registry.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
WithArtifactItemRequestBuilder
public WithArtifactItemRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newWithArtifactItemRequestBuilderand sets the default values.- Parameters:
pathParameters- Path parameters for the requestrequestAdapter- The request adapter to use to execute the requests.
-
WithArtifactItemRequestBuilder
public WithArtifactItemRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newWithArtifactItemRequestBuilderand 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
Manage the metadata of a single artifact.- Returns:
- a
MetaRequestBuilder
-
owner
Manage the ownership of a single artifact.- Returns:
- a
OwnerRequestBuilder
-
rules
Manage the rules for a single artifact.- Returns:
- a
RulesRequestBuilder
-
state
Manage the state of an artifact.- Returns:
- a
StateRequestBuilder
-
test
Test whether content would pass update rules.- Returns:
- a
TestRequestBuilder
-
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`) -
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 codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeError- When receiving a 500 status code
-
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 codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeError- 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 codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeError- When receiving a 500 status code
-
put
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. -
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 bodyrequestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
ArtifactMetaData - Throws:
AuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeError- When receiving a 409 status codeError- 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 bodyrequestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
RequestInformation
-
withUrl
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
-