public EndpointDemographic withLocale(String locale) {
        setLocale(locale);
        return this;
    }
<p>
The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_),
followed by an ISO 3166-1 alpha-2 value.
</p>

@param locale
       The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore
       (_), followed by an ISO 3166-1 alpha-2 value.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EndpointDemographic.java