
com.azure.resourcemanager.appcontainers.models.ContainerAppSecret Maven / Gradle / Ivy
// 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.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Container App Secret.
*/
@Immutable
public final class ContainerAppSecret implements JsonSerializable {
/*
* Secret Name.
*/
private String name;
/*
* Secret Value.
*/
private String value;
/*
* Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned
* identity.
*/
private String identity;
/*
* Azure Key Vault URL pointing to the secret referenced by the container app.
*/
private String keyVaultUrl;
/**
* Creates an instance of ContainerAppSecret class.
*/
public ContainerAppSecret() {
}
/**
* Get the name property: Secret Name.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Get the value property: Secret Value.
*
* @return the value value.
*/
public String value() {
return this.value;
}
/**
* Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to
* use a system-assigned identity.
*
* @return the identity value.
*/
public String identity() {
return this.identity;
}
/**
* Get the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app.
*
* @return the keyVaultUrl value.
*/
public String keyVaultUrl() {
return this.keyVaultUrl;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ContainerAppSecret from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ContainerAppSecret if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
* @throws IOException If an error occurs while reading the ContainerAppSecret.
*/
public static ContainerAppSecret fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ContainerAppSecret deserializedContainerAppSecret = new ContainerAppSecret();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
deserializedContainerAppSecret.name = reader.getString();
} else if ("value".equals(fieldName)) {
deserializedContainerAppSecret.value = reader.getString();
} else if ("identity".equals(fieldName)) {
deserializedContainerAppSecret.identity = reader.getString();
} else if ("keyVaultUrl".equals(fieldName)) {
deserializedContainerAppSecret.keyVaultUrl = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedContainerAppSecret;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy