Class: Google::Apis::DriveV3::StartApprovalRequest

Inherits:
Object
  • Object
show all
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

Allows creating an approval on a file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StartApprovalRequest

Returns a new instance of StartApprovalRequest.



4236
4237
4238
# File 'lib/google/apis/drive_v3/classes.rb', line 4236

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#due_timeString

Optional. The time that the approval is due. Corresponds to the JSON property dueTime

Returns:

  • (String)


4212
4213
4214
# File 'lib/google/apis/drive_v3/classes.rb', line 4212

def due_time
  @due_time
end

#file_content_change_behaviorString

Optional. The behavior of the approval when the file content changes. Corresponds to the JSON property fileContentChangeBehavior

Returns:

  • (String)


4217
4218
4219
# File 'lib/google/apis/drive_v3/classes.rb', line 4217

def file_content_change_behavior
  @file_content_change_behavior
end

#lock_fileBoolean Also known as: lock_file?

Optional. Whether to lock the file when starting the approval. Corresponds to the JSON property lockFile

Returns:

  • (Boolean)


4222
4223
4224
# File 'lib/google/apis/drive_v3/classes.rb', line 4222

def lock_file
  @lock_file
end

#messageString

Optional. A message to send to reviewers when notifying them of the approval request. Corresponds to the JSON property message

Returns:

  • (String)


4229
4230
4231
# File 'lib/google/apis/drive_v3/classes.rb', line 4229

def message
  @message
end

#reviewer_emailsArray<String>

Required. The emails of the users who are set to review the approval. Corresponds to the JSON property reviewerEmails

Returns:

  • (Array<String>)


4234
4235
4236
# File 'lib/google/apis/drive_v3/classes.rb', line 4234

def reviewer_emails
  @reviewer_emails
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4241
4242
4243
4244
4245
4246
4247
# File 'lib/google/apis/drive_v3/classes.rb', line 4241

def update!(**args)
  @due_time = args[:due_time] if args.key?(:due_time)
  @file_content_change_behavior = args[:file_content_change_behavior] if args.key?(:file_content_change_behavior)
  @lock_file = args[:lock_file] if args.key?(:lock_file)
  @message = args[:message] if args.key?(:message)
  @reviewer_emails = args[:reviewer_emails] if args.key?(:reviewer_emails)
end