Class NamedValueCreateContract
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.apimanagement.models.NamedValueCreateContract
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class NamedValueCreateContract
extends com.azure.core.management.ProxyResource
NamedValue details.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of NamedValueCreateContract class. -
Method Summary
Modifier and TypeMethodDescriptionGet the displayName property: Unique name of NamedValue.static NamedValueCreateContractfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of NamedValueCreateContract from the JsonReader.id()Get the id property: Fully qualified resource Id for the resource.keyVault()Get the keyVault property: KeyVault location details of the namedValue.name()Get the name property: The name of the resource.secret()Get the secret property: Determines whether the value is a secret and should be encrypted or not.tags()Get the tags property: Optional tags that when provided can be used to filter the NamedValue list.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of the resource.voidvalidate()Validates the instance.value()Get the value property: Value of the NamedValue.withDisplayName(String displayName) Set the displayName property: Unique name of NamedValue.withKeyVault(KeyVaultContractCreateProperties keyVault) Set the keyVault property: KeyVault location details of the namedValue.withSecret(Boolean secret) Set the secret property: Determines whether the value is a secret and should be encrypted or not.Set the tags property: Optional tags that when provided can be used to filter the NamedValue list.Set the value property: Value of the NamedValue.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
NamedValueCreateContract
public NamedValueCreateContract()Creates an instance of NamedValueCreateContract class.
-
-
Method Details
-
type
Get the type property: The type of the resource.- Overrides:
typein classcom.azure.core.management.ProxyResource- Returns:
- the type value.
-
name
Get the name property: The name of the resource.- Overrides:
namein classcom.azure.core.management.ProxyResource- Returns:
- the name value.
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
idin classcom.azure.core.management.ProxyResource- Returns:
- the id value.
-
displayName
Get the displayName property: Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.- Parameters:
displayName- the displayName value to set.- Returns:
- the NamedValueCreateContract object itself.
-
value
Get the value property: Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Returns:
- the value value.
-
withValue
Set the value property: Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Parameters:
value- the value value to set.- Returns:
- the NamedValueCreateContract object itself.
-
keyVault
Get the keyVault property: KeyVault location details of the namedValue.- Returns:
- the keyVault value.
-
withKeyVault
Set the keyVault property: KeyVault location details of the namedValue.- Parameters:
keyVault- the keyVault value to set.- Returns:
- the NamedValueCreateContract object itself.
-
tags
Get the tags property: Optional tags that when provided can be used to filter the NamedValue list.- Returns:
- the tags value.
-
withTags
Set the tags property: Optional tags that when provided can be used to filter the NamedValue list.- Parameters:
tags- the tags value to set.- Returns:
- the NamedValueCreateContract object itself.
-
secret
Get the secret property: Determines whether the value is a secret and should be encrypted or not. Default value is false.- Returns:
- the secret value.
-
withSecret
Set the secret property: Determines whether the value is a secret and should be encrypted or not. Default value is false.- Parameters:
secret- the secret value to set.- Returns:
- the NamedValueCreateContract object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>- Overrides:
toJsonin classcom.azure.core.management.ProxyResource- Throws:
IOException
-
fromJson
public static NamedValueCreateContract fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of NamedValueCreateContract from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of NamedValueCreateContract if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the NamedValueCreateContract.
-