Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 4 KB

File metadata and controls

30 lines (24 loc) · 4 KB

class FullUserProfile

Member values

Member name Data type Description
user_profile UserProfile Information about the user, including its username.
password string User's password

Member functions

Function name Return type Input type Description
has_user_profile() const bool void Returns true if user_profile is set.
user_profile() const UserProfile& void Returns the current value of user_profile. If user_profile is not set, returns a UserProfile with none of its fields set (possibly user_profile::default_instance()).
mutable_user_profile() UserProfile * void Returns a pointer to the mutable UserProfile object that stores the field's value. If the field was not set prior to the call, then the returned UserProfile will have none of its fields set (i.e. it will be identical to a newly-allocated UserProfile). After calling this, has_user_profile() will return true and user_profile() will return a reference to the same instance of UserProfile.
clear_user_profile() void void Clears the value of the field. After calling this, has_user_profile() will return false and user_profile() will return the default value.
set_allocated_user_profile() void UserProfile * Sets the UserProfile object to the field and frees the previous field value if it exists. If the UserProfile pointer is not NULL, the message takes ownership of the allocated UserProfile object and has_ UserProfile() will return true. Otherwise, if the user_profile is NULL, the behavior is the same as calling clear_user_profile().
release_user_profile() UserProfile * void Releases the ownership of the field and returns the pointer of the UserProfile object. After calling this, caller takes the ownership of the allocated UserProfile object, has_user_profile() will return false, and user_profile() will return the default value.
password() const string& void Returns the current value of password. If password is not set, returns the empty string/empty bytes.
set_password() void const string& Sets the value of password. After calling this, password() will return a copy of value.
set_password() void string&& (C++11 and beyond): Sets the value of password, moving from the passed string. After calling this, password() will return a copy of value.
set_password() void const char* Sets the value of password using a C-style null-terminated string. After calling this, password() will return a copy of value.
mutable_password() string * void Returns a pointer to the mutable string object that stores password's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, password() will return whatever value is written into the given string.
clear_password() void void Clears the value of password. After calling this, password() will return the empty string/empty bytes.
set_allocated_password() void string* Sets the string object to the field and frees the previous field value if it exists. If the string pointer is not NULL, the message takes ownership of the allocated string object. The message is free to delete the allocated string object at any time, so references to the object may be invalidated. Otherwise, if the value is NULL, the behavior is the same as calling clear_password().
release_password() string * void Releases the ownership of password and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and password() will return the empty string/empty bytes.

Parent topic: Base (C++)