<commit_before>/*
 * Copyright 2014 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.spinnaker.amos.aws;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
import com.netflix.spinnaker.amos.AccountCredentials;

import java.util.Collection;
import java.util.List;

/**
 * Basic set of Amazon credentials that will a provided {@link com.amazonaws.auth.AWSCredentialsProvider} to resolve account credentials.
 * If none provided, the {@link com.amazonaws.auth.DefaultAWSCredentialsProviderChain} will be used. The account's active
 * regions and availability zones can be specified as well.
 *
 * @author <NAME>
 */
public class AmazonCredentials implements AccountCredentials<AWSCredentials> {
    private String name;
    private Long accountId;
    protected AWSCredentialsProvider credentialsProvider;
    private List<AWSRegion> regions;


    @Override
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public List<AWSRegion> getRegions() {
        return regions;
    }

    public void setRegions(List<AWSRegion> regions) {
        this.regions = regions;
    }

    public static class AWSRegion {
        public String name;
        public Collection<String> availabilityZones;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Collection<String> getAvailabilityZones() {
            return availabilityZones;
        }

        public void setAvailabilityZones(Collection<String> availabilityZones) {
            this.availabilityZones = availabilityZones;
        }

        public boolean equals(Object other) {
            if (!(other instanceof AWSRegion)) {
                return false;
            }

            AWSRegion o = (AWSRegion)other;
            return this.name.equals(o.getName()) &&
                    this.availabilityZones.containsAll(o.getAvailabilityZones());
        }
    }
<commit_msg>need more specificity in this object for Boot<commit_after>/*
 * Copyright 2014 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.spinnaker.amos.aws;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
import com.netflix.spinnaker.amos.AccountCredentials;

import java.util.Collection;
import java.util.List;

/**
 * Basic set of Amazon credentials that will a provided {@link com.amazonaws.auth.AWSCredentialsProvider} to resolve account credentials.
 * If none provided, the {@link com.amazonaws.auth.DefaultAWSCredentialsProviderChain} will be used. The account's active
 * regions and availability zones can be specified as well.
 *
 * @author <NAME>
 */
public class AmazonCredentials implements AccountCredentials<AWSCredentials> {
    private String name;
    private Long accountId;
    protected AWSCredentialsProvider credentialsProvider;
    private List<AWSRegion> regions;


    @Override
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public List<AWSRegion> getRegions() {
        return regions;
    }

    public void setRegions(List<AWSRegion> regions) {
        this.regions = regions;
    }

    public static class AWSRegion {
        public String name;
        public List<String> availabilityZones;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Collection<String> getAvailabilityZones() {
            return availabilityZones;
        }

        public void setAvailabilityZones(List<String> availabilityZones) {
            this.availabilityZones = availabilityZones;
        }

        public boolean equals(Object other) {
            if (!(other instanceof AWSRegion)) {
                return false;
            }

            AWSRegion o = (AWSRegion)other;
            return this.name.equals(o.getName()) &&
                    this.availabilityZones.containsAll(o.getAvailabilityZones());
        }
    }

{'fraction_non_alphanumeric': 0.07773478719662329, 'fraction_numerical': 0.0028139289482940555, 'mean_word_length': 2.8219086021505375, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4444076', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1455, 'n_words': 475}