Class UrlRedirectActionParameters
- java.lang.Object
-
- com.azure.resourcemanager.cdn.models.UrlRedirectActionParameters
-
public final class UrlRedirectActionParameters extends Object
Defines the parameters for the url redirect action.
-
-
Constructor Summary
Constructors Constructor Description UrlRedirectActionParameters()Creates an instance of UrlRedirectActionParameters class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcustomFragment()Get the customFragment property: Fragment to add to the redirect URL.StringcustomHostname()Get the customHostname property: Host to redirect.StringcustomPath()Get the customPath property: The full path to redirect.StringcustomQueryString()Get the customQueryString property: The set of query strings to be placed in the redirect URL.DestinationProtocoldestinationProtocol()Get the destinationProtocol property: Protocol to use for the redirect.StringodataType()Get the odataType property: The @odata.type property.RedirectTyperedirectType()Get the redirectType property: The redirect type the rule will use when redirecting traffic.voidvalidate()Validates the instance.UrlRedirectActionParameterswithCustomFragment(String customFragment)Set the customFragment property: Fragment to add to the redirect URL.UrlRedirectActionParameterswithCustomHostname(String customHostname)Set the customHostname property: Host to redirect.UrlRedirectActionParameterswithCustomPath(String customPath)Set the customPath property: The full path to redirect.UrlRedirectActionParameterswithCustomQueryString(String customQueryString)Set the customQueryString property: The set of query strings to be placed in the redirect URL.UrlRedirectActionParameterswithDestinationProtocol(DestinationProtocol destinationProtocol)Set the destinationProtocol property: Protocol to use for the redirect.UrlRedirectActionParameterswithOdataType(String odataType)Set the odataType property: The @odata.type property.UrlRedirectActionParameterswithRedirectType(RedirectType redirectType)Set the redirectType property: The redirect type the rule will use when redirecting traffic.
-
-
-
Method Detail
-
odataType
public String odataType()
Get the odataType property: The @odata.type property.- Returns:
- the odataType value.
-
withOdataType
public UrlRedirectActionParameters withOdataType(String odataType)
Set the odataType property: The @odata.type property.- Parameters:
odataType- the odataType value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
redirectType
public RedirectType redirectType()
Get the redirectType property: The redirect type the rule will use when redirecting traffic.- Returns:
- the redirectType value.
-
withRedirectType
public UrlRedirectActionParameters withRedirectType(RedirectType redirectType)
Set the redirectType property: The redirect type the rule will use when redirecting traffic.- Parameters:
redirectType- the redirectType value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
destinationProtocol
public DestinationProtocol destinationProtocol()
Get the destinationProtocol property: Protocol to use for the redirect. The default value is MatchRequest.- Returns:
- the destinationProtocol value.
-
withDestinationProtocol
public UrlRedirectActionParameters withDestinationProtocol(DestinationProtocol destinationProtocol)
Set the destinationProtocol property: Protocol to use for the redirect. The default value is MatchRequest.- Parameters:
destinationProtocol- the destinationProtocol value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
customPath
public String customPath()
Get the customPath property: The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.- Returns:
- the customPath value.
-
withCustomPath
public UrlRedirectActionParameters withCustomPath(String customPath)
Set the customPath property: The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.- Parameters:
customPath- the customPath value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
customHostname
public String customHostname()
Get the customHostname property: Host to redirect. Leave empty to use the incoming host as the destination host.- Returns:
- the customHostname value.
-
withCustomHostname
public UrlRedirectActionParameters withCustomHostname(String customHostname)
Set the customHostname property: Host to redirect. Leave empty to use the incoming host as the destination host.- Parameters:
customHostname- the customHostname value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
customQueryString
public String customQueryString()
Get the customQueryString property: The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them.- Returns:
- the customQueryString value.
-
withCustomQueryString
public UrlRedirectActionParameters withCustomQueryString(String customQueryString)
Set the customQueryString property: The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them.- Parameters:
customQueryString- the customQueryString value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
customFragment
public String customFragment()
Get the customFragment property: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.- Returns:
- the customFragment value.
-
withCustomFragment
public UrlRedirectActionParameters withCustomFragment(String customFragment)
Set the customFragment property: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.- Parameters:
customFragment- the customFragment value to set.- Returns:
- the UrlRedirectActionParameters object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-