target.apidocs.com.google.api.services.sheets.v4.model.ProtectedRange.html Maven / Gradle / Ivy
ProtectedRange (Google Sheets API v4-rev20240319-2.0.0)
com.google.api.services.sheets.v4.model
Class ProtectedRange
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.sheets.v4.model.ProtectedRange
-
public final class ProtectedRange
extends com.google.api.client.json.GenericJson
A protected range.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Google Sheets API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
ProtectedRange()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ProtectedRange
clone()
String
getDescription()
The description of this protected range.
Editors
getEditors()
The users and groups with edit access to the protected range.
String
getNamedRangeId()
The named range this protected range is backed by, if any.
Integer
getProtectedRangeId()
The ID of the protected range.
GridRange
getRange()
The range that is being protected.
Boolean
getRequestingUserCanEdit()
True if the user who requested this protected range can edit the protected area.
List<GridRange>
getUnprotectedRanges()
The list of unprotected ranges within a protected sheet.
Boolean
getWarningOnly()
True if this protected range will show a warning when editing.
ProtectedRange
set(String fieldName,
Object value)
ProtectedRange
setDescription(String description)
The description of this protected range.
ProtectedRange
setEditors(Editors editors)
The users and groups with edit access to the protected range.
ProtectedRange
setNamedRangeId(String namedRangeId)
The named range this protected range is backed by, if any.
ProtectedRange
setProtectedRangeId(Integer protectedRangeId)
The ID of the protected range.
ProtectedRange
setRange(GridRange range)
The range that is being protected.
ProtectedRange
setRequestingUserCanEdit(Boolean requestingUserCanEdit)
True if the user who requested this protected range can edit the protected area.
ProtectedRange
setUnprotectedRanges(List<GridRange> unprotectedRanges)
The list of unprotected ranges within a protected sheet.
ProtectedRange
setWarningOnly(Boolean warningOnly)
True if this protected range will show a warning when editing.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getDescription
public String getDescription()
The description of this protected range.
- Returns:
- value or
null
for none
-
setDescription
public ProtectedRange setDescription(String description)
The description of this protected range.
- Parameters:
description
- description or null
for none
-
getEditors
public Editors getEditors()
The users and groups with edit access to the protected range. This field is only visible to
users with edit access to the protected range and the document. Editors are not supported with
warning_only protection.
- Returns:
- value or
null
for none
-
setEditors
public ProtectedRange setEditors(Editors editors)
The users and groups with edit access to the protected range. This field is only visible to
users with edit access to the protected range and the document. Editors are not supported with
warning_only protection.
- Parameters:
editors
- editors or null
for none
-
getNamedRangeId
public String getNamedRangeId()
The named range this protected range is backed by, if any. When writing, only one of range or
named_range_id may be set.
- Returns:
- value or
null
for none
-
setNamedRangeId
public ProtectedRange setNamedRangeId(String namedRangeId)
The named range this protected range is backed by, if any. When writing, only one of range or
named_range_id may be set.
- Parameters:
namedRangeId
- namedRangeId or null
for none
-
getProtectedRangeId
public Integer getProtectedRangeId()
The ID of the protected range. This field is read-only.
- Returns:
- value or
null
for none
-
setProtectedRangeId
public ProtectedRange setProtectedRangeId(Integer protectedRangeId)
The ID of the protected range. This field is read-only.
- Parameters:
protectedRangeId
- protectedRangeId or null
for none
-
getRange
public GridRange getRange()
The range that is being protected. The range may be fully unbounded, in which case this is
considered a protected sheet. When writing, only one of range or named_range_id may be set.
- Returns:
- value or
null
for none
-
setRange
public ProtectedRange setRange(GridRange range)
The range that is being protected. The range may be fully unbounded, in which case this is
considered a protected sheet. When writing, only one of range or named_range_id may be set.
- Parameters:
range
- range or null
for none
-
getRequestingUserCanEdit
public Boolean getRequestingUserCanEdit()
True if the user who requested this protected range can edit the protected area. This field is
read-only.
- Returns:
- value or
null
for none
-
setRequestingUserCanEdit
public ProtectedRange setRequestingUserCanEdit(Boolean requestingUserCanEdit)
True if the user who requested this protected range can edit the protected area. This field is
read-only.
- Parameters:
requestingUserCanEdit
- requestingUserCanEdit or null
for none
-
getUnprotectedRanges
public List<GridRange> getUnprotectedRanges()
The list of unprotected ranges within a protected sheet. Unprotected ranges are only supported
on protected sheets.
- Returns:
- value or
null
for none
-
setUnprotectedRanges
public ProtectedRange setUnprotectedRanges(List<GridRange> unprotectedRanges)
The list of unprotected ranges within a protected sheet. Unprotected ranges are only supported
on protected sheets.
- Parameters:
unprotectedRanges
- unprotectedRanges or null
for none
-
getWarningOnly
public Boolean getWarningOnly()
True if this protected range will show a warning when editing. Warning-based protection means
that every user can edit data in the protected range, except editing will prompt a warning
asking the user to confirm the edit. When writing: if this field is true, then editors are
ignored. Additionally, if this field is changed from true to false and the `editors` field is
not set (nor included in the field mask), then the editors will be set to all the editors in
the document.
- Returns:
- value or
null
for none
-
setWarningOnly
public ProtectedRange setWarningOnly(Boolean warningOnly)
True if this protected range will show a warning when editing. Warning-based protection means
that every user can edit data in the protected range, except editing will prompt a warning
asking the user to confirm the edit. When writing: if this field is true, then editors are
ignored. Additionally, if this field is changed from true to false and the `editors` field is
not set (nor included in the field mask), then the editors will be set to all the editors in
the document.
- Parameters:
warningOnly
- warningOnly or null
for none
-
set
public ProtectedRange set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public ProtectedRange clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.