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.
  • Constructor Details

    • ArtifactsRequestBuilder

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

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

    • byArtifactId

      @Nonnull public WithArtifactItemRequestBuilder byArtifactId(@Nonnull String artifactId)
      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 code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - 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 code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 500 status code
    • get

      @Nullable public ArtifactSearchResults get()
      Returns a list of all artifacts in the group. This list is paged.
      Returns:
      a ArtifactSearchResults
      Throws:
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - 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 code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 500 status code
    • post

      @Nullable public CreateArtifactResponse post(@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 CreateArtifactResponse
      Throws:
      RuleViolationProblemDetails - When receiving a 400 status code
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 409 status code
      ProblemDetails - When receiving a 422 status code
      ProblemDetails - 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 code
      ProblemDetails - When receiving a 401 status code
      ProblemDetails - When receiving a 403 status code
      ProblemDetails - When receiving a 404 status code
      ProblemDetails - When receiving a 409 status code
      ProblemDetails - When receiving a 422 status code
      ProblemDetails - 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

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