com.azure.resourcemanager.botservice.models.ServiceProviderParameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-botservice Show documentation
Show all versions of azure-resourcemanager-botservice Show documentation
This package contains Microsoft Azure SDK for BotService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-2021-03-01.
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.botservice.models;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Extra Parameters specific to each Service Provider.
*/
@Immutable
public final class ServiceProviderParameter implements JsonSerializable {
/*
* Name of the Service Provider
*/
private String name;
/*
* Type of the Service Provider
*/
private String type;
/*
* Display Name of the Service Provider
*/
private String displayName;
/*
* Description of the Service Provider
*/
private String description;
/*
* Help Url for the Service Provider
*/
private String helpUrl;
/*
* Default Name for the Service Provider
*/
private String defaultProperty;
/*
* Meta data for the Service Provider
*/
private ServiceProviderParameterMetadata metadata;
/**
* Creates an instance of ServiceProviderParameter class.
*/
public ServiceProviderParameter() {
}
/**
* Get the name property: Name of the Service Provider.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Get the type property: Type of the Service Provider.
*
* @return the type value.
*/
public String type() {
return this.type;
}
/**
* Get the displayName property: Display Name of the Service Provider.
*
* @return the displayName value.
*/
public String displayName() {
return this.displayName;
}
/**
* Get the description property: Description of the Service Provider.
*
* @return the description value.
*/
public String description() {
return this.description;
}
/**
* Get the helpUrl property: Help Url for the Service Provider.
*
* @return the helpUrl value.
*/
public String helpUrl() {
return this.helpUrl;
}
/**
* Get the defaultProperty property: Default Name for the Service Provider.
*
* @return the defaultProperty value.
*/
public String defaultProperty() {
return this.defaultProperty;
}
/**
* Get the metadata property: Meta data for the Service Provider.
*
* @return the metadata value.
*/
public ServiceProviderParameterMetadata metadata() {
return this.metadata;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (metadata() != null) {
metadata().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ServiceProviderParameter from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ServiceProviderParameter 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 ServiceProviderParameter.
*/
public static ServiceProviderParameter fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ServiceProviderParameter deserializedServiceProviderParameter = new ServiceProviderParameter();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
deserializedServiceProviderParameter.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedServiceProviderParameter.type = reader.getString();
} else if ("displayName".equals(fieldName)) {
deserializedServiceProviderParameter.displayName = reader.getString();
} else if ("description".equals(fieldName)) {
deserializedServiceProviderParameter.description = reader.getString();
} else if ("helpUrl".equals(fieldName)) {
deserializedServiceProviderParameter.helpUrl = reader.getString();
} else if ("default".equals(fieldName)) {
deserializedServiceProviderParameter.defaultProperty = reader.getString();
} else if ("metadata".equals(fieldName)) {
deserializedServiceProviderParameter.metadata = ServiceProviderParameterMetadata.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedServiceProviderParameter;
});
}
}