Class ArtifactsRequestBuilder.PostQueryParameters

java.lang.Object
io.apicurio.registry.rest.client.groups.item.artifacts.ArtifactsRequestBuilder.PostQueryParameters
All Implemented Interfaces:
com.microsoft.kiota.QueryParameters
Enclosing class:
ArtifactsRequestBuilder

@Generated("com.microsoft.kiota") public class ArtifactsRequestBuilder.PostQueryParameters extends Object implements com.microsoft.kiota.QueryParameters
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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should "canonicalize" the content when searching for a matching version.
    When set to `true`, the operation will not result in any changes.
    Set this option to instruct the server on what to do if the artifact already exists.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Extracts the query parameters into a map for the URI template parsing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • canonical

      @Nullable public Boolean canonical
      Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should "canonicalize" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner.
    • dryRun

      @Nullable public Boolean dryRun
      When set to `true`, the operation will not result in any changes. Instead, itwill return a result based on whether the operation **would have succeeded**.
    • ifExists

      @Nullable public IfArtifactExists ifExists
      Set this option to instruct the server on what to do if the artifact already exists.
  • Constructor Details

    • PostQueryParameters

      public PostQueryParameters()
  • Method Details

    • toQueryParameters

      @Nonnull public Map<String,Object> toQueryParameters()
      Extracts the query parameters into a map for the URI template parsing.
      Specified by:
      toQueryParameters in interface com.microsoft.kiota.QueryParameters
      Returns:
      a Map<String,Object>