Class ArtifactsRequestBuilder
java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
io.apicurio.registry.rest.client.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.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(CreateArtifact body) Creates a new artifact.post(CreateArtifact body, Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact.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.com.microsoft.kiota.RequestInformationtoPostRequestInformation(CreateArtifact body, Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact.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. Must follow the ".{1,512}" pattern.- Returns:
- a
WithArtifactItemRequestBuilder
-
delete
public void delete()Deletes all of the artifacts that exist in a given group.- Throws:
ProblemDetails- When receiving a 401 status codeProblemDetails- When receiving a 403 status codeProblemDetails- When receiving a 500 status code
-
delete
public void delete(@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.- Throws:
ProblemDetails- When receiving a 401 status codeProblemDetails- When receiving a 403 status codeProblemDetails- When receiving a 500 status code
-
get
Returns a list of all artifacts in the group. This list is paged.- Returns:
- a
ArtifactSearchResults - Throws:
ProblemDetails- When receiving a 401 status codeProblemDetails- When receiving a 403 status codeProblemDetails- When receiving a 404 status codeProblemDetails- 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:
ProblemDetails- When receiving a 401 status codeProblemDetails- When receiving a 403 status codeProblemDetails- When receiving a 404 status codeProblemDetails- When receiving a 500 status code
-
post
Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, 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`)An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server willgenerate a unique ID for the artifact. It is typically recommended that callersprovide the ID, because it is typically a meaningful identifier, and as suchfor 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* `CREATE_VERSION` - server creates a new version of the existing artifact and returns it* `FIND_OR_CREATE_VERSION` - 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 invalid version number was used for the optional included first version (HTTP error `400`)* The group does not exist and automatic-group-creation is not enabled (HTTP error `404`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `400`)* A server error occurred (HTTP error `500`)Note that if the `dryRun` query parameter is set to `true`, then this operationwill not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if anartifact is valid or if a new version passes configured compatibility checks.- Parameters:
body- Data sent when creating a new artifact.- Returns:
- a
CreateArtifactResponse - Throws:
RuleViolationProblemDetails- When receiving a 400 status codeProblemDetails- When receiving a 401 status codeProblemDetails- When receiving a 403 status codeProblemDetails- When receiving a 404 status codeProblemDetails- When receiving a 409 status codeProblemDetails- When receiving a 422 status codeProblemDetails- When receiving a 500 status code
-
post
@Nullable public CreateArtifactResponse post(@Nonnull CreateArtifact body, @Nullable Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, 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`)An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server willgenerate a unique ID for the artifact. It is typically recommended that callersprovide the ID, because it is typically a meaningful identifier, and as suchfor 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* `CREATE_VERSION` - server creates a new version of the existing artifact and returns it* `FIND_OR_CREATE_VERSION` - 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 invalid version number was used for the optional included first version (HTTP error `400`)* The group does not exist and automatic-group-creation is not enabled (HTTP error `404`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `400`)* A server error occurred (HTTP error `500`)Note that if the `dryRun` query parameter is set to `true`, then this operationwill not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if anartifact is valid or if a new version passes configured compatibility checks.- Parameters:
body- Data sent when creating a new artifact.requestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
CreateArtifactResponse - Throws:
RuleViolationProblemDetails- When receiving a 400 status codeProblemDetails- When receiving a 401 status codeProblemDetails- When receiving a 403 status codeProblemDetails- When receiving a 404 status codeProblemDetails- When receiving a 409 status codeProblemDetails- When receiving a 422 status codeProblemDetails- 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 CreateArtifact body) Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, 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`)An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server willgenerate a unique ID for the artifact. It is typically recommended that callersprovide the ID, because it is typically a meaningful identifier, and as suchfor 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* `CREATE_VERSION` - server creates a new version of the existing artifact and returns it* `FIND_OR_CREATE_VERSION` - 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 invalid version number was used for the optional included first version (HTTP error `400`)* The group does not exist and automatic-group-creation is not enabled (HTTP error `404`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `400`)* A server error occurred (HTTP error `500`)Note that if the `dryRun` query parameter is set to `true`, then this operationwill not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if anartifact is valid or if a new version passes configured compatibility checks.- Parameters:
body- Data sent when creating a new artifact.- Returns:
- a
RequestInformation
-
toPostRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull CreateArtifact body, @Nullable Consumer<ArtifactsRequestBuilder.PostRequestConfiguration> requestConfiguration) Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, 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`)An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server willgenerate a unique ID for the artifact. It is typically recommended that callersprovide the ID, because it is typically a meaningful identifier, and as suchfor 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* `CREATE_VERSION` - server creates a new version of the existing artifact and returns it* `FIND_OR_CREATE_VERSION` - 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 invalid version number was used for the optional included first version (HTTP error `400`)* The group does not exist and automatic-group-creation is not enabled (HTTP error `404`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `400`)* A server error occurred (HTTP error `500`)Note that if the `dryRun` query parameter is set to `true`, then this operationwill not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if anartifact is valid or if a new version passes configured compatibility checks.- Parameters:
body- Data sent when creating a new artifact.requestConfiguration- 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
-