<commit_before>require 'aws/elasticache'
require 'cloud_formation/bridge/util'
require 'cloud_formation/bridge/resources/base'
require 'cloud_formation/bridge/resources/base_elasti_cache_resource'

module CloudFormation
  module Bridge
    module Resources

      class ElastiCacheReplicationGroup < Base

        include BaseElastiCacheResource

        REQUIRED_FIELDS = [
          ELASTI_CACHE::CLUSTER_ID,
          ELASTI_CACHE::REPLICATION_GROUP_ID,
          ELASTI_CACHE::DESCRIPTION,
        ]

        def create(request)
          require_fields(request, REQUIRED_FIELDS)

          replication_id = request.resource_properties[ELASTI_CACHE::REPLICATION_GROUP_ID]
          automatic_failover = (request.resource_properties[ELASTI_CACHE::AUTOMATIC_FAILOVER] || "").downcase == "true"
          ncc_int = request.resource_properties[ELASTI_CACHE::NUM_CACHE_CLUSTERS].to_i
          num_cache_clusters = ncc_int > 0 ? ncc_int : nil

          response = client.create_replication_group(
            replication_group_id: replication_id,
            primary_cluster_id: request.resource_properties[ELASTI_CACHE::CLUSTER_ID],<commit_msg>Removed the response variable, not required.<commit_after>require 'aws/elasticache'
require 'cloud_formation/bridge/util'
require 'cloud_formation/bridge/resources/base'
require 'cloud_formation/bridge/resources/base_elasti_cache_resource'

module CloudFormation
  module Bridge
    module Resources

      class ElastiCacheReplicationGroup < Base

        include BaseElastiCacheResource

        REQUIRED_FIELDS = [
          ELASTI_CACHE::CLUSTER_ID,
          ELASTI_CACHE::REPLICATION_GROUP_ID,
          ELASTI_CACHE::DESCRIPTION,
        ]

        def create(request)
          require_fields(request, REQUIRED_FIELDS)

          replication_id = request.resource_properties[ELASTI_CACHE::REPLICATION_GROUP_ID]
          automatic_failover = (request.resource_properties[ELASTI_CACHE::AUTOMATIC_FAILOVER] || "").downcase == "true"
          ncc_int = request.resource_properties[ELASTI_CACHE::NUM_CACHE_CLUSTERS].to_i
          num_cache_clusters = ncc_int > 0 ? ncc_int : nil

          client.create_replication_group(
            replication_group_id: replication_id,
            primary_cluster_id: request.resource_properties[ELASTI_CACHE::CLUSTER_ID],
{'fraction_non_alphanumeric': 0.07316017316017316, 'fraction_numerical': 0.0008658008658008658, 'mean_word_length': 3.7649484536082474, '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': '2405752', 'n_tokens_mistral': 714, 'n_tokens_neox': 679, 'n_words': 95}