@BetaApi
  public final Operation insertImage(
      Boolean forceCreate, ProjectName project, Image imageResource) {

    InsertImageHttpRequest request =
        InsertImageHttpRequest.newBuilder()
            .setForceCreate(forceCreate)
            .setProject(project == null ? null : project.toString())
            .setImageResource(imageResource)
            .build();
    return insertImage(request);
  }
@ BetaApi public final Operation insertImage ( Boolean forceCreate , ProjectName project , Image imageResource ) { InsertImageHttpRequest request = InsertImageHttpRequest . newBuilder ( ) . setForceCreate ( forceCreate ) . setProject ( project == null ? null : project . toString ( ) ) . setImageResource ( imageResource ) . build ( ) ; return insertImage ( request ) ; }
Creates an image in the specified project using the data included in the request.

<p>Sample code:

<pre><code>
try (ImageClient imageClient = ImageClient.create()) {
Boolean forceCreate = false;
ProjectName project = ProjectName.of("[PROJECT]");
Image imageResource = Image.newBuilder().build();
Operation response = imageClient.insertImage(forceCreate, project, imageResource);
}
</code></pre>

@param forceCreate Force image creation if true.
@param project Project ID for this request.
@param imageResource An Image resource. (== resource_for beta.images ==) (== resource_for
v1.images ==)
@throws com.google.api.gax.rpc.ApiException if the remote call fails