Class: Google::Apis::DriveV3::ContentRestriction
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::ContentRestriction
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/drive_v3/classes.rb,
lib/google/apis/drive_v3/representations.rb,
lib/google/apis/drive_v3/representations.rb
Overview
A restriction for accessing the content of the file.
Instance Attribute Summary collapse
-
#owner_restricted ⇒ Boolean
(also: #owner_restricted?)
Whether the content restriction can only be modified or removed by a user who owns the file.
-
#read_only ⇒ Boolean
(also: #read_only?)
Whether the content of the file is read-only.
-
#reason ⇒ String
Reason for why the content of the file is restricted.
-
#restricting_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
-
#restriction_time ⇒ DateTime
The time at which the content restriction was set (formatted RFC 3339 timestamp).
-
#system_restricted ⇒ Boolean
(also: #system_restricted?)
Output only.
-
#type ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ContentRestriction
constructor
A new instance of ContentRestriction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ContentRestriction
Returns a new instance of ContentRestriction.
897 898 899 |
# File 'lib/google/apis/drive_v3/classes.rb', line 897 def initialize(**args) update!(**args) end |
Instance Attribute Details
#owner_restricted ⇒ Boolean Also known as: owner_restricted?
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.
Corresponds to the JSON property ownerRestricted
855 856 857 |
# File 'lib/google/apis/drive_v3/classes.rb', line 855 def owner_restricted @owner_restricted end |
#read_only ⇒ Boolean Also known as: read_only?
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.
Corresponds to the JSON property readOnly
863 864 865 |
# File 'lib/google/apis/drive_v3/classes.rb', line 863 def read_only @read_only end |
#reason ⇒ String
Reason for why the content of the file is restricted. This is only mutable on
requests that also set readOnly=true
.
Corresponds to the JSON property reason
870 871 872 |
# File 'lib/google/apis/drive_v3/classes.rb', line 870 def reason @reason end |
#restricting_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
Corresponds to the JSON property restrictingUser
875 876 877 |
# File 'lib/google/apis/drive_v3/classes.rb', line 875 def restricting_user @restricting_user end |
#restriction_time ⇒ DateTime
The time at which the content restriction was set (formatted RFC 3339
timestamp). Only populated if readOnly is true.
Corresponds to the JSON property restrictionTime
881 882 883 |
# File 'lib/google/apis/drive_v3/classes.rb', line 881 def restriction_time @restriction_time end |
#system_restricted ⇒ Boolean Also known as: system_restricted?
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.
Corresponds to the JSON property systemRestricted
888 889 890 |
# File 'lib/google/apis/drive_v3/classes.rb', line 888 def system_restricted @system_restricted end |
#type ⇒ String
Output only. The type of the content restriction. Currently the only possible
value is globalContentRestriction
.
Corresponds to the JSON property type
895 896 897 |
# File 'lib/google/apis/drive_v3/classes.rb', line 895 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
902 903 904 905 906 907 908 909 910 |
# File 'lib/google/apis/drive_v3/classes.rb', line 902 def update!(**args) @owner_restricted = args[:owner_restricted] if args.key?(:owner_restricted) @read_only = args[:read_only] if args.key?(:read_only) @reason = args[:reason] if args.key?(:reason) @restricting_user = args[:restricting_user] if args.key?(:restricting_user) @restriction_time = args[:restriction_time] if args.key?(:restriction_time) @system_restricted = args[:system_restricted] if args.key?(:system_restricted) @type = args[:type] if args.key?(:type) end |