java.lang.Object
com.azure.resourcemanager.deploymentmanager.models.ServiceProperties
com.azure.resourcemanager.deploymentmanager.models.Service

public final class Service extends ServiceProperties
Defines a service.
  • Constructor Details

    • Service

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

    • name

      public String name()
      Get the name property: Name of the service.
      Returns:
      the name value.
    • withName

      public Service withName(String name)
      Set the name property: Name of the service.
      Parameters:
      name - the name value to set.
      Returns:
      the Service object itself.
    • serviceUnits

      public List<ServiceUnit> serviceUnits()
      Get the serviceUnits property: The detailed information about the units that make up the service.
      Returns:
      the serviceUnits value.
    • withServiceUnits

      public Service withServiceUnits(List<ServiceUnit> serviceUnits)
      Set the serviceUnits property: The detailed information about the units that make up the service.
      Parameters:
      serviceUnits - the serviceUnits value to set.
      Returns:
      the Service object itself.
    • withTargetLocation

      public Service withTargetLocation(String targetLocation)
      Set the targetLocation property: The Azure location to which the resources in the service belong to or should be deployed to.
      Overrides:
      withTargetLocation in class ServiceProperties
      Parameters:
      targetLocation - the targetLocation value to set.
      Returns:
      the ServiceProperties object itself.
    • withTargetSubscriptionId

      public Service withTargetSubscriptionId(String targetSubscriptionId)
      Set the targetSubscriptionId property: The subscription to which the resources in the service belong to or should be deployed to.
      Overrides:
      withTargetSubscriptionId in class ServiceProperties
      Parameters:
      targetSubscriptionId - the targetSubscriptionId value to set.
      Returns:
      the ServiceProperties object itself.
    • validate

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