target.apidocs.com.google.api.services.directory.model.UserLanguage.html Maven / Gradle / Ivy
UserLanguage (Admin SDK API directory_v1-rev20220125-1.32.1)
com.google.api.services.directory.model
Class UserLanguage
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.directory.model.UserLanguage
-
public final class UserLanguage
extends GenericJson
JSON template for a language entry.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Admin SDK API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
UserLanguage()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
UserLanguage
clone()
String
getCustomLanguage()
Other language.
String
getLanguageCode()
ISO 639 string representation of a language.
String
getPreference()
Optional.
UserLanguage
set(String fieldName,
Object value)
UserLanguage
setCustomLanguage(String customLanguage)
Other language.
UserLanguage
setLanguageCode(String languageCode)
ISO 639 string representation of a language.
UserLanguage
setPreference(String preference)
Optional.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getCustomLanguage
public String getCustomLanguage()
Other language. User can provide their own language name if there is no corresponding ISO 639
language code. If this is set, `languageCode` can't be set.
- Returns:
- value or
null
for none
-
setCustomLanguage
public UserLanguage setCustomLanguage(String customLanguage)
Other language. User can provide their own language name if there is no corresponding ISO 639
language code. If this is set, `languageCode` can't be set.
- Parameters:
customLanguage
- customLanguage or null
for none
-
getLanguageCode
public String getLanguageCode()
ISO 639 string representation of a language. See [Language Codes](/admin-
sdk/directory/v1/languages) for the list of supported codes. Valid language codes outside the
supported set will be accepted by the API but may lead to unexpected behavior. Illegal values
cause `SchemaException`. If this is set, `customLanguage` can't be set.
- Returns:
- value or
null
for none
-
setLanguageCode
public UserLanguage setLanguageCode(String languageCode)
ISO 639 string representation of a language. See [Language Codes](/admin-
sdk/directory/v1/languages) for the list of supported codes. Valid language codes outside the
supported set will be accepted by the API but may lead to unexpected behavior. Illegal values
cause `SchemaException`. If this is set, `customLanguage` can't be set.
- Parameters:
languageCode
- languageCode or null
for none
-
getPreference
public String getPreference()
Optional. If present, controls whether the specified `languageCode` is the user's preferred
language. If `customLanguage` is set, this can't be set. Allowed values are `preferred` and
`not_preferred`.
- Returns:
- value or
null
for none
-
setPreference
public UserLanguage setPreference(String preference)
Optional. If present, controls whether the specified `languageCode` is the user's preferred
language. If `customLanguage` is set, this can't be set. Allowed values are `preferred` and
`not_preferred`.
- Parameters:
preference
- preference or null
for none
-
set
public UserLanguage set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public UserLanguage clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2022 Google. All rights reserved.