
com.azure.resourcemanager.datafactory.models.GitHubClientSecret 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.datafactory.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;
/**
* Client secret information for factory's bring your own app repository configuration.
*/
@Fluent
public final class GitHubClientSecret implements JsonSerializable {
/*
* Bring your own app client secret AKV URL.
*/
private String byoaSecretAkvUrl;
/*
* Bring your own app client secret name in AKV.
*/
private String byoaSecretName;
/**
* Creates an instance of GitHubClientSecret class.
*/
public GitHubClientSecret() {
}
/**
* Get the byoaSecretAkvUrl property: Bring your own app client secret AKV URL.
*
* @return the byoaSecretAkvUrl value.
*/
public String byoaSecretAkvUrl() {
return this.byoaSecretAkvUrl;
}
/**
* Set the byoaSecretAkvUrl property: Bring your own app client secret AKV URL.
*
* @param byoaSecretAkvUrl the byoaSecretAkvUrl value to set.
* @return the GitHubClientSecret object itself.
*/
public GitHubClientSecret withByoaSecretAkvUrl(String byoaSecretAkvUrl) {
this.byoaSecretAkvUrl = byoaSecretAkvUrl;
return this;
}
/**
* Get the byoaSecretName property: Bring your own app client secret name in AKV.
*
* @return the byoaSecretName value.
*/
public String byoaSecretName() {
return this.byoaSecretName;
}
/**
* Set the byoaSecretName property: Bring your own app client secret name in AKV.
*
* @param byoaSecretName the byoaSecretName value to set.
* @return the GitHubClientSecret object itself.
*/
public GitHubClientSecret withByoaSecretName(String byoaSecretName) {
this.byoaSecretName = byoaSecretName;
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("byoaSecretAkvUrl", this.byoaSecretAkvUrl);
jsonWriter.writeStringField("byoaSecretName", this.byoaSecretName);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of GitHubClientSecret from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of GitHubClientSecret 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 GitHubClientSecret.
*/
public static GitHubClientSecret fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
GitHubClientSecret deserializedGitHubClientSecret = new GitHubClientSecret();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("byoaSecretAkvUrl".equals(fieldName)) {
deserializedGitHubClientSecret.byoaSecretAkvUrl = reader.getString();
} else if ("byoaSecretName".equals(fieldName)) {
deserializedGitHubClientSecret.byoaSecretName = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedGitHubClientSecret;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy