Class: Google::Apis::AdminDirectoryV1::UserLanguage

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/admin_directory_v1/classes.rb,
lib/google/apis/admin_directory_v1/representations.rb,
lib/google/apis/admin_directory_v1/representations.rb

Overview

JSON template for a language entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UserLanguage

Returns a new instance of UserLanguage.



5058
5059
5060
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 5058

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#custom_languageString

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. Corresponds to the JSON property customLanguage

Returns:

  • (String)


5040
5041
5042
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 5040

def custom_language
  @custom_language
end

#language_codeString

ISO 639 string representation of a language. See Language Codes 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. Corresponds to the JSON property languageCode

Returns:

  • (String)


5049
5050
5051
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 5049

def language_code
  @language_code
end

#preferenceString

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. Corresponds to the JSON property preference

Returns:

  • (String)


5056
5057
5058
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 5056

def preference
  @preference
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5063
5064
5065
5066
5067
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 5063

def update!(**args)
  @custom_language = args[:custom_language] if args.key?(:custom_language)
  @language_code = args[:language_code] if args.key?(:language_code)
  @preference = args[:preference] if args.key?(:preference)
end