Class: Google::Apis::CesV1::PythonFunction

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

Overview

A Python function tool.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PythonFunction

Returns a new instance of PythonFunction.



5823
5824
5825
# File 'lib/google/apis/ces_v1/classes.rb', line 5823

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

Instance Attribute Details

#descriptionString

Output only. The description of the Python function, parsed from the python code's docstring. Corresponds to the JSON property description

Returns:

  • (String)


5804
5805
5806
# File 'lib/google/apis/ces_v1/classes.rb', line 5804

def description
  @description
end

#nameString

Optional. The name of the Python function to execute. Must match a Python function name defined in the python code. Case sensitive. If the name is not provided, the first function defined in the python code will be used. Corresponds to the JSON property name

Returns:

  • (String)


5811
5812
5813
# File 'lib/google/apis/ces_v1/classes.rb', line 5811

def name
  @name
end

#python_codeString

Optional. The Python code to execute for the tool. Corresponds to the JSON property pythonCode

Returns:

  • (String)


5816
5817
5818
# File 'lib/google/apis/ces_v1/classes.rb', line 5816

def python_code
  @python_code
end

#service_directory_configGoogle::Apis::CesV1::ServiceDirectoryConfig

Configuration for tools using Service Directory. Corresponds to the JSON property serviceDirectoryConfig



5821
5822
5823
# File 'lib/google/apis/ces_v1/classes.rb', line 5821

def service_directory_config
  @service_directory_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5828
5829
5830
5831
5832
5833
# File 'lib/google/apis/ces_v1/classes.rb', line 5828

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @python_code = args[:python_code] if args.key?(:python_code)
  @service_directory_config = args[:service_directory_config] if args.key?(:service_directory_config)
end