Class ApiKeyAuthentication

java.lang.Object
com.azure.resourcemanager.deploymentmanager.models.RestRequestAuthentication
com.azure.resourcemanager.deploymentmanager.models.ApiKeyAuthentication

public final class ApiKeyAuthentication extends RestRequestAuthentication
ApiKey authentication gives a name and a value that can be included in either the request header or query parameters.
  • Constructor Details

    • ApiKeyAuthentication

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

    • name

      public String name()
      Get the name property: The key name of the authentication key/value pair.
      Returns:
      the name value.
    • withName

      public ApiKeyAuthentication withName(String name)
      Set the name property: The key name of the authentication key/value pair.
      Parameters:
      name - the name value to set.
      Returns:
      the ApiKeyAuthentication object itself.
    • in

      public RestAuthLocation in()
      Get the in property: The location of the authentication key/value pair in the request.
      Returns:
      the in value.
    • withIn

      Set the in property: The location of the authentication key/value pair in the request.
      Parameters:
      in - the in value to set.
      Returns:
      the ApiKeyAuthentication object itself.
    • value

      public String value()
      Get the value property: The value of the authentication key/value pair.
      Returns:
      the value value.
    • withValue

      public ApiKeyAuthentication withValue(String value)
      Set the value property: The value of the authentication key/value pair.
      Parameters:
      value - the value value to set.
      Returns:
      the ApiKeyAuthentication object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class RestRequestAuthentication
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.