com.azure.communication.callautomation.implementation.models.StopMediaStreamingRequest 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.communication.callautomation.implementation.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 StopMediaStreamingRequest model.
*/
@Fluent
public final class StopMediaStreamingRequest implements JsonSerializable {
/*
* Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation.
* This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.
*/
private String operationCallbackUri;
/*
* The value to identify context of the operation.
*/
private String operationContext;
/**
* Creates an instance of StopMediaStreamingRequest class.
*/
public StopMediaStreamingRequest() {
}
/**
* Get the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by
* CreateCall/AnswerCall for this operation.
* This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.
*
* @return the operationCallbackUri value.
*/
public String getOperationCallbackUri() {
return this.operationCallbackUri;
}
/**
* Set the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by
* CreateCall/AnswerCall for this operation.
* This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.
*
* @param operationCallbackUri the operationCallbackUri value to set.
* @return the StopMediaStreamingRequest object itself.
*/
public StopMediaStreamingRequest setOperationCallbackUri(String operationCallbackUri) {
this.operationCallbackUri = operationCallbackUri;
return this;
}
/**
* Get the operationContext property: The value to identify context of the operation.
*
* @return the operationContext value.
*/
public String getOperationContext() {
return this.operationContext;
}
/**
* Set the operationContext property: The value to identify context of the operation.
*
* @param operationContext the operationContext value to set.
* @return the StopMediaStreamingRequest object itself.
*/
public StopMediaStreamingRequest setOperationContext(String operationContext) {
this.operationContext = operationContext;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri);
jsonWriter.writeStringField("operationContext", this.operationContext);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of StopMediaStreamingRequest from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of StopMediaStreamingRequest 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 StopMediaStreamingRequest.
*/
public static StopMediaStreamingRequest fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
StopMediaStreamingRequest deserializedStopMediaStreamingRequest = new StopMediaStreamingRequest();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("operationCallbackUri".equals(fieldName)) {
deserializedStopMediaStreamingRequest.operationCallbackUri = reader.getString();
} else if ("operationContext".equals(fieldName)) {
deserializedStopMediaStreamingRequest.operationContext = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedStopMediaStreamingRequest;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy