Class TestRequestBuilder
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 ClassesModifier and TypeClassDescriptionclassConfiguration 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
ConstructorsConstructorDescriptionTestRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newTestRequestBuilderand sets the default values.TestRequestBuilder(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newTestRequestBuilderand sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionvoidput(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.voidput(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.RequestInformationtoPutRequestInformation(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.com.microsoft.kiota.RequestInformationtoPutRequestInformation(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.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
TestRequestBuilder
public TestRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newTestRequestBuilderand sets the default values.- Parameters:
pathParameters- Path parameters for the requestrequestAdapter- The request adapter to use to execute the requests.
-
TestRequestBuilder
public TestRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newTestRequestBuilderand 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
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 bodycontentType- The request body content type.- Throws:
AuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeRuleViolationError- When receiving a 409 status codeError- 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 bodycontentType- 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 codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeRuleViolationError- When receiving a 409 status codeError- 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 bodycontentType- 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 bodycontentType- The request body content type.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
TestRequestBuilder
-