Class ArtifactsRequestBuilder
java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
io.apicurio.registry.rest.client.v2.groups.item.artifacts.ArtifactsRequestBuilder
@Generated("com.microsoft.kiota")
public class ArtifactsRequestBuilder
extends com.microsoft.kiota.BaseRequestBuilder
Manage the collection of artifacts within a single group in the registry.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassConfiguration for the request such as headers, query parameters, and middleware options.classReturns a list of all artifacts in the group.classConfiguration for the request such as headers, query parameters, and middleware options.classCreates a new artifact by posting the artifact content.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
ConstructorsConstructorDescriptionArtifactsRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newArtifactsRequestBuilderand sets the default values.ArtifactsRequestBuilder(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newArtifactsRequestBuilderand sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionbyArtifactId(String artifactId) Manage a single artifact.voiddelete()Deletes all of the artifacts that exist in a given group.voiddelete(Consumer<ArtifactsRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes all of the artifacts that exist in a given group.get()Returns a list of all artifacts in the group.get(Consumer<ArtifactsRequestBuilder.GetRequestConfiguration> requestConfiguration) Returns a list of all artifacts in the group.post(ArtifactContent body) Creates a new artifact by posting the artifact content.post(ArtifactContent body, Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact by posting the artifact content.com.microsoft.kiota.RequestInformationDeletes all of the artifacts that exist in a given group.com.microsoft.kiota.RequestInformationtoDeleteRequestInformation(Consumer<ArtifactsRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes all of the artifacts that exist in a given group.com.microsoft.kiota.RequestInformationReturns a list of all artifacts in the group.com.microsoft.kiota.RequestInformationtoGetRequestInformation(Consumer<ArtifactsRequestBuilder.GetRequestConfiguration> requestConfiguration) Returns a list of all artifacts in the group.com.microsoft.kiota.RequestInformationCreates a new artifact by posting the artifact content.com.microsoft.kiota.RequestInformationtoPostRequestInformation(ArtifactContent body, Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact by posting the artifact content.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
ArtifactsRequestBuilder
public ArtifactsRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newArtifactsRequestBuilderand sets the default values.- Parameters:
pathParameters- Path parameters for the requestrequestAdapter- The request adapter to use to execute the requests.
-
ArtifactsRequestBuilder
public ArtifactsRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newArtifactsRequestBuilderand 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
-
byArtifactId
Manage a single artifact.- Parameters:
artifactId- The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier.- Returns:
- a
WithArtifactItemRequestBuilder
-
delete
public void delete()Deletes all of the artifacts that exist in a given group. -
delete
public void delete(@Nullable Consumer<ArtifactsRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes all of the artifacts that exist in a given group. -
get
Returns a list of all artifacts in the group. This list is paged.- Returns:
- a
ArtifactSearchResults - Throws:
AuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeError- When receiving a 500 status code
-
get
@Nullable public ArtifactSearchResults get(@Nullable Consumer<ArtifactsRequestBuilder.GetRequestConfiguration> requestConfiguration) Returns a list of all artifacts in the group. This list is paged.- Parameters:
requestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
ArtifactSearchResults - Throws:
AuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeError- When receiving a 500 status code
-
post
Creates a new artifact by posting the artifact content. The body of the request shouldbe the raw content of the artifact. 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 registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`)- Parameters:
body- The request body- Returns:
- a
ArtifactMetaData - Throws:
Error- When receiving a 400 status codeAuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeRuleViolationError- When receiving a 409 status codeError- When receiving a 500 status code
-
post
@Nullable public ArtifactMetaData post(@Nonnull ArtifactContent body, @Nullable Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact by posting the artifact content. The body of the request shouldbe the raw content of the artifact. 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 registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`)- Parameters:
body- The request bodyrequestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
ArtifactMetaData - Throws:
Error- When receiving a 400 status codeAuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeRuleViolationError- When receiving a 409 status codeError- When receiving a 500 status code
-
toDeleteRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()Deletes all of the artifacts that exist in a given group.- Returns:
- a
RequestInformation
-
toDeleteRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<ArtifactsRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes all of the artifacts that exist in a given group.- 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 a list of all artifacts in the group. This list is paged.- Returns:
- a
RequestInformation
-
toGetRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<ArtifactsRequestBuilder.GetRequestConfiguration> requestConfiguration) Returns a list of all artifacts in the group. This list is paged.- 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 ArtifactContent body) Creates a new artifact by posting the artifact content. The body of the request shouldbe the raw content of the artifact. 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 registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (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 ArtifactContent body, @Nullable Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact by posting the artifact content. The body of the request shouldbe the raw content of the artifact. 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 registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`)- 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
ArtifactsRequestBuilder
-