@BetaApi
  public final Operation deprecateImage(
      ProjectGlobalImageName image, DeprecationStatus deprecationStatusResource) {

    DeprecateImageHttpRequest request =
        DeprecateImageHttpRequest.newBuilder()
            .setImage(image == null ? null : image.toString())
            .setDeprecationStatusResource(deprecationStatusResource)
            .build();
    return deprecateImage(request);
  }
@ BetaApi public final Operation deprecateImage ( ProjectGlobalImageName image , DeprecationStatus deprecationStatusResource ) { DeprecateImageHttpRequest request = DeprecateImageHttpRequest . newBuilder ( ) . setImage ( image == null ? null : image . toString ( ) ) . setDeprecationStatusResource ( deprecationStatusResource ) . build ( ) ; return deprecateImage ( request ) ; }
Sets the deprecation status of an image.

<p>If an empty request body is given, clears the deprecation status instead.

<p>Sample code:

<pre><code>
try (ImageClient imageClient = ImageClient.create()) {
ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
DeprecationStatus deprecationStatusResource = DeprecationStatus.newBuilder().build();
Operation response = imageClient.deprecateImage(image, deprecationStatusResource);
}
</code></pre>

@param image Image name.
@param deprecationStatusResource Deprecation status for a public resource.
@throws com.google.api.gax.rpc.ApiException if the remote call fails