Skip to content

Commit

Permalink
pr review fixes (#22274)
Browse files Browse the repository at this point in the history
  • Loading branch information
arifsaikat-microsoft authored Jun 14, 2021
1 parent b624840 commit 7307a2b
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-identity</artifactId>
<version>1.1.1</version>
<version>1.1.1</version> <!-- {x-version-update;com.azure:azure-communication-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@ private HttpPipeline createHttpPipeline(HttpClient httpClient) {
}

// Add required policies
policyList.add(createHttpPipelineAuthPolicy());
String clientName = properties.getOrDefault(SDK_NAME, "UnknownName");
String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion");
policyList.add(new UserAgentPolicy(applicationId, clientName, clientVersion, configuration));
policyList.add(new RequestIdPolicy());
policyList.add((retryPolicy == null) ? new RetryPolicy() : retryPolicy);
policyList.add(createHttpPipelineAuthPolicy());
policyList.add(new CookiePolicy());

// Add additional policies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
package com.azure.communication.callingserver.models;

import com.azure.communication.common.CommunicationIdentifier;
import com.azure.core.annotation.Immutable;

/**
* The participant in a call.
*/
@Immutable
public final class CallParticipant {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The result payload of get call recording state operation. */
@Fluent
@Immutable
public final class CallRecordingStateResult {
/*
* The state of the recording
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

import java.util.List;

/** The Calling Server error. */
@Immutable
public final class CallingServerError {
/*
* The error code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.http.HttpResponse;

/**
* Exception thrown for an invalid response with {@link CallingServerError} information.
**/
@Immutable
public final class CallingServerErrorException extends HttpResponseException {
/**
* Initializes a new instance of the CallingServerResponseException class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

/** The response payload of the cancel all media operations. */
@Immutable
public final class CancelAllMediaOperationsResult {
/*
* The identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

/** The response payload of the join call operation. */
@Immutable
public final class JoinCallResult {
/*
* The call connection id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

/** The response payload for play audio operation. */
@Immutable
public final class PlayAudioResult {
/*
* The identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

/** Result info class to be used to report result status for actions/operations. */
@Immutable
public final class ResultInfo {
/*
* The result code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

/** The response payload of start call recording operation. */
@Immutable
public final class StartCallRecordingResult {
/*
* The recording id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

package com.azure.communication.callingserver.models;

import com.azure.core.annotation.Immutable;

/** The class to represent Tone info detail. */
@Immutable
public final class ToneInfo {
/*
* The sequence id. This id can be used to determine if the same tone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

import com.azure.communication.callingserver.implementation.models.CallConnectionStateChangedEventInternal;
import com.azure.communication.callingserver.models.CallConnectionState;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.BinaryData;

/** The call connection state changed event. */
public final class CallConnectionStateChangedEvent {
@Immutable
public final class CallConnectionStateChangedEvent extends CallingServerEventBase {
/*
* The server call id.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

import com.azure.communication.callingserver.implementation.models.CallRecordingStateChangeEventInternal;
import com.azure.communication.callingserver.models.CallRecordingState;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.BinaryData;

import java.time.OffsetDateTime;

/** The call recording state change event. */
public final class CallRecordingStateChangeEvent {
@Immutable
public final class CallRecordingStateChangeEvent extends CallingServerEventBase {
/*
* The call recording id
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

package com.azure.communication.callingserver.models.events;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;

import java.util.Collection;

/** Defines values for CallingServerEventType. */
@Immutable
public final class CallingServerEventType extends ExpandableStringEnum<CallingServerEventType> {

/** The call connection state change event type. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import com.azure.communication.callingserver.implementation.models.InviteParticipantsResultEventInternal;
import com.azure.communication.callingserver.models.OperationStatus;
import com.azure.communication.callingserver.models.ResultInfo;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.BinaryData;

/** The invite participant result event. */
public final class InviteParticipantResultEvent {
@Immutable
public final class InviteParticipantResultEvent extends CallingServerEventBase {
/*
* The result details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.azure.communication.callingserver.implementation.models.CommunicationParticipantInternal;
import com.azure.communication.callingserver.implementation.models.ParticipantsUpdatedEventInternal;
import com.azure.communication.callingserver.models.CallParticipant;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.BinaryData;

import java.util.LinkedList;
Expand All @@ -15,6 +16,7 @@
/**
* The participants updated event.
*/
@Immutable
public final class ParticipantsUpdatedEvent extends CallingServerEventBase {
/**
* The call connection id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import com.azure.communication.callingserver.implementation.models.PlayAudioResultEventInternal;
import com.azure.communication.callingserver.models.OperationStatus;
import com.azure.communication.callingserver.models.ResultInfo;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.BinaryData;

/** The play audio result event. */
public final class PlayAudioResultEvent {
@Immutable
public final class PlayAudioResultEvent extends CallingServerEventBase {
/*
* The result details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

import com.azure.communication.callingserver.implementation.models.ToneReceivedEventInternal;
import com.azure.communication.callingserver.models.ToneInfo;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.BinaryData;

/** The subscribe to tone event. */
public final class ToneReceivedEvent {
@Immutable
public final class ToneReceivedEvent extends CallingServerEventBase {
/*
* The tone info.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class CallingServerTestBase extends TestBase {

protected static final String CONNECTION_STRING = Configuration.getGlobalConfiguration()
.get("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING",
"endpoint=https://acstestbot1.communication.azure.com/;accesskey=E0Oy7HRSLiMFyuXHQA/9nOYZu2Fc0ia9DxhHtsGhtHuc2RTan24ZAmTjxl5etgZW/+O3pGrXiEpazT81u3quzg==");
"endpoint=https://REDACTED.communication.azure.com/;accesskey=QWNjZXNzS2V5");

protected static final String RESOURCE_IDENTIFIER = Configuration.getGlobalConfiguration()
.get("COMMUNICATION_LIVETEST_STATIC_RESOURCE_IDENTIFIER",
Expand Down

0 comments on commit 7307a2b

Please sign in to comment.