gpt4 book ai didi

com.google.cloud.dns.ZoneInfo.getDnsName()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:21:36 27 4
gpt4 key购买 nike

本文整理了Java中com.google.cloud.dns.ZoneInfo.getDnsName()方法的一些代码示例,展示了ZoneInfo.getDnsName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneInfo.getDnsName()方法的具体详情如下:
包路径:com.google.cloud.dns.ZoneInfo
类名称:ZoneInfo
方法名:getDnsName

ZoneInfo.getDnsName介绍

[英]Returns the DNS name of this zone, for instance "example.com.".
[中]返回此区域的DNS名称,例如“example.com”。

代码示例

代码示例来源:origin: googleapis/google-cloud-java

@Override
 public String toString() {
  return MoreObjects.toStringHelper(this)
    .add("name", getName())
    .add("generatedId", getGeneratedId())
    .add("description", getDescription())
    .add("dnsName", getDnsName())
    .add("nameServerSet", getNameServerSet())
    .add("nameServers", getNameServers())
    .add("creationTimeMillis", getCreationTimeMillis())
    .toString();
 }
}

代码示例来源:origin: googleapis/google-cloud-java

ManagedZone toPb() {
 ManagedZone pb = new ManagedZone();
 pb.setDescription(this.getDescription());
 pb.setDnsName(this.getDnsName());
 if (this.getGeneratedId() != null) {
  pb.setId(new BigInteger(this.getGeneratedId()));
 }
 pb.setName(this.getName());
 pb.setNameServers(this.nameServers); // do use real attribute value which may be null
 pb.setNameServerSet(this.getNameServerSet());
 if (this.getCreationTimeMillis() != null) {
  pb.setCreationTime(
    DATE_TIME_FORMATTER.format(Instant.ofEpochMilli(this.getCreationTimeMillis())));
 }
 return pb;
}

代码示例来源:origin: googleapis/google-cloud-java

@Test
public void testBuilder() {
 assertEquals(3, INFO.getNameServers().size());
 assertEquals(NS1, INFO.getNameServers().get(0));
 assertEquals(NS2, INFO.getNameServers().get(1));
 assertEquals(NS3, INFO.getNameServers().get(2));
 assertEquals(NAME, INFO.getName());
 assertEquals(GENERATED_ID, INFO.getGeneratedId());
 assertEquals(CREATION_TIME_MILLIS, INFO.getCreationTimeMillis());
 assertEquals(NAME_SERVER_SET, INFO.getNameServerSet());
 assertEquals(DESCRIPTION, INFO.getDescription());
 assertEquals(DNS_NAME, INFO.getDnsName());
}

代码示例来源:origin: googleapis/google-cloud-java

@Test
public void testOf() {
 ZoneInfo partial = ZoneInfo.of(NAME, DNS_NAME, DESCRIPTION);
 assertTrue(partial.getNameServers().isEmpty());
 assertEquals(NAME, partial.getName());
 assertNull(partial.getGeneratedId());
 assertNull(partial.getCreationTimeMillis());
 assertNull(partial.getNameServerSet());
 assertEquals(DESCRIPTION, partial.getDescription());
 assertEquals(DNS_NAME, partial.getDnsName());
}

代码示例来源:origin: googleapis/google-cloud-java

DNS.listZones(Dns.ZoneListOption.dnsName(ZONE1.getDnsName()))
      .iterateAll()
      .iterator());
      Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
      Dns.ZoneListOption.fields(ZoneField.ZONE_ID))
    .iterateAll()
zoneIterator =
  DNS.listZones(
      Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
      Dns.ZoneListOption.fields(ZoneField.CREATION_TIME))
    .iterateAll()
zoneIterator =
  DNS.listZones(
      Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
      Dns.ZoneListOption.fields(ZoneField.DNS_NAME))
    .iterateAll()
zoneIterator =
  DNS.listZones(
      Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
      Dns.ZoneListOption.fields(ZoneField.DESCRIPTION))
    .iterateAll()
zoneIterator =
  DNS.listZones(
      Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),

代码示例来源:origin: googleapis/google-cloud-java

DnsBatchResult<Page<Zone>> nameError = batch.listZones(Dns.ZoneListOption.dnsName("aaaaa"));
DnsBatchResult<Page<Zone>> okName =
  batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.getDnsName()));
DnsBatchResult<Page<Zone>> idResult =
  batch.listZones(
    Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
    Dns.ZoneListOption.fields(ZoneField.ZONE_ID));
DnsBatchResult<Page<Zone>> timeResult =
  batch.listZones(
    Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
    Dns.ZoneListOption.fields(ZoneField.CREATION_TIME));
DnsBatchResult<Page<Zone>> dnsNameResult =
  batch.listZones(
    Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
    Dns.ZoneListOption.fields(ZoneField.DNS_NAME));
DnsBatchResult<Page<Zone>> descriptionResult =
  batch.listZones(
    Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
    Dns.ZoneListOption.fields(ZoneField.DESCRIPTION));
