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.



2107
2108
2109
# File 'lib/google/apis/batch_v1/classes.rb', line 2107

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 executed by /bin/sh. Corresponds to the JSON property path

Returns:

  • (String)


2096
2097
2098
# File 'lib/google/apis/batch_v1/classes.rb', line 2096

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 executed by /bin/sh. Corresponds to the JSON property text

Returns:

  • (String)


2105
2106
2107
# File 'lib/google/apis/batch_v1/classes.rb', line 2105

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2112
2113
2114
2115
# File 'lib/google/apis/batch_v1/classes.rb', line 2112

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