com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-azurestackhci Show documentation
Show all versions of azure-resourcemanager-azurestackhci Show documentation
This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2024-04.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.azurestackhci.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState;
import com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails;
import com.azure.resourcemanager.azurestackhci.models.PerNodeState;
import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
import java.io.IOException;
import java.util.List;
/**
* ArcSetting properties.
*/
@Fluent
public final class ArcSettingProperties implements JsonSerializable {
/*
* Provisioning state of the ArcSetting proxy resource.
*/
private ProvisioningState provisioningState;
/*
* The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources.
*/
private String arcInstanceResourceGroup;
/*
* App id of arc AAD identity.
*/
private String arcApplicationClientId;
/*
* Tenant id of arc AAD identity.
*/
private String arcApplicationTenantId;
/*
* Object id of arc AAD service principal.
*/
private String arcServicePrincipalObjectId;
/*
* Object id of arc AAD identity.
*/
private String arcApplicationObjectId;
/*
* Aggregate state of Arc agent across the nodes in this HCI cluster.
*/
private ArcSettingAggregateState aggregateState;
/*
* State of Arc agent in each of the nodes.
*/
private List perNodeDetails;
/*
* contains connectivity related configuration for ARC resources
*/
private Object connectivityProperties;
/*
* Properties for each of the default extensions category
*/
private List defaultExtensions;
/**
* Creates an instance of ArcSettingProperties class.
*/
public ArcSettingProperties() {
}
/**
* Get the provisioningState property: Provisioning state of the ArcSetting proxy resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* Get the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute
* Machine resources.
*
* @return the arcInstanceResourceGroup value.
*/
public String arcInstanceResourceGroup() {
return this.arcInstanceResourceGroup;
}
/**
* Set the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute
* Machine resources.
*
* @param arcInstanceResourceGroup the arcInstanceResourceGroup value to set.
* @return the ArcSettingProperties object itself.
*/
public ArcSettingProperties withArcInstanceResourceGroup(String arcInstanceResourceGroup) {
this.arcInstanceResourceGroup = arcInstanceResourceGroup;
return this;
}
/**
* Get the arcApplicationClientId property: App id of arc AAD identity.
*
* @return the arcApplicationClientId value.
*/
public String arcApplicationClientId() {
return this.arcApplicationClientId;
}
/**
* Set the arcApplicationClientId property: App id of arc AAD identity.
*
* @param arcApplicationClientId the arcApplicationClientId value to set.
* @return the ArcSettingProperties object itself.
*/
public ArcSettingProperties withArcApplicationClientId(String arcApplicationClientId) {
this.arcApplicationClientId = arcApplicationClientId;
return this;
}
/**
* Get the arcApplicationTenantId property: Tenant id of arc AAD identity.
*
* @return the arcApplicationTenantId value.
*/
public String arcApplicationTenantId() {
return this.arcApplicationTenantId;
}
/**
* Set the arcApplicationTenantId property: Tenant id of arc AAD identity.
*
* @param arcApplicationTenantId the arcApplicationTenantId value to set.
* @return the ArcSettingProperties object itself.
*/
public ArcSettingProperties withArcApplicationTenantId(String arcApplicationTenantId) {
this.arcApplicationTenantId = arcApplicationTenantId;
return this;
}
/**
* Get the arcServicePrincipalObjectId property: Object id of arc AAD service principal.
*
* @return the arcServicePrincipalObjectId value.
*/
public String arcServicePrincipalObjectId() {
return this.arcServicePrincipalObjectId;
}
/**
* Set the arcServicePrincipalObjectId property: Object id of arc AAD service principal.
*
* @param arcServicePrincipalObjectId the arcServicePrincipalObjectId value to set.
* @return the ArcSettingProperties object itself.
*/
public ArcSettingProperties withArcServicePrincipalObjectId(String arcServicePrincipalObjectId) {
this.arcServicePrincipalObjectId = arcServicePrincipalObjectId;
return this;
}
/**
* Get the arcApplicationObjectId property: Object id of arc AAD identity.
*
* @return the arcApplicationObjectId value.
*/
public String arcApplicationObjectId() {
return this.arcApplicationObjectId;
}
/**
* Set the arcApplicationObjectId property: Object id of arc AAD identity.
*
* @param arcApplicationObjectId the arcApplicationObjectId value to set.
* @return the ArcSettingProperties object itself.
*/
public ArcSettingProperties withArcApplicationObjectId(String arcApplicationObjectId) {
this.arcApplicationObjectId = arcApplicationObjectId;
return this;
}
/**
* Get the aggregateState property: Aggregate state of Arc agent across the nodes in this HCI cluster.
*
* @return the aggregateState value.
*/
public ArcSettingAggregateState aggregateState() {
return this.aggregateState;
}
/**
* Get the perNodeDetails property: State of Arc agent in each of the nodes.
*
* @return the perNodeDetails value.
*/
public List perNodeDetails() {
return this.perNodeDetails;
}
/**
* Get the connectivityProperties property: contains connectivity related configuration for ARC resources.
*
* @return the connectivityProperties value.
*/
public Object connectivityProperties() {
return this.connectivityProperties;
}
/**
* Set the connectivityProperties property: contains connectivity related configuration for ARC resources.
*
* @param connectivityProperties the connectivityProperties value to set.
* @return the ArcSettingProperties object itself.
*/
public ArcSettingProperties withConnectivityProperties(Object connectivityProperties) {
this.connectivityProperties = connectivityProperties;
return this;
}
/**
* Get the defaultExtensions property: Properties for each of the default extensions category.
*
* @return the defaultExtensions value.
*/
public List defaultExtensions() {
return this.defaultExtensions;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (perNodeDetails() != null) {
perNodeDetails().forEach(e -> e.validate());
}
if (defaultExtensions() != null) {
defaultExtensions().forEach(e -> e.validate());
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("arcInstanceResourceGroup", this.arcInstanceResourceGroup);
jsonWriter.writeStringField("arcApplicationClientId", this.arcApplicationClientId);
jsonWriter.writeStringField("arcApplicationTenantId", this.arcApplicationTenantId);
jsonWriter.writeStringField("arcServicePrincipalObjectId", this.arcServicePrincipalObjectId);
jsonWriter.writeStringField("arcApplicationObjectId", this.arcApplicationObjectId);
jsonWriter.writeUntypedField("connectivityProperties", this.connectivityProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ArcSettingProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ArcSettingProperties 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 ArcSettingProperties.
*/
public static ArcSettingProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ArcSettingProperties deserializedArcSettingProperties = new ArcSettingProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("provisioningState".equals(fieldName)) {
deserializedArcSettingProperties.provisioningState
= ProvisioningState.fromString(reader.getString());
} else if ("arcInstanceResourceGroup".equals(fieldName)) {
deserializedArcSettingProperties.arcInstanceResourceGroup = reader.getString();
} else if ("arcApplicationClientId".equals(fieldName)) {
deserializedArcSettingProperties.arcApplicationClientId = reader.getString();
} else if ("arcApplicationTenantId".equals(fieldName)) {
deserializedArcSettingProperties.arcApplicationTenantId = reader.getString();
} else if ("arcServicePrincipalObjectId".equals(fieldName)) {
deserializedArcSettingProperties.arcServicePrincipalObjectId = reader.getString();
} else if ("arcApplicationObjectId".equals(fieldName)) {
deserializedArcSettingProperties.arcApplicationObjectId = reader.getString();
} else if ("aggregateState".equals(fieldName)) {
deserializedArcSettingProperties.aggregateState
= ArcSettingAggregateState.fromString(reader.getString());
} else if ("perNodeDetails".equals(fieldName)) {
List perNodeDetails = reader.readArray(reader1 -> PerNodeState.fromJson(reader1));
deserializedArcSettingProperties.perNodeDetails = perNodeDetails;
} else if ("connectivityProperties".equals(fieldName)) {
deserializedArcSettingProperties.connectivityProperties = reader.readUntyped();
} else if ("defaultExtensions".equals(fieldName)) {
List defaultExtensions
= reader.readArray(reader1 -> DefaultExtensionDetails.fromJson(reader1));
deserializedArcSettingProperties.defaultExtensions = defaultExtensions;
} else {
reader.skipChildren();
}
}
return deserializedArcSettingProperties;
});
}
}