Class: Google::Apis::DriveV3::ContentRestriction
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::ContentRestriction
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/drive_v3/classes.rb,
generated/google/apis/drive_v3/representations.rb,
generated/google/apis/drive_v3/representations.rb
Overview
A restriction for accessing the content of the file.
Instance Attribute Summary collapse
-
#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).
-
#type ⇒ String
The type of the content restriction.
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.
615 616 617 |
# File 'generated/google/apis/drive_v3/classes.rb', line 615 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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
589 590 591 |
# File 'generated/google/apis/drive_v3/classes.rb', line 589 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
596 597 598 |
# File 'generated/google/apis/drive_v3/classes.rb', line 596 def reason @reason end |
#restricting_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
Corresponds to the JSON property restrictingUser
601 602 603 |
# File 'generated/google/apis/drive_v3/classes.rb', line 601 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
607 608 609 |
# File 'generated/google/apis/drive_v3/classes.rb', line 607 def restriction_time @restriction_time end |
#type ⇒ String
The type of the content restriction. Currently the only possible value is
globalContentRestriction.
Corresponds to the JSON property type
613 614 615 |
# File 'generated/google/apis/drive_v3/classes.rb', line 613 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
620 621 622 623 624 625 626 |
# File 'generated/google/apis/drive_v3/classes.rb', line 620 def update!(**args) @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) @type = args[:type] if args.key?(:type) end |