All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.drive.model.ContentRestriction Maven / Gradle / Ivy

There is a newer version: v3-rev20241206-2.0.0
Show newest version
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.drive.model;

/**
 * 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. */ @SuppressWarnings("javadoc") public final class ContentRestriction extends com.google.api.client.json.GenericJson { /** * 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. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean ownerRestricted; /** * 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. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean readOnly; /** * Reason for why the content of the file is restricted. This is only mutable on requests that * also set `readOnly=true`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String reason; /** * Output only. The user who set the content restriction. Only populated if `readOnly` is true. * The value may be {@code null}. */ @com.google.api.client.util.Key private User restrictingUser; /** * The time at which the content restriction was set (formatted RFC 3339 timestamp). Only * populated if readOnly is true. * The value may be {@code null}. */ @com.google.api.client.util.Key private com.google.api.client.util.DateTime restrictionTime; /** * 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. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean systemRestricted; /** * Output only. The type of the content restriction. Currently the only possible value is * `globalContentRestriction`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String type; /** * 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. * @return value or {@code null} for none */ public java.lang.Boolean getOwnerRestricted() { return 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. * @param ownerRestricted ownerRestricted or {@code null} for none */ public ContentRestriction setOwnerRestricted(java.lang.Boolean ownerRestricted) { this.ownerRestricted = ownerRestricted; return this; } /** * 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. * @return value or {@code null} for none */ public java.lang.Boolean getReadOnly() { return 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. * @param readOnly readOnly or {@code null} for none */ public ContentRestriction setReadOnly(java.lang.Boolean readOnly) { this.readOnly = readOnly; return this; } /** * Reason for why the content of the file is restricted. This is only mutable on requests that * also set `readOnly=true`. * @return value or {@code null} for none */ public java.lang.String getReason() { return reason; } /** * Reason for why the content of the file is restricted. This is only mutable on requests that * also set `readOnly=true`. * @param reason reason or {@code null} for none */ public ContentRestriction setReason(java.lang.String reason) { this.reason = reason; return this; } /** * Output only. The user who set the content restriction. Only populated if `readOnly` is true. * @return value or {@code null} for none */ public User getRestrictingUser() { return restrictingUser; } /** * Output only. The user who set the content restriction. Only populated if `readOnly` is true. * @param restrictingUser restrictingUser or {@code null} for none */ public ContentRestriction setRestrictingUser(User restrictingUser) { this.restrictingUser = restrictingUser; return this; } /** * The time at which the content restriction was set (formatted RFC 3339 timestamp). Only * populated if readOnly is true. * @return value or {@code null} for none */ public com.google.api.client.util.DateTime getRestrictionTime() { return restrictionTime; } /** * The time at which the content restriction was set (formatted RFC 3339 timestamp). Only * populated if readOnly is true. * @param restrictionTime restrictionTime or {@code null} for none */ public ContentRestriction setRestrictionTime(com.google.api.client.util.DateTime restrictionTime) { this.restrictionTime = restrictionTime; return this; } /** * 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. * @return value or {@code null} for none */ public java.lang.Boolean getSystemRestricted() { return 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. * @param systemRestricted systemRestricted or {@code null} for none */ public ContentRestriction setSystemRestricted(java.lang.Boolean systemRestricted) { this.systemRestricted = systemRestricted; return this; } /** * Output only. The type of the content restriction. Currently the only possible value is * `globalContentRestriction`. * @return value or {@code null} for none */ public java.lang.String getType() { return type; } /** * Output only. The type of the content restriction. Currently the only possible value is * `globalContentRestriction`. * @param type type or {@code null} for none */ public ContentRestriction setType(java.lang.String type) { this.type = type; return this; } @Override public ContentRestriction set(String fieldName, Object value) { return (ContentRestriction) super.set(fieldName, value); } @Override public ContentRestriction clone() { return (ContentRestriction) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy