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

    • StateRequestBuilder

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

      public StateRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new StateRequestBuilder 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 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
      Throws:
      Error - When receiving a 400 status code
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - When receiving a 500 status code
    • 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 body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      Error - When receiving a 400 status code
      AuthError - When receiving a 401 status code
      AuthError - When receiving a 403 status code
      Error - When receiving a 404 status code
      Error - 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 body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

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