Class SecurityContextCapabilitiesDefinition

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

public final class SecurityContextCapabilitiesDefinition extends Object implements com.azure.json.JsonSerializable<SecurityContextCapabilitiesDefinition>
The capabilities to add or drop from a container.
  • Constructor Details

    • SecurityContextCapabilitiesDefinition

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

    • add

      public List<String> add()
      Get the add property: The capabilities to add to the container.
      Returns:
      the add value.
    • withAdd

      Set the add property: The capabilities to add to the container.
      Parameters:
      add - the add value to set.
      Returns:
      the SecurityContextCapabilitiesDefinition object itself.
    • drop

      public List<String> drop()
      Get the drop property: The capabilities to drop from the container.
      Returns:
      the drop value.
    • withDrop

      Set the drop property: The capabilities to drop from the container.
      Parameters:
      drop - the drop value to set.
      Returns:
      the SecurityContextCapabilitiesDefinition 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<SecurityContextCapabilitiesDefinition>
      Throws:
      IOException
    • fromJson

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