public ServiceCall<Profile> profile(ProfileOptions profileOptions) {
    Validator.notNull(profileOptions, "profileOptions cannot be null");
    String[] pathSegments = { "v3/profile" };
    RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
    builder.query("version", versionDate);
    Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("personality_insights", "v3", "profile");
    for (Entry<String, String> header : sdkHeaders.entrySet()) {
      builder.header(header.getKey(), header.getValue());
    }
    builder.header("Accept", "application/json");
    if (profileOptions.contentLanguage() != null) {
      builder.header("Content-Language", profileOptions.contentLanguage());
    }
    if (profileOptions.acceptLanguage() != null) {
      builder.header("Accept-Language", profileOptions.acceptLanguage());
    }
    if (profileOptions.contentType() != null) {
      builder.header("Content-Type", profileOptions.contentType());
    }
    if (profileOptions.rawScores() != null) {
      builder.query("raw_scores", String.valueOf(profileOptions.rawScores()));
    }
    if (profileOptions.csvHeaders() != null) {
      builder.query("csv_headers", String.valueOf(profileOptions.csvHeaders()));
    }
    if (profileOptions.consumptionPreferences() != null) {
      builder.query("consumption_preferences", String.valueOf(profileOptions.consumptionPreferences()));
    }
    builder.bodyContent(profileOptions.contentType(), profileOptions.content(), null, profileOptions.body());
    return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Profile.class));
  }
public ServiceCall < Profile > profile ( ProfileOptions profileOptions ) { Validator . notNull ( profileOptions , "profileOptions cannot be null" ) ; String [ ] pathSegments = { "v3/profile" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "personality_insights" , "v3" , "profile" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( profileOptions . contentLanguage ( ) != null ) { builder . header ( "Content-Language" , profileOptions . contentLanguage ( ) ) ; } if ( profileOptions . acceptLanguage ( ) != null ) { builder . header ( "Accept-Language" , profileOptions . acceptLanguage ( ) ) ; } if ( profileOptions . contentType ( ) != null ) { builder . header ( "Content-Type" , profileOptions . contentType ( ) ) ; } if ( profileOptions . rawScores ( ) != null ) { builder . query ( "raw_scores" , String . valueOf ( profileOptions . rawScores ( ) ) ) ; } if ( profileOptions . csvHeaders ( ) != null ) { builder . query ( "csv_headers" , String . valueOf ( profileOptions . csvHeaders ( ) ) ) ; } if ( profileOptions . consumptionPreferences ( ) != null ) { builder . query ( "consumption_preferences" , String . valueOf ( profileOptions . consumptionPreferences ( ) ) ) ; } builder . bodyContent ( profileOptions . contentType ( ) , profileOptions . content ( ) , null , profileOptions . body ( ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Profile . class ) ) ; }
Get profile.

Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of input
content, but it requires much less text to produce an accurate profile. The service can analyze text in Arabic,
English, Japanese, Korean, or Spanish. It can return its results in a variety of languages.

**See also:**
* [Requesting a profile](https://cloud.ibm.com/docs/services/personality-insights/input.html)
* [Providing sufficient input](https://cloud.ibm.com/docs/services/personality-insights/input.html#sufficient)

### Content types

You can provide input content as plain text (`text/plain`), HTML (`text/html`), or JSON (`application/json`) by
specifying the **Content-Type** parameter. The default is `text/plain`.
* Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8.
* Per the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII
character set).

When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the character
encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`.

**See also:** [Specifying request and response
formats](https://cloud.ibm.com/docs/services/personality-insights/input.html#formats)

### Accept types

You must request a response as JSON (`application/json`) or comma-separated values (`text/csv`) by specifying the
**Accept** parameter. CSV output includes a fixed number of columns. Set the **csv_headers** parameter to `true` to
request optional column headers for CSV output.

**See also:**
* [Understanding a JSON profile](https://cloud.ibm.com/docs/services/personality-insights/output.html)
* [Understanding a CSV profile](https://cloud.ibm.com/docs/services/personality-insights/output-csv.html).

@param profileOptions the {@link ProfileOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {@link Profile}