com.azure.resourcemanager.botservice.fluent.models.HostSettingsResponseInner 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.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 java.io.IOException;
/**
* The response body returned for a request to Bot Service Management to check per subscription hostSettings.
*/
@Fluent
public final class HostSettingsResponseInner implements JsonSerializable {
/*
* For in-conversation bot user authentication
*/
private String oAuthUrl;
/*
* For verifying incoming tokens from the channels
*/
private String toBotFromChannelOpenIdMetadataUrl;
/*
* For verifying incoming tokens from the channels
*/
private String toBotFromChannelTokenIssuer;
/*
* For verifying incoming tokens from bot emulator
*/
private String toBotFromEmulatorOpenIdMetadataUrl;
/*
* For getting access token to channels from bot host
*/
private String toChannelFromBotLoginUrl;
/*
* For getting access token to channels from bot host
*/
private String toChannelFromBotOAuthScope;
/*
* Per cloud OAuth setting on whether authority is validated
*/
private Boolean validateAuthority;
/*
* Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12
*/
private String botOpenIdMetadata;
/**
* Creates an instance of HostSettingsResponseInner class.
*/
public HostSettingsResponseInner() {
}
/**
* Get the oAuthUrl property: For in-conversation bot user authentication.
*
* @return the oAuthUrl value.
*/
public String oAuthUrl() {
return this.oAuthUrl;
}
/**
* Set the oAuthUrl property: For in-conversation bot user authentication.
*
* @param oAuthUrl the oAuthUrl value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withOAuthUrl(String oAuthUrl) {
this.oAuthUrl = oAuthUrl;
return this;
}
/**
* Get the toBotFromChannelOpenIdMetadataUrl property: For verifying incoming tokens from the channels.
*
* @return the toBotFromChannelOpenIdMetadataUrl value.
*/
public String toBotFromChannelOpenIdMetadataUrl() {
return this.toBotFromChannelOpenIdMetadataUrl;
}
/**
* Set the toBotFromChannelOpenIdMetadataUrl property: For verifying incoming tokens from the channels.
*
* @param toBotFromChannelOpenIdMetadataUrl the toBotFromChannelOpenIdMetadataUrl value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withToBotFromChannelOpenIdMetadataUrl(String toBotFromChannelOpenIdMetadataUrl) {
this.toBotFromChannelOpenIdMetadataUrl = toBotFromChannelOpenIdMetadataUrl;
return this;
}
/**
* Get the toBotFromChannelTokenIssuer property: For verifying incoming tokens from the channels.
*
* @return the toBotFromChannelTokenIssuer value.
*/
public String toBotFromChannelTokenIssuer() {
return this.toBotFromChannelTokenIssuer;
}
/**
* Set the toBotFromChannelTokenIssuer property: For verifying incoming tokens from the channels.
*
* @param toBotFromChannelTokenIssuer the toBotFromChannelTokenIssuer value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withToBotFromChannelTokenIssuer(String toBotFromChannelTokenIssuer) {
this.toBotFromChannelTokenIssuer = toBotFromChannelTokenIssuer;
return this;
}
/**
* Get the toBotFromEmulatorOpenIdMetadataUrl property: For verifying incoming tokens from bot emulator.
*
* @return the toBotFromEmulatorOpenIdMetadataUrl value.
*/
public String toBotFromEmulatorOpenIdMetadataUrl() {
return this.toBotFromEmulatorOpenIdMetadataUrl;
}
/**
* Set the toBotFromEmulatorOpenIdMetadataUrl property: For verifying incoming tokens from bot emulator.
*
* @param toBotFromEmulatorOpenIdMetadataUrl the toBotFromEmulatorOpenIdMetadataUrl value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withToBotFromEmulatorOpenIdMetadataUrl(String toBotFromEmulatorOpenIdMetadataUrl) {
this.toBotFromEmulatorOpenIdMetadataUrl = toBotFromEmulatorOpenIdMetadataUrl;
return this;
}
/**
* Get the toChannelFromBotLoginUrl property: For getting access token to channels from bot host.
*
* @return the toChannelFromBotLoginUrl value.
*/
public String toChannelFromBotLoginUrl() {
return this.toChannelFromBotLoginUrl;
}
/**
* Set the toChannelFromBotLoginUrl property: For getting access token to channels from bot host.
*
* @param toChannelFromBotLoginUrl the toChannelFromBotLoginUrl value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withToChannelFromBotLoginUrl(String toChannelFromBotLoginUrl) {
this.toChannelFromBotLoginUrl = toChannelFromBotLoginUrl;
return this;
}
/**
* Get the toChannelFromBotOAuthScope property: For getting access token to channels from bot host.
*
* @return the toChannelFromBotOAuthScope value.
*/
public String toChannelFromBotOAuthScope() {
return this.toChannelFromBotOAuthScope;
}
/**
* Set the toChannelFromBotOAuthScope property: For getting access token to channels from bot host.
*
* @param toChannelFromBotOAuthScope the toChannelFromBotOAuthScope value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withToChannelFromBotOAuthScope(String toChannelFromBotOAuthScope) {
this.toChannelFromBotOAuthScope = toChannelFromBotOAuthScope;
return this;
}
/**
* Get the validateAuthority property: Per cloud OAuth setting on whether authority is validated.
*
* @return the validateAuthority value.
*/
public Boolean validateAuthority() {
return this.validateAuthority;
}
/**
* Set the validateAuthority property: Per cloud OAuth setting on whether authority is validated.
*
* @param validateAuthority the validateAuthority value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withValidateAuthority(Boolean validateAuthority) {
this.validateAuthority = validateAuthority;
return this;
}
/**
* Get the botOpenIdMetadata property: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
*
* @return the botOpenIdMetadata value.
*/
public String botOpenIdMetadata() {
return this.botOpenIdMetadata;
}
/**
* Set the botOpenIdMetadata property: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
*
* @param botOpenIdMetadata the botOpenIdMetadata value to set.
* @return the HostSettingsResponseInner object itself.
*/
public HostSettingsResponseInner withBotOpenIdMetadata(String botOpenIdMetadata) {
this.botOpenIdMetadata = botOpenIdMetadata;
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("OAuthUrl", this.oAuthUrl);
jsonWriter.writeStringField("ToBotFromChannelOpenIdMetadataUrl", this.toBotFromChannelOpenIdMetadataUrl);
jsonWriter.writeStringField("ToBotFromChannelTokenIssuer", this.toBotFromChannelTokenIssuer);
jsonWriter.writeStringField("ToBotFromEmulatorOpenIdMetadataUrl", this.toBotFromEmulatorOpenIdMetadataUrl);
jsonWriter.writeStringField("ToChannelFromBotLoginUrl", this.toChannelFromBotLoginUrl);
jsonWriter.writeStringField("ToChannelFromBotOAuthScope", this.toChannelFromBotOAuthScope);
jsonWriter.writeBooleanField("ValidateAuthority", this.validateAuthority);
jsonWriter.writeStringField("BotOpenIdMetadata", this.botOpenIdMetadata);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of HostSettingsResponseInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of HostSettingsResponseInner 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 HostSettingsResponseInner.
*/
public static HostSettingsResponseInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
HostSettingsResponseInner deserializedHostSettingsResponseInner = new HostSettingsResponseInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("OAuthUrl".equals(fieldName)) {
deserializedHostSettingsResponseInner.oAuthUrl = reader.getString();
} else if ("ToBotFromChannelOpenIdMetadataUrl".equals(fieldName)) {
deserializedHostSettingsResponseInner.toBotFromChannelOpenIdMetadataUrl = reader.getString();
} else if ("ToBotFromChannelTokenIssuer".equals(fieldName)) {
deserializedHostSettingsResponseInner.toBotFromChannelTokenIssuer = reader.getString();
} else if ("ToBotFromEmulatorOpenIdMetadataUrl".equals(fieldName)) {
deserializedHostSettingsResponseInner.toBotFromEmulatorOpenIdMetadataUrl = reader.getString();
} else if ("ToChannelFromBotLoginUrl".equals(fieldName)) {
deserializedHostSettingsResponseInner.toChannelFromBotLoginUrl = reader.getString();
} else if ("ToChannelFromBotOAuthScope".equals(fieldName)) {
deserializedHostSettingsResponseInner.toChannelFromBotOAuthScope = reader.getString();
} else if ("ValidateAuthority".equals(fieldName)) {
deserializedHostSettingsResponseInner.validateAuthority
= reader.getNullable(JsonReader::getBoolean);
} else if ("BotOpenIdMetadata".equals(fieldName)) {
deserializedHostSettingsResponseInner.botOpenIdMetadata = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedHostSettingsResponseInner;
});
}
}