<commit_before>package com.atexpose.util.sqs;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
import com.amazonaws.services.sqs.model.SendMessageRequest;
import io.schinzel.basicutils.RandomUtil;
import io.schinzel.basicutils.Thrower;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.experimental.Accessors;

/**
 * The purpose of this class is to send messages to an AWS SQS queue.
 * <p>
 * Created by schinzel on 2017-07-03.
 */
@Accessors(prefix = "m")
public class SqsProducer implements IQueueProducer {
    private static final String GROUP_ID = "my_group_id";
    @Getter(AccessLevel.PROTECTED) private final String mQueueUrl;
    private final AmazonSQS mSqsClient;
    private final SqsQueueType mSqsQueueType;


    @Builder
    SqsProducer(String awsAccessKey, String awsSecretKey, Regions region, String queueUrl, SqsQueueType sqsQueueType) {
        Thrower.throwIfVarEmpty(queueUrl, "queueUrl");
        Thrower.throwIfVarNull(sqsQueueType, "sqsQueueType");
        AWSCredentials credentials = new BasicAWSCredentials(awsAccessKey, awsSecretKey);
        mSqsClient = AmazonSQSClientBuilder
                .standard()
                .withCredentials(new AWSStaticCredentialsProvider(credentials))
                .withRegion(region)
                .build();
        mQueueUrl = queueUrl;
        mSqsQueueType = sqsQueueType;
    }


    public IQueueProducer send(String message) {
        Thrower.throwIfVarEmpty(message, "message");
        SendMessageRequest sendMsgRequest = new SendMessageRequest()<commit_msg>Removed unused getter<commit_after>package com.atexpose.util.sqs;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
import com.amazonaws.services.sqs.model.SendMessageRequest;
import io.schinzel.basicutils.RandomUtil;
import io.schinzel.basicutils.Thrower;
import lombok.Builder;
import lombok.experimental.Accessors;

/**
 * The purpose of this class is to send messages to an AWS SQS queue.
 * <p>
 * Created by schinzel on 2017-07-03.
 */
@Accessors(prefix = "m")
public class SqsProducer implements IQueueProducer {
    private static final String GROUP_ID = "my_group_id";
    private final String mQueueUrl;
    private final AmazonSQS mSqsClient;
    private final SqsQueueType mSqsQueueType;


    @Builder
    SqsProducer(String awsAccessKey, String awsSecretKey, Regions region, String queueUrl, SqsQueueType sqsQueueType) {
        Thrower.throwIfVarEmpty(queueUrl, "queueUrl");
        Thrower.throwIfVarNull(sqsQueueType, "sqsQueueType");
        AWSCredentials credentials = new BasicAWSCredentials(awsAccessKey, awsSecretKey);
        mSqsClient = AmazonSQSClientBuilder
                .standard()
                .withCredentials(new AWSStaticCredentialsProvider(credentials))
                .withRegion(region)
                .build();
        mQueueUrl = queueUrl;
        mSqsQueueType = sqsQueueType;
    }


    public IQueueProducer send(String message) {
        Thrower.throwIfVarEmpty(message, "message");
        SendMessageRequest sendMsgRequest = new SendMessageRequest()
{'fraction_non_alphanumeric': 0.08169014084507042, 'fraction_numerical': 0.004507042253521127, 'mean_word_length': 4.065620542082739, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558168', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1055, 'n_words': 226}