/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.dns;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.dns.implementation.DnsZoneManager;
import com.microsoft.azure.management.dns.implementation.ZoneInner;
import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import java.util.List;
/**
* An immutable client-side representation of an Azure DNS Zone.
*/
@Fluent
public interface DnsZone extends
GroupableResource<DnsZoneManager, ZoneInner>,
Refreshable<DnsZone>,
Updatable<DnsZone.Update> {
/**
* @return the maximum number of record sets that can be created in this zone.
*/
long maxNumberOfRecordSets();
/**
* @return the current number of record sets in this zone.
*/
long numberOfRecordSets();
/**
* @return name servers assigned for this zone.
*/
List<String> nameServers();
/**
* @return entry point to manage record sets in this zone containing A (IPv4 address) records
*/
ARecordSets aRecordSets();
/**
* @return entry point to manage record sets in this zone containing AAAA (IPv6 address) records
*/
AaaaRecordSets aaaaRecordSets();
/**
* @return entry point to manage record sets in this zone containing CNAME (canonical name) records
*/
CNameRecordSets cNameRecordSets();
/**
* @return entry point to manage record sets in this zone containing MX (mail exchange) records
*/
MXRecordSets mxRecordSets();
/**
* @return entry point to manage record sets in this zone containing NS (name server) records
*/
NSRecordSets nsRecordSets();
/**
* @return entry point to manage record sets in this zone containing PTR (pointer) records
*/
PtrRecordSets ptrRecordSets();
/**
* @return entry point to manage record sets in this zone containing SRV (service) records
*/
SrvRecordSets srvRecordSets();
/**
* @return entry point to manage record sets in this zone containing TXT (text) records
*/
TxtRecordSets txtRecordSets();
/**
* @return the record set containing SOA (start of authority) record associated with this DNS zone
*/
SoaRecordSet getSoaRecordSet();
/**
* The entirety of the DNS zone definition.
*/
interface Definition extends
DefinitionStages.Blank,
DefinitionStages.WithCreate {
}
/**
* Grouping of DNS zone definition stages.
*/
interface DefinitionStages {
/**
* The stage of the DNS zone definition allowing to specify the resource group.
*/
interface Blank extends GroupableResource.DefinitionStages.WithGroupAndRegion<WithCreate> {
}
/**
* The stage of the DNS zone definition allowing to specify record set.
*/
interface WithRecordSet {
/**
* Specifies definition of an A record set.
*
* @param name name of the A record set
* @return the stage representing configuration for the A record set
*/
DnsRecordSet.DefinitionStages.ARecordSetBlank<WithCreate> defineARecordSet(String name);
/**
* Specifies definition of an AAAA record set.
*
* @param name name of the AAAA record set
* @return the stage representing configuration for the AAAA record set
*/
DnsRecordSet.DefinitionStages.AaaaRecordSetBlank<WithCreate> defineAaaaRecordSet(String name);
/**
* Specifies definition of a CNAME record set.
*
* @param name name of the CNAME record set
* @param alias the CNAME record alias
* @return the next stage of DNS zone definition
*/
WithCreate withCNameRecordSet(String name, String alias);
/**
* Specifies definition of a MX record set.
*
* @param name name of the MX record set
* @return the stage representing configuration for the MX record set
*/
DnsRecordSet.DefinitionStages.MXRecordSetBlank<WithCreate> defineMXRecordSet(String name);
/**
* Specifies definition of an NS record set.
*
* @param name name of the NS record set
* @return the stage representing configuration for the NS record set
*/
DnsRecordSet.DefinitionStages.NSRecordSetBlank<WithCreate> defineNSRecordSet(String name);
/**
* Specifies definition of a PTR record set.
*
* @param name name of the PTR record set
* @return the stage representing configuration for the PTR record set
*/
DnsRecordSet.DefinitionStages.PtrRecordSetBlank<WithCreate> definePtrRecordSet(String name);
/**
* Specifies definition of a SRV record set.
*
* @param name the name of the SRV record set
* @return the stage representing configuration for the SRV record set
*/
DnsRecordSet.DefinitionStages.SrvRecordSetBlank<WithCreate> defineSrvRecordSet(String name);
/**
* Specifies definition of a TXT record set.
*
* @param name the name of the TXT record set
* @return the stage representing configuration for the TXT record set
*/
DnsRecordSet.DefinitionStages.TxtRecordSetBlank<WithCreate> defineTxtRecordSet(String name);
}
/**
* The stage of the definition which contains all the minimum required inputs for the resource to be created
* (via {@link WithCreate#create()}), but also allows for any other optional settings to be specified.
*/
interface WithCreate extends
Creatable<DnsZone>,
DefinitionStages.WithRecordSet,
Resource.DefinitionWithTags<WithCreate> {
}
}
/**
* Grouping of DNS zone update stages.
*/
interface UpdateStages {
/**
* The stage of the DNS zone update allowing to specify record set.
*/
interface WithRecordSet {
/**
* Specifies definition of an A record set to be attached to the DNS zone.
*
* @param name name of the A record set
* @return the stage representing configuration for the A record set
*/
DnsRecordSet.UpdateDefinitionStages.ARecordSetBlank<Update> defineARecordSet(String name);
/**
* Specifies definition of an AAAA record set to be attached to the DNS zone.
*
* @param name name of the AAAA record set
* @return the stage representing configuration for the AAAA record set
*/
DnsRecordSet.UpdateDefinitionStages.AaaaRecordSetBlank<Update> defineAaaaRecordSet(String name);
/**
* Specifies definition of a CNAME record set to be attached to the DNS zone.
*
* @param name name of the CNAME record set
* @param alias the CNAME record alias
* @return the next stage of DNS zone definition
*/
Update withCNameRecordSet(String name, String alias);
/**
* Specifies definition of a MX record set to be attached to the DNS zone.
*
* @param name name of the MX record set
* @return the stage representing configuration for the MX record set
*/
DnsRecordSet.UpdateDefinitionStages.MXRecordSetBlank<Update> defineMXRecordSet(String name);
/**
* Specifies definition of an NS record set to be attached to the DNS zone.
*
* @param name name of the NS record set
* @return the stage representing configuration for the NS record set
*/
DnsRecordSet.UpdateDefinitionStages.NSRecordSetBlank<Update> defineNSRecordSet(String name);
/**
* Specifies definition of a PTR record set to be attached to the DNS zone.
*
* @param name name of the PTR record set
* @return the stage representing configuration for the PTR record set
*/
DnsRecordSet.UpdateDefinitionStages.PtrRecordSetBlank<Update> definePtrRecordSet(String name);
/**
* Specifies definition of a SRV record set to be attached to the DNS zone.
*
* @param name the name of the SRV record set
* @return the stage representing configuration for the SRV record set
*/
DnsRecordSet.UpdateDefinitionStages.SrvRecordSetBlank<Update> defineSrvRecordSet(String name);
/**
* Specifies definition of a TXT record set to be attached to the DNS zone.
*
* @param name the name of the TXT record set
* @return the stage representing configuration for the TXT record set
*/
DnsRecordSet.UpdateDefinitionStages.TxtRecordSetBlank<Update> defineTxtRecordSet(String name);
/**
* Begins the description of an update of an existing A record set in this DNS zone.
*
* @param name name of the A record set
* @return the stage representing configuration for the A record set
*/
DnsRecordSet.UpdateARecordSet updateARecordSet(String name);
/**
* Begins the description of an update of an existing AAAA record set in this DNS zone.
*
* @param name name of the AAAA record set
* @return the stage representing configuration for the AAAA record set
*/
DnsRecordSet.UpdateAaaaRecordSet updateAaaaRecordSet(String name);
/**
* Begins the description of an update of an existing MX record set in this DNS zone.
*
* @param name name of the MX record set
* @return the stage representing configuration for the MX record set
*/
DnsRecordSet.UpdateMXRecordSet updateMXRecordSet(String name);
/**
* Begins the description of an update of an existing NS record set in this DNS zone.
*
* @param name name of the NS record set
* @return the stage representing configuration for the NS record set
*/
DnsRecordSet.UpdateNSRecordSet updateNSRecordSet(String name);
/**
* Begins the description of an update of an existing PTR record set in this DNS zone.
*
* @param name name of the PTR record set
* @return the stage representing configuration for the PTR record set
*/
DnsRecordSet.UpdatePtrRecordSet updatePtrRecordSet(String name);
/**
* Begins the description of an update of an existing SRV record set in this DNS zone.
*
* @param name the name of the SRV record set
* @return the stage representing configuration for the SRV record set
*/
DnsRecordSet.UpdateSrvRecordSet updateSrvRecordSet(String name);
/**
* Begins the description of an update of an existing TXT record set in this DNS zone.
*
* @param name the name of the TXT record set
* @return the stage representing configuration for the TXT record set
*/
DnsRecordSet.UpdateTxtRecordSet updateTxtRecordSet(String name);
/**
* Begins the description of an update of the SOA record in this DNS zone.
*
* @return the stage representing configuration for the TXT record set
*/
DnsRecordSet.UpdateSoaRecord updateSoaRecord();
/**
* Removes a A record set in the DNS zone.
*
* @param name name of the A record set
* @return the next stage of DNS zone update
*/
Update withoutARecordSet(String name);
/**
* Removes a AAAA record set in the DNS zone.
*
* @param name name of the AAAA record set
* @return the next stage of DNS zone update
*/
Update withoutAaaaRecordSet(String name);
/**
* Removes a CNAME record set in the DNS zone.
*
* @param name name of the CNAME record set
* @return the next stage of DNS zone update
*/
Update withoutCNameRecordSet(String name);
/**
* Removes a MX record set in the DNS zone.
*
* @param name name of the MX record set
* @return the next stage of DNS zone update
*/
Update withoutMXRecordSet(String name);
/**
* Removes a NS record set in the DNS zone.
*
* @param name name of the NS record set
* @return the next stage of DNS zone update
*/
Update withoutNSRecordSet(String name);
/**
* Removes a PTR record set in the DNS zone.
*
* @param name name of the PTR record set
* @return the next stage of DNS zone update
*/
Update withoutPtrRecordSet(String name);
/**
* Removes a SRV record set in the DNS zone.
*
* @param name name of the SRV record set
* @return the next stage of DNS zone update
*/
Update withoutSrvRecordSet(String name);
/**
* Removes a TXT record set in the DNS zone.
*
* @param name name of the TXT record set
* @return the next stage of DNS zone update
*/
Update withoutTxtRecordSet(String name);
}
}
/**
* The template for an update operation, containing all the settings that can be modified.
* <p>
* Call {@link Update#apply()} to apply the changes to the resource in Azure.
*/
interface Update extends
Appliable<DnsZone>,
UpdateStages.WithRecordSet,
Resource.UpdateWithTags<Update> {
}
}