DnsBatchResult<Page<Zone>> nameServersResult =
  batch.listZones(
    Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
    Dns.ZoneListOption.fields(ZoneField.NAME_SERVERS));
DnsBatchResult<Page<Zone>> nameServerSetResult =
  batch.listZones(
    Dns.ZoneListOption.dnsName(ZONE1.getDnsName()),
    Dns.ZoneListOption.fields(ZoneField.NAME_SERVER_SET));
DnsBatchResult<Page<Zone>> combinationResult =

代码示例来源:origin: googleapis/google-cloud-java

@Test
public void testCreateValidZone() {
 try {
  Zone created = DNS.create(ZONE1);
  assertEquals(ZONE1.getDescription(), created.getDescription());
  assertEquals(ZONE1.getDnsName(), created.getDnsName());
  assertEquals(ZONE1.getName(), created.getName());
  assertNotNull(created.getCreationTimeMillis());
  assertNotNull(created.getNameServers());
  assertNull(created.getNameServerSet());
  assertNotNull(created.getGeneratedId());
  Zone retrieved = DNS.getZone(ZONE1.getName());
  assertEquals(created, retrieved);
  created = DNS.create(ZONE_EMPTY_DESCRIPTION);
  assertEquals(ZONE_EMPTY_DESCRIPTION.getDescription(), created.getDescription());
  assertEquals(ZONE_EMPTY_DESCRIPTION.getDnsName(), created.getDnsName());
  assertEquals(ZONE_EMPTY_DESCRIPTION.getName(), created.getName());
  assertNotNull(created.getCreationTimeMillis());
  assertNotNull(created.getNameServers());
  assertNull(created.getNameServerSet());
  assertNotNull(created.getGeneratedId());
  retrieved = DNS.getZone(ZONE_EMPTY_DESCRIPTION.getName());
  assertEquals(created, retrieved);
 } finally {
  DNS.delete(ZONE1.getName());
  DNS.delete(ZONE_EMPTY_DESCRIPTION.getName());
 }
}

代码示例来源:origin: googleapis/google-cloud-java

assertEquals(ZONE1.getDnsName(), zoneResult.get().getDnsName());
assertEquals(ZONE1.getDescription(), zoneResult.get().getDescription());
assertFalse(zoneResult.get().getNameServers().isEmpty());

代码示例来源:origin: googleapis/google-cloud-java

Zone created = completeZoneResult.get();
assertEquals(ZONE1.getDescription(), created.getDescription());
assertEquals(ZONE1.getDnsName(), created.getDnsName());
assertEquals(ZONE1.getName(), created.getName());
assertNotNull(created.getCreationTimeMillis());
created = partialZoneResult.get();
assertEquals(ZONE_EMPTY_DESCRIPTION.getDescription(), created.getDescription());
assertEquals(ZONE_EMPTY_DESCRIPTION.getDnsName(), created.getDnsName());
assertEquals(ZONE_EMPTY_DESCRIPTION.getName(), created.getName());
assertNotNull(created.getCreationTimeMillis());

代码示例来源:origin: googleapis/google-cloud-java

assertEquals(ZONE1.getDnsName(), created.getDnsName());
assertNull(created.getDescription());

代码示例来源:origin: googleapis/google-cloud-java

assertEquals(ZONE1.getDnsName(), created.getDnsName());
assertNull(created.getDescription());

代码示例来源:origin: googleapis/google-cloud-java

assertEquals(ZONE1.getDnsName(), created.getDnsName());
assertNull(created.getDescription());

代码示例来源:origin: googleapis/google-cloud-java

assertEquals(ZONE1.getDnsName(), created.getDnsName());
assertNull(created.getDescription());

代码示例来源:origin: com.google.cloud/google-cloud-dns

/**
 * Returns the DNS name of this zone, for instance "example.com.".
 */
@Deprecated
public String dnsName() {
 return getDnsName();
}

代码示例来源:origin: com.google.cloud/google-cloud-dns

@Override
 public String toString() {
  return MoreObjects.toStringHelper(this)
    .add("name", getName())
    .add("generatedId", getGeneratedId())
    .add("description", getDescription())
    .add("dnsName", getDnsName())
    .add("nameServerSet", getNameServerSet())
    .add("nameServers", getNameServers())
    .add("creationTimeMillis", getCreationTimeMillis())
    .toString();
 }
}

代码示例来源:origin: com.google.cloud/google-cloud-dns

ManagedZone toPb() {
 ManagedZone pb =
   new ManagedZone();
 pb.setDescription(this.getDescription());
 pb.setDnsName(this.getDnsName());
 if (this.getGeneratedId() != null) {
  pb.setId(new BigInteger(this.getGeneratedId()));
 }
 pb.setName(this.getName());
 pb.setNameServers(this.nameServers); // do use real attribute value which may be null
 pb.setNameServerSet(this.getNameServerSet());
 if (this.getCreationTimeMillis() != null) {
  pb.setCreationTime(ISODateTimeFormat.dateTime()
    .withZoneUTC()
    .print(this.getCreationTimeMillis()));
 }
 return pb;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com