Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionDeclaration

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

Overview

Structured representation of a function declaration as defined by the OpenAPI 3.0 specification. Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1FunctionDeclaration

Returns a new instance of GoogleCloudAiplatformV1beta1FunctionDeclaration.



1019
1020
1021
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1019

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

Instance Attribute Details

#descriptionString

Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. Corresponds to the JSON property description

Returns:

  • (String)


981
982
983
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 981

def description
  @description
end

#nameString

Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 64. Corresponds to the JSON property name

Returns:

  • (String)


988
989
990
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 988

def name
  @name
end

#parametersGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema

Defines the schema of input and output data. This is a subset of the OpenAPI 3.0 Schema Object. Corresponds to the JSON property parameters



994
995
996
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 994

def parameters
  @parameters
end

#parameters_json_schemaObject

Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ` "type": "object", "properties": ` "name": ` "type" : "string" `, "age": ` "type": "integer" ` `, "additionalProperties": false, " required": ["name", "age"], "propertyOrdering": ["name", "age"] ` This field is mutually exclusive with parameters. Corresponds to the JSON property parametersJsonSchema

Returns:

  • (Object)


1004
1005
1006
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1004

def parameters_json_schema
  @parameters_json_schema
end

#responseGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema

Defines the schema of input and output data. This is a subset of the OpenAPI 3.0 Schema Object. Corresponds to the JSON property response



1010
1011
1012
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1010

def response
  @response
end

#response_json_schemaObject

Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with response. Corresponds to the JSON property responseJsonSchema

Returns:

  • (Object)


1017
1018
1019
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1017

def response_json_schema
  @response_json_schema
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1024
1025
1026
1027
1028
1029
1030
1031
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1024

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
  @parameters_json_schema = args[:parameters_json_schema] if args.key?(:parameters_json_schema)
  @response = args[:response] if args.key?(:response)
  @response_json_schema = args[:response_json_schema] if args.key?(:response_json_schema)
end