Class BuildResourceRequests

java.lang.Object
com.azure.resourcemanager.appplatform.models.BuildResourceRequests
All Implemented Interfaces:
com.azure.json.JsonSerializable<BuildResourceRequests>

public final class BuildResourceRequests extends Object implements com.azure.json.JsonSerializable<BuildResourceRequests>
Resource request payload of Build Resource.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of BuildResourceRequests class.
  • Method Summary

    Modifier and Type
    Method
    Description
    cpu()
    Get the cpu property: Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of BuildResourceRequests from the JsonReader.
    Get the memory property: Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the cpu property: Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m.
    Set the memory property: Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • BuildResourceRequests

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

    • cpu

      public String cpu()
      Get the cpu property: Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m. The default value is 1, this should not exceed build service agent pool cpu size.
      Returns:
      the cpu value.
    • withCpu

      public BuildResourceRequests withCpu(String cpu)
      Set the cpu property: Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m. The default value is 1, this should not exceed build service agent pool cpu size.
      Parameters:
      cpu - the cpu value to set.
      Returns:
      the BuildResourceRequests object itself.
    • memory

      public String memory()
      Get the memory property: Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi. The default value is 2Gi, this should not exceed build service agent pool memory size.
      Returns:
      the memory value.
    • withMemory

      public BuildResourceRequests withMemory(String memory)
      Set the memory property: Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi. The default value is 2Gi, this should not exceed build service agent pool memory size.
      Parameters:
      memory - the memory value to set.
      Returns:
      the BuildResourceRequests 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<BuildResourceRequests>
      Throws:
      IOException
    • fromJson

      public static BuildResourceRequests fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BuildResourceRequests from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BuildResourceRequests if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the BuildResourceRequests.