Class UpdateProfileFieldApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.server.request.UpdateProfileFieldApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
public class UpdateProfileFieldApiRequest
extends ZulipApiRequest
implements VoidExecutableApiRequest
Zulip API request builder for updating a custom profile field.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdateProfileFieldApiRequest(ZulipHttpClient client, long profileFieldId) Constructs aUpdateProfileFieldApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the Zulip API request for updating a custom profile field.withDisplayInProfileSummary(boolean displayInProfileSummary) Sets whether the profile field is displayed in the user profile summary.withEditableByUser(boolean editableByUser) Sets whether users can edit the value of the profile field on their own account.withFieldData(Map<String, ?> fieldData) Sets the field type specific configuration data, such as the options of a list of options field.Sets the help text displayed against the profile field in the Zulip UI.Sets the name of the profile field.withRequired(boolean required) Sets whether the profile field is required.withUseForUserMatching(boolean useForUserMatching) Sets whether the profile field can be used to match users, for example when importing users.Methods inherited from class ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
NAME
- See Also:
-
HINT
- See Also:
-
FIELD_DATA
- See Also:
-
DISPLAY_IN_PROFILE_SUMMARY
- See Also:
-
REQUIRED
- See Also:
-
EDITABLE_BY_USER
- See Also:
-
USE_FOR_USER_MATCHING
- See Also:
-
-
Constructor Details
-
UpdateProfileFieldApiRequest
Constructs aUpdateProfileFieldApiRequest.- Parameters:
client- The Zulip HTTP clientprofileFieldId- The id of the profile field to update
-
-
Method Details
-
withName
Sets the name of the profile field.- Parameters:
name- The name of the profile field- Returns:
- This
UpdateProfileFieldApiRequestinstance
-
withHint
Sets the help text displayed against the profile field in the Zulip UI.- Parameters:
hint- The help text for the profile field- Returns:
- This
UpdateProfileFieldApiRequestinstance
-
withFieldData
Sets the field type specific configuration data, such as the options of a list of options field.- Parameters:
fieldData- The field data- Returns:
- This
UpdateProfileFieldApiRequestinstance - See Also:
-
withDisplayInProfileSummary
Sets whether the profile field is displayed in the user profile summary.- Parameters:
displayInProfileSummary-trueto display the field in the user profile summary- Returns:
- This
UpdateProfileFieldApiRequestinstance
-
withRequired
Sets whether the profile field is required.- Parameters:
required-trueif users must provide a value for the field- Returns:
- This
UpdateProfileFieldApiRequestinstance
-
withEditableByUser
Sets whether users can edit the value of the profile field on their own account.- Parameters:
editableByUser-trueif users can edit the field- Returns:
- This
UpdateProfileFieldApiRequestinstance
-
withUseForUserMatching
Sets whether the profile field can be used to match users, for example when importing users.- Parameters:
useForUserMatching-trueto use the field for user matching- Returns:
- This
UpdateProfileFieldApiRequestinstance - See Also:
-
execute
Executes the Zulip API request for updating a custom profile field.- Specified by:
executein interfaceVoidExecutableApiRequest- Throws:
ZulipClientException- if the request was not successful
-