Class SqlStoredProcedureResource

java.lang.Object
com.azure.resourcemanager.cosmos.models.SqlStoredProcedureResource
All Implemented Interfaces:
com.azure.json.JsonSerializable<SqlStoredProcedureResource>
Direct Known Subclasses:
SqlStoredProcedureGetPropertiesResource

public class SqlStoredProcedureResource extends Object implements com.azure.json.JsonSerializable<SqlStoredProcedureResource>
Cosmos DB SQL storedProcedure resource object.
  • Constructor Details

    • SqlStoredProcedureResource

      public SqlStoredProcedureResource()
      Creates an instance of SqlStoredProcedureResource class.
  • Method Details

    • id

      public String id()
      Get the id property: Name of the Cosmos DB SQL storedProcedure.
      Returns:
      the id value.
    • withId

      public SqlStoredProcedureResource withId(String id)
      Set the id property: Name of the Cosmos DB SQL storedProcedure.
      Parameters:
      id - the id value to set.
      Returns:
      the SqlStoredProcedureResource object itself.
    • body

      public String body()
      Get the body property: Body of the Stored Procedure.
      Returns:
      the body value.
    • withBody

      public SqlStoredProcedureResource withBody(String body)
      Set the body property: Body of the Stored Procedure.
      Parameters:
      body - the body value to set.
      Returns:
      the SqlStoredProcedureResource object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SqlStoredProcedureResource>
      Throws:
      IOException
    • fromJson

      public static SqlStoredProcedureResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SqlStoredProcedureResource from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SqlStoredProcedureResource 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 SqlStoredProcedureResource.