Class SqlUserDefinedFunctionResource
java.lang.Object
com.azure.resourcemanager.cosmos.models.SqlUserDefinedFunctionResource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SqlUserDefinedFunctionResource>
- Direct Known Subclasses:
SqlUserDefinedFunctionGetPropertiesResource
public class SqlUserDefinedFunctionResource
extends Object
implements com.azure.json.JsonSerializable<SqlUserDefinedFunctionResource>
Cosmos DB SQL userDefinedFunction resource object.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SqlUserDefinedFunctionResource class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Get the body property: Body of the User Defined Function.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SqlUserDefinedFunctionResource from the JsonReader.id()Get the id property: Name of the Cosmos DB SQL userDefinedFunction.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the body property: Body of the User Defined Function.Set the id property: Name of the Cosmos DB SQL userDefinedFunction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SqlUserDefinedFunctionResource
public SqlUserDefinedFunctionResource()Creates an instance of SqlUserDefinedFunctionResource class.
-
-
Method Details
-
id
Get the id property: Name of the Cosmos DB SQL userDefinedFunction.- Returns:
- the id value.
-
withId
Set the id property: Name of the Cosmos DB SQL userDefinedFunction.- Parameters:
id- the id value to set.- Returns:
- the SqlUserDefinedFunctionResource object itself.
-
body
Get the body property: Body of the User Defined Function.- Returns:
- the body value.
-
withBody
Set the body property: Body of the User Defined Function.- Parameters:
body- the body value to set.- Returns:
- the SqlUserDefinedFunctionResource object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SqlUserDefinedFunctionResource>- Throws:
IOException
-
fromJson
public static SqlUserDefinedFunctionResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SqlUserDefinedFunctionResource from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SqlUserDefinedFunctionResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SqlUserDefinedFunctionResource.
-