Class OriginGroupOverride

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

public final class OriginGroupOverride extends Object implements com.azure.json.JsonSerializable<OriginGroupOverride>
Defines the parameters for the origin group override configuration.
  • Constructor Details

    • OriginGroupOverride

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

    • originGroup

      public ResourceReference originGroup()
      Get the originGroup property: defines the OriginGroup that would override the DefaultOriginGroup on route.
      Returns:
      the originGroup value.
    • withOriginGroup

      public OriginGroupOverride withOriginGroup(ResourceReference originGroup)
      Set the originGroup property: defines the OriginGroup that would override the DefaultOriginGroup on route.
      Parameters:
      originGroup - the originGroup value to set.
      Returns:
      the OriginGroupOverride object itself.
    • forwardingProtocol

      public ForwardingProtocol forwardingProtocol()
      Get the forwardingProtocol property: Protocol this rule will use when forwarding traffic to backends.
      Returns:
      the forwardingProtocol value.
    • withForwardingProtocol

      public OriginGroupOverride withForwardingProtocol(ForwardingProtocol forwardingProtocol)
      Set the forwardingProtocol property: Protocol this rule will use when forwarding traffic to backends.
      Parameters:
      forwardingProtocol - the forwardingProtocol value to set.
      Returns:
      the OriginGroupOverride 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<OriginGroupOverride>
      Throws:
      IOException
    • fromJson

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