diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 60c849290ef0..7feee66432ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2022-07-28) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index c456e0cf3e79..86ea3f5cbf86 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-appcontainers - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index a863135771ff..90b2f7d279d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -433,6 +433,21 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json + */ + /** + * Sample code: Analyse Custom Hostname Error Response. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void analyseCustomHostnameErrorResponse( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", Context.NONE); + } + /* * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java index 2cda5dd69c19..63cdd1c776f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java @@ -243,7 +243,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java index 612f3c3383d7..933adc355602 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java @@ -5,46 +5,82 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; +import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Custom domain analysis. */ @Fluent -public final class CustomHostnameAnalysisResultInner extends ProxyResource { +public final class CustomHostnameAnalysisResultInner { /* - * CustomHostnameAnalysisResult resource specific properties + * Host name that was analyzed */ - @JsonProperty(value = "properties") - private CustomHostnameAnalysisResultProperties innerProperties; + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * true if hostname is already verified; otherwise, + * false. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHostnameAlreadyVerified; - /** - * Get the innerProperties property: CustomHostnameAnalysisResult resource specific properties. - * - * @return the innerProperties value. + /* + * DNS verification test result. */ - private CustomHostnameAnalysisResultProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) + private DnsVerificationTestResult customDomainVerificationTest; - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + /* + * Raw failure information if DNS verification fails. */ - public SystemData systemData() { - return this.systemData; - } + @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) + private CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo; + + /* + * true if there is a conflict on the Container App's managed + * environment; otherwise, false. + */ + @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictOnManagedEnvironment; + + /* + * Name of the conflicting Container App on the Managed Environment if it's + * within the same subscription. + */ + @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String conflictingContainerAppResourceId; + + /* + * CName records visible for this hostname. + */ + @JsonProperty(value = "cNameRecords") + private List cNameRecords; + + /* + * TXT records visible for this hostname. + */ + @JsonProperty(value = "txtRecords") + private List txtRecords; + + /* + * A records visible for this hostname. + */ + @JsonProperty(value = "aRecords") + private List aRecords; + + /* + * Alternate CName records visible for this hostname. + */ + @JsonProperty(value = "alternateCNameRecords") + private List alternateCNameRecords; + + /* + * Alternate TXT records visible for this hostname. + */ + @JsonProperty(value = "alternateTxtRecords") + private List alternateTxtRecords; /** * Get the hostname property: Host name that was analyzed. @@ -52,7 +88,7 @@ public SystemData systemData() { * @return the hostname value. */ public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + return this.hostname; } /** @@ -62,7 +98,7 @@ public String hostname() { * @return the isHostnameAlreadyVerified value. */ public Boolean isHostnameAlreadyVerified() { - return this.innerProperties() == null ? null : this.innerProperties().isHostnameAlreadyVerified(); + return this.isHostnameAlreadyVerified; } /** @@ -71,7 +107,7 @@ public Boolean isHostnameAlreadyVerified() { * @return the customDomainVerificationTest value. */ public DnsVerificationTestResult customDomainVerificationTest() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationTest(); + return this.customDomainVerificationTest; } /** @@ -79,8 +115,8 @@ public DnsVerificationTestResult customDomainVerificationTest() { * * @return the customDomainVerificationFailureInfo value. */ - public DefaultErrorResponseError customDomainVerificationFailureInfo() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationFailureInfo(); + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; } /** @@ -90,7 +126,7 @@ public DefaultErrorResponseError customDomainVerificationFailureInfo() { * @return the hasConflictOnManagedEnvironment value. */ public Boolean hasConflictOnManagedEnvironment() { - return this.innerProperties() == null ? null : this.innerProperties().hasConflictOnManagedEnvironment(); + return this.hasConflictOnManagedEnvironment; } /** @@ -100,7 +136,7 @@ public Boolean hasConflictOnManagedEnvironment() { * @return the conflictingContainerAppResourceId value. */ public String conflictingContainerAppResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().conflictingContainerAppResourceId(); + return this.conflictingContainerAppResourceId; } /** @@ -109,7 +145,7 @@ public String conflictingContainerAppResourceId() { * @return the cNameRecords value. */ public List cNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().cNameRecords(); + return this.cNameRecords; } /** @@ -119,10 +155,7 @@ public List cNameRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withCNameRecords(cNameRecords); + this.cNameRecords = cNameRecords; return this; } @@ -132,7 +165,7 @@ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameReco * @return the txtRecords value. */ public List txtRecords() { - return this.innerProperties() == null ? null : this.innerProperties().txtRecords(); + return this.txtRecords; } /** @@ -142,10 +175,7 @@ public List txtRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withTxtRecords(txtRecords); + this.txtRecords = txtRecords; return this; } @@ -155,7 +185,7 @@ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) * @return the aRecords value. */ public List aRecords() { - return this.innerProperties() == null ? null : this.innerProperties().aRecords(); + return this.aRecords; } /** @@ -165,10 +195,7 @@ public List aRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withARecords(aRecords); + this.aRecords = aRecords; return this; } @@ -178,7 +205,7 @@ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { * @return the alternateCNameRecords value. */ public List alternateCNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().alternateCNameRecords(); + return this.alternateCNameRecords; } /** @@ -188,10 +215,7 @@ public List alternateCNameRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withAlternateCNameRecords(alternateCNameRecords); + this.alternateCNameRecords = alternateCNameRecords; return this; } @@ -201,7 +225,7 @@ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List * @return the alternateTxtRecords value. */ public List alternateTxtRecords() { - return this.innerProperties() == null ? null : this.innerProperties().alternateTxtRecords(); + return this.alternateTxtRecords; } /** @@ -211,10 +235,7 @@ public List alternateTxtRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withAlternateTxtRecords(alternateTxtRecords); + this.alternateTxtRecords = alternateTxtRecords; return this; } @@ -224,8 +245,8 @@ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List al * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (customDomainVerificationFailureInfo() != null) { + customDomainVerificationFailureInfo().validate(); } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java deleted file mode 100644 index c567bf14bcfd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** CustomHostnameAnalysisResult resource specific properties. */ -@Fluent -public final class CustomHostnameAnalysisResultProperties { - /* - * Host name that was analyzed - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * true if hostname is already verified; otherwise, - * false. - */ - @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isHostnameAlreadyVerified; - - /* - * DNS verification test result. - */ - @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) - private DnsVerificationTestResult customDomainVerificationTest; - - /* - * Raw failure information if DNS verification fails. - */ - @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) - private DefaultErrorResponseError customDomainVerificationFailureInfo; - - /* - * true if there is a conflict on the Container App's managed - * environment; otherwise, false. - */ - @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasConflictOnManagedEnvironment; - - /* - * Name of the conflicting Container App on the Managed Environment if it's - * within the same subscription. - */ - @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String conflictingContainerAppResourceId; - - /* - * CName records visible for this hostname. - */ - @JsonProperty(value = "cNameRecords") - private List cNameRecords; - - /* - * TXT records visible for this hostname. - */ - @JsonProperty(value = "txtRecords") - private List txtRecords; - - /* - * A records visible for this hostname. - */ - @JsonProperty(value = "aRecords") - private List aRecords; - - /* - * Alternate CName records visible for this hostname. - */ - @JsonProperty(value = "alternateCNameRecords") - private List alternateCNameRecords; - - /* - * Alternate TXT records visible for this hostname. - */ - @JsonProperty(value = "alternateTxtRecords") - private List alternateTxtRecords; - - /** - * Get the hostname property: Host name that was analyzed. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; - * otherwise, <code>false</code>. - * - * @return the isHostnameAlreadyVerified value. - */ - public Boolean isHostnameAlreadyVerified() { - return this.isHostnameAlreadyVerified; - } - - /** - * Get the customDomainVerificationTest property: DNS verification test result. - * - * @return the customDomainVerificationTest value. - */ - public DnsVerificationTestResult customDomainVerificationTest() { - return this.customDomainVerificationTest; - } - - /** - * Get the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * - * @return the customDomainVerificationFailureInfo value. - */ - public DefaultErrorResponseError customDomainVerificationFailureInfo() { - return this.customDomainVerificationFailureInfo; - } - - /** - * Get the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the - * Container App's managed environment; otherwise, <code>false</code>. - * - * @return the hasConflictOnManagedEnvironment value. - */ - public Boolean hasConflictOnManagedEnvironment() { - return this.hasConflictOnManagedEnvironment; - } - - /** - * Get the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed - * Environment if it's within the same subscription. - * - * @return the conflictingContainerAppResourceId value. - */ - public String conflictingContainerAppResourceId() { - return this.conflictingContainerAppResourceId; - } - - /** - * Get the cNameRecords property: CName records visible for this hostname. - * - * @return the cNameRecords value. - */ - public List cNameRecords() { - return this.cNameRecords; - } - - /** - * Set the cNameRecords property: CName records visible for this hostname. - * - * @param cNameRecords the cNameRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withCNameRecords(List cNameRecords) { - this.cNameRecords = cNameRecords; - return this; - } - - /** - * Get the txtRecords property: TXT records visible for this hostname. - * - * @return the txtRecords value. - */ - public List txtRecords() { - return this.txtRecords; - } - - /** - * Set the txtRecords property: TXT records visible for this hostname. - * - * @param txtRecords the txtRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withTxtRecords(List txtRecords) { - this.txtRecords = txtRecords; - return this; - } - - /** - * Get the aRecords property: A records visible for this hostname. - * - * @return the aRecords value. - */ - public List aRecords() { - return this.aRecords; - } - - /** - * Set the aRecords property: A records visible for this hostname. - * - * @param aRecords the aRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withARecords(List aRecords) { - this.aRecords = aRecords; - return this; - } - - /** - * Get the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @return the alternateCNameRecords value. - */ - public List alternateCNameRecords() { - return this.alternateCNameRecords; - } - - /** - * Set the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @param alternateCNameRecords the alternateCNameRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withAlternateCNameRecords(List alternateCNameRecords) { - this.alternateCNameRecords = alternateCNameRecords; - return this; - } - - /** - * Get the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @return the alternateTxtRecords value. - */ - public List alternateTxtRecords() { - return this.alternateTxtRecords; - } - - /** - * Set the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @param alternateTxtRecords the alternateTxtRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withAlternateTxtRecords(List alternateTxtRecords) { - this.alternateTxtRecords = alternateTxtRecords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainVerificationFailureInfo() != null) { - customDomainVerificationFailureInfo().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java index fb9b87b4236c..f7ff9f2caa45 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java @@ -4,10 +4,9 @@ package com.azure.resourcemanager.appcontainers.implementation; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; +import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; import java.util.Collections; import java.util.List; @@ -24,22 +23,6 @@ public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAna this.serviceManager = serviceManager; } - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String hostname() { return this.innerModel().hostname(); } @@ -52,7 +35,7 @@ public DnsVerificationTestResult customDomainVerificationTest() { return this.innerModel().customDomainVerificationTest(); } - public DefaultErrorResponseError customDomainVerificationFailureInfo() { + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { return this.innerModel().customDomainVerificationFailureInfo(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java index b2d9b4e1aa66..74303340899f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java @@ -4,40 +4,11 @@ package com.azure.resourcemanager.appcontainers.models; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import java.util.List; /** An immutable client-side representation of CustomHostnameAnalysisResult. */ public interface CustomHostnameAnalysisResult { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the hostname property: Host name that was analyzed. * @@ -65,7 +36,7 @@ public interface CustomHostnameAnalysisResult { * * @return the customDomainVerificationFailureInfo value. */ - DefaultErrorResponseError customDomainVerificationFailureInfo(); + CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo(); /** * Gets the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java new file mode 100644 index 000000000000..c7f5329111ba --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Raw failure information if DNS verification fails. */ +@Fluent +public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { + /* + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /* + * Details or the error + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the code property: Standardized string to programmatically identify the error. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: Detailed error description and debugging information. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the target property: Detailed error description and debugging information. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Get the details property: Details or the error. + * + * @return the details value. + */ + public List details() { + return this.details; + } + + /** + * Set the details property: Details or the error. + * + * @param details the details value to set. + * @return the CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo object itself. + */ + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo withDetails( + List details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (details() != null) { + details().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java new file mode 100644 index 000000000000..ee0e6e680a03 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Detailed errors. */ +@Immutable +public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { + /* + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * Get the code property: Standardized string to programmatically identify the error. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: Detailed error description and debugging information. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the target property: Detailed error description and debugging information. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java index 068b95ab5637..93fdb9b357c3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java @@ -12,8 +12,8 @@ public final class VnetConfiguration { /* * Boolean indicating the environment only has an internal load balancer. - * These environments do not have a public static IP resource, must provide - * ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this + * These environments do not have a public static IP resource. They must + * provide runtimeSubnetId and infrastructureSubnetId if enabling this * property */ @JsonProperty(value = "internal") @@ -60,8 +60,8 @@ public final class VnetConfiguration { /** * Get the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and - * AppSubnetResourceId if enabling this property. + * environments do not have a public static IP resource. They must provide runtimeSubnetId and + * infrastructureSubnetId if enabling this property. * * @return the internal value. */ @@ -71,8 +71,8 @@ public Boolean internal() { /** * Set the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and - * AppSubnetResourceId if enabling this property. + * environments do not have a public static IP resource. They must provide runtimeSubnetId and + * infrastructureSubnetId if enabling this property. * * @param internal the internal value to set. * @return the VnetConfiguration object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java index a0f775c3c2b3..2b4284e90726 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -8,6 +8,21 @@ /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json + */ + /** + * Sample code: Analyse Custom Hostname Error Response. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void analyseCustomHostnameErrorResponse( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", Context.NONE); + } + /* * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json */