Class StateRequestBuilder
java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
io.apicurio.registry.rest.client.v2.groups.item.artifacts.item.state.StateRequestBuilder
@Generated("com.microsoft.kiota")
public class StateRequestBuilder
extends com.microsoft.kiota.BaseRequestBuilder
Manage the state of an artifact.
-
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
ConstructorsConstructorDescriptionStateRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newStateRequestBuilderand sets the default values.StateRequestBuilder(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newStateRequestBuilderand sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionvoidput(UpdateState body) Updates the state of the artifact.voidput(UpdateState body, Consumer<StateRequestBuilder.PutRequestConfiguration> requestConfiguration) Updates the state of the artifact.com.microsoft.kiota.RequestInformationUpdates the state of the artifact.com.microsoft.kiota.RequestInformationtoPutRequestInformation(UpdateState body, Consumer<StateRequestBuilder.PutRequestConfiguration> requestConfiguration) Updates the state of the artifact.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
StateRequestBuilder
public StateRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newStateRequestBuilderand sets the default values.- Parameters:
pathParameters- Path parameters for the requestrequestAdapter- The request adapter to use to execute the requests.
-
StateRequestBuilder
public StateRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newStateRequestBuilderand 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
Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) -
put
public void put(@Nonnull UpdateState body, @Nullable Consumer<StateRequestBuilder.PutRequestConfiguration> requestConfiguration) Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)- Parameters:
body- The request bodyrequestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Throws:
Error- When receiving a 400 status codeAuthError- When receiving a 401 status codeAuthError- When receiving a 403 status codeError- When receiving a 404 status codeError- When receiving a 500 status code
-
toPutRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull UpdateState body) Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)- Parameters:
body- The request body- Returns:
- a
RequestInformation
-
toPutRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toPutRequestInformation(@Nonnull UpdateState body, @Nullable Consumer<StateRequestBuilder.PutRequestConfiguration> requestConfiguration) Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`)- Parameters:
body- The request bodyrequestConfiguration- 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
StateRequestBuilder
-