Class: Google::Apis::ScriptV1::File

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/script_v1/classes.rb,
generated/google/apis/script_v1/representations.rb,
generated/google/apis/script_v1/representations.rb

Overview

An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ File

Returns a new instance of File



393
394
395
# File 'generated/google/apis/script_v1/classes.rb', line 393

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

Instance Attribute Details

#create_timeString

Creation date timestamp. This read-only field is only visible to users who have WRITER permission for the script project. Corresponds to the JSON property createTime

Returns:

  • (String)


358
359
360
# File 'generated/google/apis/script_v1/classes.rb', line 358

def create_time
  @create_time
end

#function_setGoogle::Apis::ScriptV1::GoogleAppsScriptTypeFunctionSet

A set of functions. No duplicates are permitted. Corresponds to the JSON property functionSet



363
364
365
# File 'generated/google/apis/script_v1/classes.rb', line 363

def function_set
  @function_set
end

#last_modify_userGoogle::Apis::ScriptV1::GoogleAppsScriptTypeUser

A simple user profile resource. Corresponds to the JSON property lastModifyUser



368
369
370
# File 'generated/google/apis/script_v1/classes.rb', line 368

def last_modify_user
  @last_modify_user
end

#nameString

The name of the file. The file extension is not part of the file name, which can be identified from the type field. Corresponds to the JSON property name

Returns:

  • (String)


374
375
376
# File 'generated/google/apis/script_v1/classes.rb', line 374

def name
  @name
end

#sourceString

The file content. Corresponds to the JSON property source

Returns:

  • (String)


379
380
381
# File 'generated/google/apis/script_v1/classes.rb', line 379

def source
  @source
end

#typeString

The type of the file. Corresponds to the JSON property type

Returns:

  • (String)


384
385
386
# File 'generated/google/apis/script_v1/classes.rb', line 384

def type
  @type
end

#update_timeString

Last modified date timestamp. This read-only field is only visible to users who have WRITER permission for the script project. Corresponds to the JSON property updateTime

Returns:

  • (String)


391
392
393
# File 'generated/google/apis/script_v1/classes.rb', line 391

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



398
399
400
401
402
403
404
405
406
# File 'generated/google/apis/script_v1/classes.rb', line 398

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @function_set = args[:function_set] if args.key?(:function_set)
  @last_modify_user = args[:last_modify_user] if args.key?(:last_modify_user)
  @name = args[:name] if args.key?(:name)
  @source = args[:source] if args.key?(:source)
  @type = args[:type] if args.key?(:type)
  @update_time = args[:update_time] if args.key?(:update_time)
end