target.apidocs.com.google.api.services.drive.model.ContentRestriction.html Maven / Gradle / Ivy
ContentRestriction (Google Drive API v3-rev20241027-2.0.0)
com.google.api.services.drive.model
Class ContentRestriction
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.drive.model.ContentRestriction
-
public final class ContentRestriction
extends com.google.api.client.json.GenericJson
A restriction for accessing the content of the file.
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 Drive 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
ContentRestriction()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ContentRestriction
clone()
Boolean
getOwnerRestricted()
Whether the content restriction can only be modified or removed by a user who owns the file.
Boolean
getReadOnly()
Whether the content of the file is read-only.
String
getReason()
Reason for why the content of the file is restricted.
User
getRestrictingUser()
Output only.
com.google.api.client.util.DateTime
getRestrictionTime()
The time at which the content restriction was set (formatted RFC 3339 timestamp).
Boolean
getSystemRestricted()
Output only.
String
getType()
Output only.
ContentRestriction
set(String fieldName,
Object value)
ContentRestriction
setOwnerRestricted(Boolean ownerRestricted)
Whether the content restriction can only be modified or removed by a user who owns the file.
ContentRestriction
setReadOnly(Boolean readOnly)
Whether the content of the file is read-only.
ContentRestriction
setReason(String reason)
Reason for why the content of the file is restricted.
ContentRestriction
setRestrictingUser(User restrictingUser)
Output only.
ContentRestriction
setRestrictionTime(com.google.api.client.util.DateTime restrictionTime)
The time at which the content restriction was set (formatted RFC 3339 timestamp).
ContentRestriction
setSystemRestricted(Boolean systemRestricted)
Output only.
ContentRestriction
setType(String type)
Output only.
-
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
-
getOwnerRestricted
public Boolean getOwnerRestricted()
Whether the content restriction can only be modified or removed by a user who owns the file.
For files in shared drives, any user with `organizer` capabilities can modify or remove this
content restriction.
- Returns:
- value or
null
for none
-
setOwnerRestricted
public ContentRestriction setOwnerRestricted(Boolean ownerRestricted)
Whether the content restriction can only be modified or removed by a user who owns the file.
For files in shared drives, any user with `organizer` capabilities can modify or remove this
content restriction.
- Parameters:
ownerRestricted
- ownerRestricted or null
for none
-
getReadOnly
public Boolean getReadOnly()
Whether the content of the file is read-only. If a file is read-only, a new revision of the
file may not be added, comments may not be added or modified, and the title of the file may not
be modified.
- Returns:
- value or
null
for none
-
setReadOnly
public ContentRestriction setReadOnly(Boolean readOnly)
Whether the content of the file is read-only. If a file is read-only, a new revision of the
file may not be added, comments may not be added or modified, and the title of the file may not
be modified.
- Parameters:
readOnly
- readOnly or null
for none
-
getReason
public String getReason()
Reason for why the content of the file is restricted. This is only mutable on requests that
also set `readOnly=true`.
- Returns:
- value or
null
for none
-
setReason
public ContentRestriction setReason(String reason)
Reason for why the content of the file is restricted. This is only mutable on requests that
also set `readOnly=true`.
- Parameters:
reason
- reason or null
for none
-
getRestrictingUser
public User getRestrictingUser()
Output only. The user who set the content restriction. Only populated if `readOnly` is true.
- Returns:
- value or
null
for none
-
setRestrictingUser
public ContentRestriction setRestrictingUser(User restrictingUser)
Output only. The user who set the content restriction. Only populated if `readOnly` is true.
- Parameters:
restrictingUser
- restrictingUser or null
for none
-
getRestrictionTime
public com.google.api.client.util.DateTime getRestrictionTime()
The time at which the content restriction was set (formatted RFC 3339 timestamp). Only
populated if readOnly is true.
- Returns:
- value or
null
for none
-
setRestrictionTime
public ContentRestriction setRestrictionTime(com.google.api.client.util.DateTime restrictionTime)
The time at which the content restriction was set (formatted RFC 3339 timestamp). Only
populated if readOnly is true.
- Parameters:
restrictionTime
- restrictionTime or null
for none
-
getSystemRestricted
public Boolean getSystemRestricted()
Output only. Whether the content restriction was applied by the system, for example due to an
esignature. Users cannot modify or remove system restricted content restrictions.
- Returns:
- value or
null
for none
-
setSystemRestricted
public ContentRestriction setSystemRestricted(Boolean systemRestricted)
Output only. Whether the content restriction was applied by the system, for example due to an
esignature. Users cannot modify or remove system restricted content restrictions.
- Parameters:
systemRestricted
- systemRestricted or null
for none
-
getType
public String getType()
Output only. The type of the content restriction. Currently the only possible value is
`globalContentRestriction`.
- Returns:
- value or
null
for none
-
setType
public ContentRestriction setType(String type)
Output only. The type of the content restriction. Currently the only possible value is
`globalContentRestriction`.
- Parameters:
type
- type or null
for none
-
set
public ContentRestriction set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public ContentRestriction clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy