Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate azure-communication-email to azure-json #41222

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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