Class: Google::Apis::BatchV1::Script

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

Overview

Script runnable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Script

Returns a new instance of Script.



1656
1657
1658
# File 'lib/google/apis/batch_v1/classes.rb', line 1656

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

Instance Attribute Details

#pathString

Script file path on the host VM. To specify an interpreter, please add a #!( also known as shebang line) as the first line of the file.(For example, to execute the script using bash, #!/ bin/bash should be the first line of the file. To execute the script using Python3, #!/usr/bin/env python3 should be the first line of the file.) Otherwise, the file will by default be excuted by /bin/sh. Corresponds to the JSON property path

Returns:

  • (String)


1645
1646
1647
# File 'lib/google/apis/batch_v1/classes.rb', line 1645

def path
  @path
end

#textString

Shell script text. To specify an interpreter, please add a #!\n at the beginning of the text.(For example, to execute the script using bash, #!/bin/ bash\n should be added. To execute the script usingPython3, #!/usr/bin/env python3\n should be added.) Otherwise, the script will by default be excuted by /bin/sh. Corresponds to the JSON property text

Returns:

  • (String)


1654
1655
1656
# File 'lib/google/apis/batch_v1/classes.rb', line 1654

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1661
1662
1663
1664
# File 'lib/google/apis/batch_v1/classes.rb', line 1661

def update!(**args)
  @path = args[:path] if args.key?(:path)
  @text = args[:text] if args.key?(:text)
end