Skip to content

Commit

Permalink
migrate azure-communication-email to azure-json (#41222)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy authored Jul 31, 2024
1 parent 3afd633 commit c689b60
Show file tree
Hide file tree
Showing 24 changed files with 957 additions and 371 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,13 @@
"new" : ".*? com\\.azure\\.communication\\.chat\\.models.*",
"justification": "Migration to azure-json"
},
{
"regex": true,
"code" : "java\\.annotation\\.removed",
"old" : ".*? com\\.azure\\.communication\\.email\\.models.*",
"new" : ".*? com\\.azure\\.communication\\.email\\.models.*",
"justification": "Migration to azure-json"
},
{
"code": "java.class.nowFinal",
"old" : "class com.azure.resourcemanager.eventhubs.models.Identity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,79 @@

import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.SerializerAdapter;

/** Initializes a new instance of the AzureCommunicationEmailService type. */
/**
* Initializes a new instance of the AzureCommunicationEmailService type.
*/
public final class AzureCommunicationEmailServiceImpl {
/** The communication resource, for example https://my-resource.communication.azure.com. */
/**
* The communication resource, for example https://my-resource.communication.azure.com.
*/
private final String endpoint;

/**
* Gets The communication resource, for example https://my-resource.communication.azure.com.
*
*
* @return the endpoint value.
*/
public String getEndpoint() {
return this.endpoint;
}

/** Api Version. */
/**
* Api Version.
*/
private final String apiVersion;

/**
* Gets Api Version.
*
*
* @return the apiVersion value.
*/
public String getApiVersion() {
return this.apiVersion;
}

/** The HTTP pipeline to send requests through. */
/**
* The HTTP pipeline to send requests through.
*/
private final HttpPipeline httpPipeline;

/**
* Gets The HTTP pipeline to send requests through.
*
*
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}

/** The serializer to serialize an object into a string. */
/**
* The serializer to serialize an object into a string.
*/
private final SerializerAdapter serializerAdapter;

/**
* Gets The serializer to serialize an object into a string.
*
*
* @return the serializerAdapter value.
*/
public SerializerAdapter getSerializerAdapter() {
return this.serializerAdapter;
}

/** The EmailsImpl object to access its operations. */
/**
* The EmailsImpl object to access its operations.
*/
private final EmailsImpl emails;

/**
* Gets the EmailsImpl object to access its operations.
*
*
* @return the EmailsImpl object.
*/
public EmailsImpl getEmails() {
Expand All @@ -76,23 +87,18 @@ public EmailsImpl getEmails() {

/**
* Initializes an instance of AzureCommunicationEmailService client.
*
*
* @param endpoint The communication resource, for example https://my-resource.communication.azure.com.
* @param apiVersion Api Version.
*/
AzureCommunicationEmailServiceImpl(String endpoint, String apiVersion) {
this(
new HttpPipelineBuilder()
.policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
.build(),
JacksonAdapter.createDefaultSerializerAdapter(),
endpoint,
apiVersion);
this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion);
}

/**
* Initializes an instance of AzureCommunicationEmailService client.
*
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param endpoint The communication resource, for example https://my-resource.communication.azure.com.
* @param apiVersion Api Version.
Expand All @@ -103,14 +109,14 @@ public EmailsImpl getEmails() {

/**
* Initializes an instance of AzureCommunicationEmailService client.
*
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param endpoint The communication resource, for example https://my-resource.communication.azure.com.
* @param apiVersion Api Version.
*/
AzureCommunicationEmailServiceImpl(
HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, String apiVersion) {
AzureCommunicationEmailServiceImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint,
String apiVersion) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.endpoint = endpoint;
Expand Down
Loading

0 comments on commit c689b60

Please sign in to comment.