
com.azure.resourcemanager.newrelicobservability.models.NewRelicSingleSignOnProperties 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.newrelicobservability.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 java.io.IOException;
/**
* Single sign on Info of the NewRelic account.
*/
@Fluent
public final class NewRelicSingleSignOnProperties implements JsonSerializable {
/*
* Single sign-on state
*/
private SingleSignOnStates singleSignOnState;
/*
* The Id of the Enterprise App used for Single sign-on.
*/
private String enterpriseAppId;
/*
* The login URL specific to this NewRelic Organization
*/
private String singleSignOnUrl;
/*
* Provisioning state
*/
private ProvisioningState provisioningState;
/**
* Creates an instance of NewRelicSingleSignOnProperties class.
*/
public NewRelicSingleSignOnProperties() {
}
/**
* Get the singleSignOnState property: Single sign-on state.
*
* @return the singleSignOnState value.
*/
public SingleSignOnStates singleSignOnState() {
return this.singleSignOnState;
}
/**
* Set the singleSignOnState property: Single sign-on state.
*
* @param singleSignOnState the singleSignOnState value to set.
* @return the NewRelicSingleSignOnProperties object itself.
*/
public NewRelicSingleSignOnProperties withSingleSignOnState(SingleSignOnStates singleSignOnState) {
this.singleSignOnState = singleSignOnState;
return this;
}
/**
* Get the enterpriseAppId property: The Id of the Enterprise App used for Single sign-on.
*
* @return the enterpriseAppId value.
*/
public String enterpriseAppId() {
return this.enterpriseAppId;
}
/**
* Set the enterpriseAppId property: The Id of the Enterprise App used for Single sign-on.
*
* @param enterpriseAppId the enterpriseAppId value to set.
* @return the NewRelicSingleSignOnProperties object itself.
*/
public NewRelicSingleSignOnProperties withEnterpriseAppId(String enterpriseAppId) {
this.enterpriseAppId = enterpriseAppId;
return this;
}
/**
* Get the singleSignOnUrl property: The login URL specific to this NewRelic Organization.
*
* @return the singleSignOnUrl value.
*/
public String singleSignOnUrl() {
return this.singleSignOnUrl;
}
/**
* Set the singleSignOnUrl property: The login URL specific to this NewRelic Organization.
*
* @param singleSignOnUrl the singleSignOnUrl value to set.
* @return the NewRelicSingleSignOnProperties object itself.
*/
public NewRelicSingleSignOnProperties withSingleSignOnUrl(String singleSignOnUrl) {
this.singleSignOnUrl = singleSignOnUrl;
return this;
}
/**
* Get the provisioningState property: Provisioning state.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* Set the provisioningState property: Provisioning state.
*
* @param provisioningState the provisioningState value to set.
* @return the NewRelicSingleSignOnProperties object itself.
*/
public NewRelicSingleSignOnProperties withProvisioningState(ProvisioningState provisioningState) {
this.provisioningState = provisioningState;
return this;
}
/**
* 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.writeStringField("provisioningState",
this.provisioningState == null ? null : this.provisioningState.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of NewRelicSingleSignOnProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of NewRelicSingleSignOnProperties 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 NewRelicSingleSignOnProperties.
*/
public static NewRelicSingleSignOnProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
NewRelicSingleSignOnProperties deserializedNewRelicSingleSignOnProperties
= new NewRelicSingleSignOnProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("singleSignOnState".equals(fieldName)) {
deserializedNewRelicSingleSignOnProperties.singleSignOnState
= SingleSignOnStates.fromString(reader.getString());
} else if ("enterpriseAppId".equals(fieldName)) {
deserializedNewRelicSingleSignOnProperties.enterpriseAppId = reader.getString();
} else if ("singleSignOnUrl".equals(fieldName)) {
deserializedNewRelicSingleSignOnProperties.singleSignOnUrl = reader.getString();
} else if ("provisioningState".equals(fieldName)) {
deserializedNewRelicSingleSignOnProperties.provisioningState
= ProvisioningState.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedNewRelicSingleSignOnProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy