
com.azure.resourcemanager.appcontainers.models.AppleRegistration 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.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;
/**
* The configuration settings of the registration for the Apple provider.
*/
@Fluent
public final class AppleRegistration implements JsonSerializable {
/*
* The Client ID of the app used for login.
*/
private String clientId;
/*
* The app setting name that contains the client secret.
*/
private String clientSecretSettingName;
/**
* Creates an instance of AppleRegistration class.
*/
public AppleRegistration() {
}
/**
* Get the clientId property: The Client ID of the app used for login.
*
* @return the clientId value.
*/
public String clientId() {
return this.clientId;
}
/**
* Set the clientId property: The Client ID of the app used for login.
*
* @param clientId the clientId value to set.
* @return the AppleRegistration object itself.
*/
public AppleRegistration withClientId(String clientId) {
this.clientId = clientId;
return this;
}
/**
* Get the clientSecretSettingName property: The app setting name that contains the client secret.
*
* @return the clientSecretSettingName value.
*/
public String clientSecretSettingName() {
return this.clientSecretSettingName;
}
/**
* Set the clientSecretSettingName property: The app setting name that contains the client secret.
*
* @param clientSecretSettingName the clientSecretSettingName value to set.
* @return the AppleRegistration object itself.
*/
public AppleRegistration withClientSecretSettingName(String clientSecretSettingName) {
this.clientSecretSettingName = clientSecretSettingName;
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("clientId", this.clientId);
jsonWriter.writeStringField("clientSecretSettingName", this.clientSecretSettingName);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AppleRegistration from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AppleRegistration 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 AppleRegistration.
*/
public static AppleRegistration fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AppleRegistration deserializedAppleRegistration = new AppleRegistration();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("clientId".equals(fieldName)) {
deserializedAppleRegistration.clientId = reader.getString();
} else if ("clientSecretSettingName".equals(fieldName)) {
deserializedAppleRegistration.clientSecretSettingName = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedAppleRegistration;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy