java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
io.apicurio.registry.rest.client.v2.groups.item.artifacts.item.test.TestRequestBuilder

@Generated("com.microsoft.kiota") public class TestRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Test whether content would pass update rules.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    Configuration 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

    Constructors
    Constructor
    Description
    TestRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter)
    Instantiates a new TestRequestBuilder and sets the default values.
    TestRequestBuilder(HashMap<String,Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter)
    Instantiates a new TestRequestBuilder and sets the default values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    put(InputStream body, String contentType)
    Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be the raw content of the artifact.
    void
    put(InputStream body, String contentType, Consumer<TestRequestBuilder.PutRequestConfiguration> requestConfiguration)
    Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be the raw content of the artifact.
    com.microsoft.kiota.RequestInformation
    Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be the raw content of the artifact.
    com.microsoft.kiota.RequestInformation
    Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be the raw content of the artifact.
    withUrl(String rawUrl)
    Returns a request builder with the provided arbitrary URL.

    Methods inherited from class java.lang.Object

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

    • TestRequestBuilder

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

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

    • put

      public void put(@Nonnull InputStream body, @Nonnull String contentType)
      Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be 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 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`)* The provided artifact type is not recognized (HTTP error `404`)* A server error occurred (HTTP error `500`)When successful, this operation simply returns a *No Content* response. This responseindicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled).
      Parameters:
      body - Binary request body
      contentType - The request body content type.
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      RuleViolationError - When receiving a 409 status code
      Error - When receiving a 500 status code
    • put

      public void put(@Nonnull InputStream body, @Nonnull String contentType, @Nullable Consumer<TestRequestBuilder.PutRequestConfiguration> requestConfiguration)
      Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be 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 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`)* The provided artifact type is not recognized (HTTP error `404`)* A server error occurred (HTTP error `500`)When successful, this operation simply returns a *No Content* response. This responseindicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled).
      Parameters:
      body - Binary request body
      contentType - The request body content type.
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      RuleViolationError - When receiving a 409 status code
      Error - When receiving a 500 status code
    • toPutRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull InputStream body, @Nonnull String contentType)
      Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be 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 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`)* The provided artifact type is not recognized (HTTP error `404`)* A server error occurred (HTTP error `500`)When successful, this operation simply returns a *No Content* response. This responseindicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled).
      Parameters:
      body - Binary request body
      contentType - The request body content type.
      Returns:
      a RequestInformation
    • toPutRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull InputStream body, @Nonnull String contentType, @Nullable Consumer<TestRequestBuilder.PutRequestConfiguration> requestConfiguration)
      Tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be 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 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`)* The provided artifact type is not recognized (HTTP error `404`)* A server error occurred (HTTP error `500`)When successful, this operation simply returns a *No Content* response. This responseindicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled).
      Parameters:
      body - Binary request body
      contentType - The request body content type.
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

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