public class Compute.Instances.SetDeletionProtection extends ComputeRequest<Operation>
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>USER_AGENT_SUFFIX| Modifier | Constructor and Description |
|---|---|
protected |
SetDeletionProtection(String project,
String zone,
String resource)
Sets deletion protection on the instance.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getDeletionProtection()
Whether the resource should be protected against deletion.
|
String |
getProject()
Project ID for this request.
|
String |
getRequestId()
An optional request ID to identify requests.
|
String |
getResource()
Name or id of the resource for this request.
|
String |
getZone()
The name of the zone for this request.
|
boolean |
isDeletionProtection()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
Compute.Instances.SetDeletionProtection |
set(String parameterName,
Object value) |
Compute.Instances.SetDeletionProtection |
setAlt(String alt)
Data format for the response.
|
Compute.Instances.SetDeletionProtection |
setDeletionProtection(Boolean deletionProtection)
Whether the resource should be protected against deletion.
|
Compute.Instances.SetDeletionProtection |
setFields(String fields)
Selector specifying which fields to include in a partial response.
|
Compute.Instances.SetDeletionProtection |
setKey(String key)
API key.
|
Compute.Instances.SetDeletionProtection |
setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.
|
Compute.Instances.SetDeletionProtection |
setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.
|
Compute.Instances.SetDeletionProtection |
setProject(String project)
Project ID for this request.
|
Compute.Instances.SetDeletionProtection |
setQuotaUser(String quotaUser)
An opaque string that represents a user for quota purposes.
|
Compute.Instances.SetDeletionProtection |
setRequestId(String requestId)
An optional request ID to identify requests.
|
Compute.Instances.SetDeletionProtection |
setResource(String resource)
Name or id of the resource for this request.
|
Compute.Instances.SetDeletionProtection |
setUserIp(String userIp)
Deprecated.
|
Compute.Instances.SetDeletionProtection |
setZone(String zone)
The name of the zone for this request.
|
getAbstractGoogleClient, getAlt, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUserIp, setDisableGZipContent, setRequestHeadersgetJsonContent, newExceptionOnError, queuebuildHttpRequest, buildHttpRequestUrl, buildHttpRequestUsingHead, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeMedia, executeMediaAndDownloadTo, executeMediaAsInputStream, executeUnparsed, executeUsingHead, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queueclone, entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllprotected SetDeletionProtection(String project, String zone, String resource)
AbstractGoogleClientRequest.execute() method to invoke the remote
operation. SetDeletionProtection#initialize(com.google.api.client.googleapis.service
s.AbstractGoogleClientRequest) must be called to initialize this instance immediately after
invoking the constructor.
project - Project ID for this request.zone - The name of the zone for this request.resource - Name or id of the resource for this request.public Compute.Instances.SetDeletionProtection setAlt(String alt)
ComputeRequestsetAlt in class ComputeRequest<Operation>public Compute.Instances.SetDeletionProtection setFields(String fields)
ComputeRequestsetFields in class ComputeRequest<Operation>public Compute.Instances.SetDeletionProtection setKey(String key)
ComputeRequestsetKey in class ComputeRequest<Operation>public Compute.Instances.SetDeletionProtection setOauthToken(String oauthToken)
ComputeRequestsetOauthToken in class ComputeRequest<Operation>public Compute.Instances.SetDeletionProtection setPrettyPrint(Boolean prettyPrint)
ComputeRequestsetPrettyPrint in class ComputeRequest<Operation>public Compute.Instances.SetDeletionProtection setQuotaUser(String quotaUser)
ComputeRequestsetQuotaUser in class ComputeRequest<Operation>public Compute.Instances.SetDeletionProtection setUserIp(String userIp)
ComputeRequestsetUserIp in class ComputeRequest<Operation>public String getProject()
public Compute.Instances.SetDeletionProtection setProject(String project)
public String getZone()
public Compute.Instances.SetDeletionProtection setZone(String zone)
public String getResource()
public Compute.Instances.SetDeletionProtection setResource(String resource)
public Boolean getDeletionProtection()
public Compute.Instances.SetDeletionProtection setDeletionProtection(Boolean deletionProtection)
public boolean isDeletionProtection()
Boolean.TRUE or Boolean.FALSE.
Boolean properties can have four possible values:
null, Data.NULL_BOOLEAN, Boolean.TRUE
or Boolean.FALSE.
This method returns Boolean.TRUE if the default of the property is Boolean.TRUE
and it is null or Data.NULL_BOOLEAN.
Boolean.FALSE is returned if the default of the property is Boolean.FALSE and
it is null or Data.NULL_BOOLEAN.
Whether the resource should be protected against deletion.
public String getRequestId()
public Compute.Instances.SetDeletionProtection setRequestId(String requestId)
public Compute.Instances.SetDeletionProtection set(String parameterName, Object value)
set in class ComputeRequest<Operation>Copyright © 2011–2019 Google. All rights reserved.