com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnProperties 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.dynatrace.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.dynatrace.models.ProvisioningState;
import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates;
import java.io.IOException;
import java.util.List;
/**
* The details of a Dynatrace single sign-on.
*/
@Fluent
public final class DynatraceSingleSignOnProperties implements JsonSerializable {
/*
* State of Single Sign On
*/
private SingleSignOnStates singleSignOnState;
/*
* Version of the Dynatrace agent installed on the VM.
*/
private String enterpriseAppId;
/*
* The login URL specific to this Dynatrace Environment
*/
private String singleSignOnUrl;
/*
* array of Aad(azure active directory) domains
*/
private List aadDomains;
/*
* Provisioning state of the resource.
*/
private ProvisioningState provisioningState;
/**
* Creates an instance of DynatraceSingleSignOnProperties class.
*/
public DynatraceSingleSignOnProperties() {
}
/**
* Get the singleSignOnState property: State of Single Sign On.
*
* @return the singleSignOnState value.
*/
public SingleSignOnStates singleSignOnState() {
return this.singleSignOnState;
}
/**
* Set the singleSignOnState property: State of Single Sign On.
*
* @param singleSignOnState the singleSignOnState value to set.
* @return the DynatraceSingleSignOnProperties object itself.
*/
public DynatraceSingleSignOnProperties withSingleSignOnState(SingleSignOnStates singleSignOnState) {
this.singleSignOnState = singleSignOnState;
return this;
}
/**
* Get the enterpriseAppId property: Version of the Dynatrace agent installed on the VM.
*
* @return the enterpriseAppId value.
*/
public String enterpriseAppId() {
return this.enterpriseAppId;
}
/**
* Set the enterpriseAppId property: Version of the Dynatrace agent installed on the VM.
*
* @param enterpriseAppId the enterpriseAppId value to set.
* @return the DynatraceSingleSignOnProperties object itself.
*/
public DynatraceSingleSignOnProperties withEnterpriseAppId(String enterpriseAppId) {
this.enterpriseAppId = enterpriseAppId;
return this;
}
/**
* Get the singleSignOnUrl property: The login URL specific to this Dynatrace Environment.
*
* @return the singleSignOnUrl value.
*/
public String singleSignOnUrl() {
return this.singleSignOnUrl;
}
/**
* Set the singleSignOnUrl property: The login URL specific to this Dynatrace Environment.
*
* @param singleSignOnUrl the singleSignOnUrl value to set.
* @return the DynatraceSingleSignOnProperties object itself.
*/
public DynatraceSingleSignOnProperties withSingleSignOnUrl(String singleSignOnUrl) {
this.singleSignOnUrl = singleSignOnUrl;
return this;
}
/**
* Get the aadDomains property: array of Aad(azure active directory) domains.
*
* @return the aadDomains value.
*/
public List aadDomains() {
return this.aadDomains;
}
/**
* Set the aadDomains property: array of Aad(azure active directory) domains.
*
* @param aadDomains the aadDomains value to set.
* @return the DynatraceSingleSignOnProperties object itself.
*/
public DynatraceSingleSignOnProperties withAadDomains(List aadDomains) {
this.aadDomains = aadDomains;
return this;
}
/**
* Get the provisioningState property: Provisioning state of the resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* 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();
jsonWriter.writeStringField("singleSignOnState",
this.singleSignOnState == null ? null : this.singleSignOnState.toString());
jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId);
jsonWriter.writeStringField("singleSignOnUrl", this.singleSignOnUrl);
jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DynatraceSingleSignOnProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DynatraceSingleSignOnProperties 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 DynatraceSingleSignOnProperties.
*/
public static DynatraceSingleSignOnProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DynatraceSingleSignOnProperties deserializedDynatraceSingleSignOnProperties
= new DynatraceSingleSignOnProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("singleSignOnState".equals(fieldName)) {
deserializedDynatraceSingleSignOnProperties.singleSignOnState
= SingleSignOnStates.fromString(reader.getString());
} else if ("enterpriseAppId".equals(fieldName)) {
deserializedDynatraceSingleSignOnProperties.enterpriseAppId = reader.getString();
} else if ("singleSignOnUrl".equals(fieldName)) {
deserializedDynatraceSingleSignOnProperties.singleSignOnUrl = reader.getString();
} else if ("aadDomains".equals(fieldName)) {
List aadDomains = reader.readArray(reader1 -> reader1.getString());
deserializedDynatraceSingleSignOnProperties.aadDomains = aadDomains;
} else if ("provisioningState".equals(fieldName)) {
deserializedDynatraceSingleSignOnProperties.provisioningState
= ProvisioningState.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedDynatraceSingleSignOnProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy