diff --git a/gravatar/api/gravatar.api b/gravatar/api/gravatar.api index 7da2f95af..51e2229b4 100644 --- a/gravatar/api/gravatar.api +++ b/gravatar/api/gravatar.api @@ -492,7 +492,10 @@ public final class com/gravatar/restapi/models/Profile { public final fun getPronouns ()Ljava/lang/String; public final fun getPronunciation ()Ljava/lang/String; public final fun getRegistrationDate ()Ljava/lang/String; + public final fun getSectionVisibility ()Lcom/gravatar/restapi/models/ProfileSectionVisibility; public final fun getTimezone ()Ljava/lang/String; + public final fun getUserId ()Ljava/lang/Integer; + public final fun getUserLogin ()Ljava/lang/String; public final fun getVerifiedAccounts ()Ljava/util/List; public fun hashCode ()I public final fun isOrganization ()Ljava/lang/Boolean; @@ -526,7 +529,10 @@ public final class com/gravatar/restapi/models/Profile$Builder { public final fun getPronouns ()Ljava/lang/String; public final fun getPronunciation ()Ljava/lang/String; public final fun getRegistrationDate ()Ljava/lang/String; + public final fun getSectionVisibility ()Lcom/gravatar/restapi/models/ProfileSectionVisibility; public final fun getTimezone ()Ljava/lang/String; + public final fun getUserId ()Ljava/lang/Integer; + public final fun getUserLogin ()Ljava/lang/String; public final fun getVerifiedAccounts ()Ljava/util/List; public final fun isOrganization ()Ljava/lang/Boolean; public final fun setAvatarAltText (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder; @@ -579,8 +585,14 @@ public final class com/gravatar/restapi/models/Profile$Builder { public final synthetic fun setPronunciation (Ljava/lang/String;)V public final fun setRegistrationDate (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder; public final synthetic fun setRegistrationDate (Ljava/lang/String;)V + public final fun setSectionVisibility (Lcom/gravatar/restapi/models/ProfileSectionVisibility;)Lcom/gravatar/restapi/models/Profile$Builder; + public final synthetic fun setSectionVisibility (Lcom/gravatar/restapi/models/ProfileSectionVisibility;)V public final fun setTimezone (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder; public final synthetic fun setTimezone (Ljava/lang/String;)V + public final fun setUserId (Ljava/lang/Integer;)Lcom/gravatar/restapi/models/Profile$Builder; + public final synthetic fun setUserId (Ljava/lang/Integer;)V + public final fun setUserLogin (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder; + public final synthetic fun setUserLogin (Ljava/lang/String;)V public final fun setVerifiedAccounts (Ljava/util/List;)Lcom/gravatar/restapi/models/Profile$Builder; public final synthetic fun setVerifiedAccounts (Ljava/util/List;)V } @@ -679,6 +691,55 @@ public final class com/gravatar/restapi/models/ProfilePaymentsKt { public static final synthetic fun ProfilePayments (Lkotlin/jvm/functions/Function1;)Lcom/gravatar/restapi/models/ProfilePayments; } +public final class com/gravatar/restapi/models/ProfileSectionVisibility { + public fun ()V + public fun equals (Ljava/lang/Object;)Z + public final fun getHiddenContactInfo ()Ljava/lang/Boolean; + public final fun getHiddenInterests ()Ljava/lang/Boolean; + public final fun getHiddenLinks ()Ljava/lang/Boolean; + public final fun getHiddenPhotos ()Ljava/lang/Boolean; + public final fun getHiddenVerifiedAccounts ()Ljava/lang/Boolean; + public final fun getHiddenWallet ()Ljava/lang/Boolean; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/gravatar/restapi/models/ProfileSectionVisibility$Builder { + public fun ()V + public final fun build ()Lcom/gravatar/restapi/models/ProfileSectionVisibility; + public final fun getHiddenContactInfo ()Ljava/lang/Boolean; + public final fun getHiddenInterests ()Ljava/lang/Boolean; + public final fun getHiddenLinks ()Ljava/lang/Boolean; + public final fun getHiddenPhotos ()Ljava/lang/Boolean; + public final fun getHiddenVerifiedAccounts ()Ljava/lang/Boolean; + public final fun getHiddenWallet ()Ljava/lang/Boolean; + public final fun setHiddenContactInfo (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder; + public final synthetic fun setHiddenContactInfo (Ljava/lang/Boolean;)V + public final fun setHiddenInterests (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder; + public final synthetic fun setHiddenInterests (Ljava/lang/Boolean;)V + public final fun setHiddenLinks (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder; + public final synthetic fun setHiddenLinks (Ljava/lang/Boolean;)V + public final fun setHiddenPhotos (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder; + public final synthetic fun setHiddenPhotos (Ljava/lang/Boolean;)V + public final fun setHiddenVerifiedAccounts (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder; + public final synthetic fun setHiddenVerifiedAccounts (Ljava/lang/Boolean;)V + public final fun setHiddenWallet (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder; + public final synthetic fun setHiddenWallet (Ljava/lang/Boolean;)V +} + +public final class com/gravatar/restapi/models/ProfileSectionVisibilityJsonAdapter : com/squareup/moshi/JsonAdapter { + public fun (Lcom/squareup/moshi/Moshi;)V + public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/gravatar/restapi/models/ProfileSectionVisibility; + public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object; + public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/gravatar/restapi/models/ProfileSectionVisibility;)V + public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V + public fun toString ()Ljava/lang/String; +} + +public final class com/gravatar/restapi/models/ProfileSectionVisibilityKt { + public static final synthetic fun ProfileSectionVisibility (Lkotlin/jvm/functions/Function1;)Lcom/gravatar/restapi/models/ProfileSectionVisibility; +} + public final class com/gravatar/restapi/models/Rating : java/lang/Enum { public static final field Companion Lcom/gravatar/restapi/models/Rating$Companion; public static final field G Lcom/gravatar/restapi/models/Rating; @@ -761,10 +822,13 @@ public final class com/gravatar/restapi/models/UpdateAvatarRequestKt { public final class com/gravatar/restapi/models/UpdateProfileRequest { public fun ()V public fun equals (Ljava/lang/Object;)Z + public final fun getCellPhone ()Ljava/lang/String; public final fun getCompany ()Ljava/lang/String; + public final fun getContactEmail ()Ljava/lang/String; public final fun getDescription ()Ljava/lang/String; public final fun getDisplayName ()Ljava/lang/String; public final fun getFirstName ()Ljava/lang/String; + public final fun getHiddenContactInfo ()Ljava/lang/Boolean; public final fun getJobTitle ()Ljava/lang/String; public final fun getLastName ()Ljava/lang/String; public final fun getLocation ()Ljava/lang/String; @@ -777,23 +841,32 @@ public final class com/gravatar/restapi/models/UpdateProfileRequest { public final class com/gravatar/restapi/models/UpdateProfileRequest$Builder { public fun ()V public final fun build ()Lcom/gravatar/restapi/models/UpdateProfileRequest; + public final fun getCellPhone ()Ljava/lang/String; public final fun getCompany ()Ljava/lang/String; + public final fun getContactEmail ()Ljava/lang/String; public final fun getDescription ()Ljava/lang/String; public final fun getDisplayName ()Ljava/lang/String; public final fun getFirstName ()Ljava/lang/String; + public final fun getHiddenContactInfo ()Ljava/lang/Boolean; public final fun getJobTitle ()Ljava/lang/String; public final fun getLastName ()Ljava/lang/String; public final fun getLocation ()Ljava/lang/String; public final fun getPronouns ()Ljava/lang/String; public final fun getPronunciation ()Ljava/lang/String; + public final fun setCellPhone (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; + public final synthetic fun setCellPhone (Ljava/lang/String;)V public final fun setCompany (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; public final synthetic fun setCompany (Ljava/lang/String;)V + public final fun setContactEmail (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; + public final synthetic fun setContactEmail (Ljava/lang/String;)V public final fun setDescription (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; public final synthetic fun setDescription (Ljava/lang/String;)V public final fun setDisplayName (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; public final synthetic fun setDisplayName (Ljava/lang/String;)V public final fun setFirstName (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; public final synthetic fun setFirstName (Ljava/lang/String;)V + public final fun setHiddenContactInfo (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; + public final synthetic fun setHiddenContactInfo (Ljava/lang/Boolean;)V public final fun setJobTitle (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; public final synthetic fun setJobTitle (Ljava/lang/String;)V public final fun setLastName (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder; diff --git a/gravatar/openapi/api-gravatar.json b/gravatar/openapi/api-gravatar.json index 3ffcf347c..9b89d0bdd 100644 --- a/gravatar/openapi/api-gravatar.json +++ b/gravatar/openapi/api-gravatar.json @@ -323,6 +323,20 @@ "pronouns" ], "properties": { + "user_id": { + "type": "integer", + "description": "The unique user ID. NOTE: This is only provided in OAuth2 authenticated requests.", + "examples": [ + 1234567890 + ] + }, + "user_login": { + "type": "string", + "description": "The user's login name. NOTE: This is only provided in OAuth2 authenticated requests.", + "examples": [ + "alex" + ] + }, "hash": { "type": "string", "description": "The SHA256 hash of the user's primary email address.", @@ -582,6 +596,36 @@ "examples": [ "2021-10-01T12:00:00Z" ] + }, + "section_visibility": { + "type": "object", + "description": "The visibility of the user's profile sections.", + "properties": { + "hidden_contact_info": { + "type": "boolean", + "description": "Whether the user's contact info section is hidden." + }, + "hidden_links": { + "type": "boolean", + "description": "Whether the user's links section is hidden." + }, + "hidden_interests": { + "type": "boolean", + "description": "Whether the user's interests section is hidden." + }, + "hidden_wallet": { + "type": "boolean", + "description": "Whether the user's wallet section is hidden." + }, + "hidden_photos": { + "type": "boolean", + "description": "Whether the user's photo gallery section is hidden." + }, + "hidden_verified_accounts": { + "type": "boolean", + "description": "Whether the user's verified accounts section is hidden." + } + } } } }, @@ -910,6 +954,27 @@ "examples": [ "ACME Corp" ] + }, + "cell_phone": { + "type": "string", + "description": "The user's cell phone number.", + "examples": [ + "+1234567890" + ] + }, + "contact_email": { + "type": "string", + "description": "The user's contact email address.", + "examples": [ + "alex@example.com" + ] + }, + "hidden_contact_info": { + "type": "boolean", + "description": "Whether the user's contact information is hidden on their profile.", + "examples": [ + true + ] } } } diff --git a/gravatar/src/main/java/com/gravatar/restapi/models/Profile.kt b/gravatar/src/main/java/com/gravatar/restapi/models/Profile.kt index 5fbf2701c..6fd102ff3 100644 --- a/gravatar/src/main/java/com/gravatar/restapi/models/Profile.kt +++ b/gravatar/src/main/java/com/gravatar/restapi/models/Profile.kt @@ -26,6 +26,8 @@ import java.util.Objects * @param verifiedAccounts A list of verified accounts the user has added to their profile. This is limited to a max of 4 in unauthenticated requests. * @param pronunciation The phonetic pronunciation of the user's name. * @param pronouns The pronouns the user uses. + * @param userId The unique user ID. NOTE: This is only provided in OAuth2 authenticated requests. + * @param userLogin The user's login name. NOTE: This is only provided in OAuth2 authenticated requests. * @param timezone The timezone the user has. This is only provided in authenticated API requests. * @param languages The languages the user knows. This is only provided in authenticated API requests. * @param firstName User's first name. This is only provided in authenticated API requests. @@ -41,6 +43,7 @@ import java.util.Objects * @param numberVerifiedAccounts The number of verified accounts the user has added to their profile. This count includes verified accounts the user is hiding from their profile. This is only provided in authenticated API requests. * @param lastProfileEdit The date and time (UTC) the user last edited their profile. This is only provided in authenticated API requests. * @param registrationDate The date the user registered their account. This is only provided in authenticated API requests. + * @param sectionVisibility */ @JsonClass(generateAdapter = true) public class Profile internal constructor( @@ -80,6 +83,12 @@ public class Profile internal constructor( // The pronouns the user uses. @Json(name = "pronouns") public val pronouns: kotlin.String, + // The unique user ID. NOTE: This is only provided in OAuth2 authenticated requests. + @Json(name = "user_id") + public val userId: kotlin.Int? = null, + // The user's login name. NOTE: This is only provided in OAuth2 authenticated requests. + @Json(name = "user_login") + public val userLogin: kotlin.String? = null, // The timezone the user has. This is only provided in authenticated API requests. @Json(name = "timezone") public val timezone: kotlin.String? = null, @@ -123,8 +132,10 @@ public class Profile internal constructor( // The date the user registered their account. This is only provided in authenticated API requests. @Json(name = "registration_date") public val registrationDate: String? = null, + @Json(name = "section_visibility") + public val sectionVisibility: ProfileSectionVisibility? = null, ) { - override fun toString(): String = "Profile(hash=$hash, displayName=$displayName, profileUrl=$profileUrl, avatarUrl=$avatarUrl, avatarAltText=$avatarAltText, location=$location, description=$description, jobTitle=$jobTitle, company=$company, verifiedAccounts=$verifiedAccounts, pronunciation=$pronunciation, pronouns=$pronouns, timezone=$timezone, languages=$languages, firstName=$firstName, lastName=$lastName, isOrganization=$isOrganization, headerImage=$headerImage, backgroundColor=$backgroundColor, links=$links, interests=$interests, payments=$payments, contactInfo=$contactInfo, gallery=$gallery, numberVerifiedAccounts=$numberVerifiedAccounts, lastProfileEdit=$lastProfileEdit, registrationDate=$registrationDate)" + override fun toString(): String = "Profile(hash=$hash, displayName=$displayName, profileUrl=$profileUrl, avatarUrl=$avatarUrl, avatarAltText=$avatarAltText, location=$location, description=$description, jobTitle=$jobTitle, company=$company, verifiedAccounts=$verifiedAccounts, pronunciation=$pronunciation, pronouns=$pronouns, userId=$userId, userLogin=$userLogin, timezone=$timezone, languages=$languages, firstName=$firstName, lastName=$lastName, isOrganization=$isOrganization, headerImage=$headerImage, backgroundColor=$backgroundColor, links=$links, interests=$interests, payments=$payments, contactInfo=$contactInfo, gallery=$gallery, numberVerifiedAccounts=$numberVerifiedAccounts, lastProfileEdit=$lastProfileEdit, registrationDate=$registrationDate, sectionVisibility=$sectionVisibility)" override fun equals(other: Any?): Boolean = other is Profile && hash == other.hash && @@ -139,6 +150,8 @@ public class Profile internal constructor( verifiedAccounts == other.verifiedAccounts && pronunciation == other.pronunciation && pronouns == other.pronouns && + userId == other.userId && + userLogin == other.userLogin && timezone == other.timezone && languages == other.languages && firstName == other.firstName && @@ -153,9 +166,10 @@ public class Profile internal constructor( gallery == other.gallery && numberVerifiedAccounts == other.numberVerifiedAccounts && lastProfileEdit == other.lastProfileEdit && - registrationDate == other.registrationDate + registrationDate == other.registrationDate && + sectionVisibility == other.sectionVisibility - override fun hashCode(): Int = Objects.hash(hash, displayName, profileUrl, avatarUrl, avatarAltText, location, description, jobTitle, company, verifiedAccounts, pronunciation, pronouns, timezone, languages, firstName, lastName, isOrganization, headerImage, backgroundColor, links, interests, payments, contactInfo, gallery, numberVerifiedAccounts, lastProfileEdit, registrationDate) + override fun hashCode(): Int = Objects.hash(hash, displayName, profileUrl, avatarUrl, avatarAltText, location, description, jobTitle, company, verifiedAccounts, pronunciation, pronouns, userId, userLogin, timezone, languages, firstName, lastName, isOrganization, headerImage, backgroundColor, links, interests, payments, contactInfo, gallery, numberVerifiedAccounts, lastProfileEdit, registrationDate, sectionVisibility) public class Builder { // The SHA256 hash of the user's primary email address. @@ -206,6 +220,14 @@ public class Profile internal constructor( @set:JvmSynthetic // Hide 'void' setter from Java public var pronouns: kotlin.String? = null + // The unique user ID. NOTE: This is only provided in OAuth2 authenticated requests. + @set:JvmSynthetic // Hide 'void' setter from Java + public var userId: kotlin.Int? = null + + // The user's login name. NOTE: This is only provided in OAuth2 authenticated requests. + @set:JvmSynthetic // Hide 'void' setter from Java + public var userLogin: kotlin.String? = null + // The timezone the user has. This is only provided in authenticated API requests. @set:JvmSynthetic // Hide 'void' setter from Java public var timezone: kotlin.String? = null @@ -264,6 +286,9 @@ public class Profile internal constructor( @set:JvmSynthetic // Hide 'void' setter from Java public var registrationDate: String? = null + @set:JvmSynthetic // Hide 'void' setter from Java + public var sectionVisibility: ProfileSectionVisibility? = null + public fun setHash(hash: kotlin.String?): Builder = apply { this.hash = hash } public fun setDisplayName(displayName: kotlin.String?): Builder = apply { this.displayName = displayName } @@ -288,6 +313,10 @@ public class Profile internal constructor( public fun setPronouns(pronouns: kotlin.String?): Builder = apply { this.pronouns = pronouns } + public fun setUserId(userId: kotlin.Int?): Builder = apply { this.userId = userId } + + public fun setUserLogin(userLogin: kotlin.String?): Builder = apply { this.userLogin = userLogin } + public fun setTimezone(timezone: kotlin.String?): Builder = apply { this.timezone = timezone } public fun setLanguages(languages: kotlin.collections.List?): Builder = apply { this.languages = languages } @@ -318,7 +347,9 @@ public class Profile internal constructor( public fun setRegistrationDate(registrationDate: String?): Builder = apply { this.registrationDate = registrationDate } - public fun build(): Profile = Profile(hash!!, displayName!!, profileUrl!!, avatarUrl!!, avatarAltText!!, location!!, description!!, jobTitle!!, company!!, verifiedAccounts!!, pronunciation!!, pronouns!!, timezone, languages, firstName, lastName, isOrganization, headerImage, backgroundColor, links, interests, payments, contactInfo, gallery, numberVerifiedAccounts, lastProfileEdit, registrationDate) + public fun setSectionVisibility(sectionVisibility: ProfileSectionVisibility?): Builder = apply { this.sectionVisibility = sectionVisibility } + + public fun build(): Profile = Profile(hash!!, displayName!!, profileUrl!!, avatarUrl!!, avatarAltText!!, location!!, description!!, jobTitle!!, company!!, verifiedAccounts!!, pronunciation!!, pronouns!!, userId, userLogin, timezone, languages, firstName, lastName, isOrganization, headerImage, backgroundColor, links, interests, payments, contactInfo, gallery, numberVerifiedAccounts, lastProfileEdit, registrationDate, sectionVisibility) } } diff --git a/gravatar/src/main/java/com/gravatar/restapi/models/ProfileSectionVisibility.kt b/gravatar/src/main/java/com/gravatar/restapi/models/ProfileSectionVisibility.kt new file mode 100644 index 000000000..ed349701d --- /dev/null +++ b/gravatar/src/main/java/com/gravatar/restapi/models/ProfileSectionVisibility.kt @@ -0,0 +1,101 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ +package com.gravatar.restapi.models + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import java.util.Objects + +/** + * The visibility of the user's profile sections. + * + * @param hiddenContactInfo Whether the user's contact info section is hidden. + * @param hiddenLinks Whether the user's links section is hidden. + * @param hiddenInterests Whether the user's interests section is hidden. + * @param hiddenWallet Whether the user's wallet section is hidden. + * @param hiddenPhotos Whether the user's photo gallery section is hidden. + * @param hiddenVerifiedAccounts Whether the user's verified accounts section is hidden. + */ +@JsonClass(generateAdapter = true) +public class ProfileSectionVisibility internal constructor( + // Whether the user's contact info section is hidden. + @Json(name = "hidden_contact_info") + public val hiddenContactInfo: kotlin.Boolean? = null, + // Whether the user's links section is hidden. + @Json(name = "hidden_links") + public val hiddenLinks: kotlin.Boolean? = null, + // Whether the user's interests section is hidden. + @Json(name = "hidden_interests") + public val hiddenInterests: kotlin.Boolean? = null, + // Whether the user's wallet section is hidden. + @Json(name = "hidden_wallet") + public val hiddenWallet: kotlin.Boolean? = null, + // Whether the user's photo gallery section is hidden. + @Json(name = "hidden_photos") + public val hiddenPhotos: kotlin.Boolean? = null, + // Whether the user's verified accounts section is hidden. + @Json(name = "hidden_verified_accounts") + public val hiddenVerifiedAccounts: kotlin.Boolean? = null, +) { + override fun toString(): String = "ProfileSectionVisibility(hiddenContactInfo=$hiddenContactInfo, hiddenLinks=$hiddenLinks, hiddenInterests=$hiddenInterests, hiddenWallet=$hiddenWallet, hiddenPhotos=$hiddenPhotos, hiddenVerifiedAccounts=$hiddenVerifiedAccounts)" + + override fun equals(other: Any?): Boolean = other is ProfileSectionVisibility && + hiddenContactInfo == other.hiddenContactInfo && + hiddenLinks == other.hiddenLinks && + hiddenInterests == other.hiddenInterests && + hiddenWallet == other.hiddenWallet && + hiddenPhotos == other.hiddenPhotos && + hiddenVerifiedAccounts == other.hiddenVerifiedAccounts + + override fun hashCode(): Int = Objects.hash(hiddenContactInfo, hiddenLinks, hiddenInterests, hiddenWallet, hiddenPhotos, hiddenVerifiedAccounts) + + public class Builder { + // Whether the user's contact info section is hidden. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenContactInfo: kotlin.Boolean? = null + + // Whether the user's links section is hidden. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenLinks: kotlin.Boolean? = null + + // Whether the user's interests section is hidden. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenInterests: kotlin.Boolean? = null + + // Whether the user's wallet section is hidden. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenWallet: kotlin.Boolean? = null + + // Whether the user's photo gallery section is hidden. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenPhotos: kotlin.Boolean? = null + + // Whether the user's verified accounts section is hidden. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenVerifiedAccounts: kotlin.Boolean? = null + + public fun setHiddenContactInfo(hiddenContactInfo: kotlin.Boolean?): Builder = apply { this.hiddenContactInfo = hiddenContactInfo } + + public fun setHiddenLinks(hiddenLinks: kotlin.Boolean?): Builder = apply { this.hiddenLinks = hiddenLinks } + + public fun setHiddenInterests(hiddenInterests: kotlin.Boolean?): Builder = apply { this.hiddenInterests = hiddenInterests } + + public fun setHiddenWallet(hiddenWallet: kotlin.Boolean?): Builder = apply { this.hiddenWallet = hiddenWallet } + + public fun setHiddenPhotos(hiddenPhotos: kotlin.Boolean?): Builder = apply { this.hiddenPhotos = hiddenPhotos } + + public fun setHiddenVerifiedAccounts(hiddenVerifiedAccounts: kotlin.Boolean?): Builder = apply { this.hiddenVerifiedAccounts = hiddenVerifiedAccounts } + + public fun build(): ProfileSectionVisibility = ProfileSectionVisibility(hiddenContactInfo, hiddenLinks, hiddenInterests, hiddenWallet, hiddenPhotos, hiddenVerifiedAccounts) + } +} + +@JvmSynthetic // Hide from Java callers who should use Builder. +public fun ProfileSectionVisibility(initializer: ProfileSectionVisibility.Builder.() -> Unit): ProfileSectionVisibility { + return ProfileSectionVisibility.Builder().apply(initializer).build() +} diff --git a/gravatar/src/main/java/com/gravatar/restapi/models/UpdateProfileRequest.kt b/gravatar/src/main/java/com/gravatar/restapi/models/UpdateProfileRequest.kt index 07e6a4084..a578955f6 100644 --- a/gravatar/src/main/java/com/gravatar/restapi/models/UpdateProfileRequest.kt +++ b/gravatar/src/main/java/com/gravatar/restapi/models/UpdateProfileRequest.kt @@ -23,6 +23,9 @@ import java.util.Objects * @param location The user's location. * @param jobTitle The user's job title. * @param company The user's current company's name. + * @param cellPhone The user's cell phone number. + * @param contactEmail The user's contact email address. + * @param hiddenContactInfo Whether the user's contact information is hidden on their profile. */ @JsonClass(generateAdapter = true) public class UpdateProfileRequest internal constructor( @@ -53,8 +56,17 @@ public class UpdateProfileRequest internal constructor( // The user's current company's name. @Json(name = "company") public val company: kotlin.String? = null, + // The user's cell phone number. + @Json(name = "cell_phone") + public val cellPhone: kotlin.String? = null, + // The user's contact email address. + @Json(name = "contact_email") + public val contactEmail: kotlin.String? = null, + // Whether the user's contact information is hidden on their profile. + @Json(name = "hidden_contact_info") + public val hiddenContactInfo: kotlin.Boolean? = null, ) { - override fun toString(): String = "UpdateProfileRequest(firstName=$firstName, lastName=$lastName, displayName=$displayName, description=$description, pronunciation=$pronunciation, pronouns=$pronouns, location=$location, jobTitle=$jobTitle, company=$company)" + override fun toString(): String = "UpdateProfileRequest(firstName=$firstName, lastName=$lastName, displayName=$displayName, description=$description, pronunciation=$pronunciation, pronouns=$pronouns, location=$location, jobTitle=$jobTitle, company=$company, cellPhone=$cellPhone, contactEmail=$contactEmail, hiddenContactInfo=$hiddenContactInfo)" override fun equals(other: Any?): Boolean = other is UpdateProfileRequest && firstName == other.firstName && @@ -65,9 +77,12 @@ public class UpdateProfileRequest internal constructor( pronouns == other.pronouns && location == other.location && jobTitle == other.jobTitle && - company == other.company + company == other.company && + cellPhone == other.cellPhone && + contactEmail == other.contactEmail && + hiddenContactInfo == other.hiddenContactInfo - override fun hashCode(): Int = Objects.hash(firstName, lastName, displayName, description, pronunciation, pronouns, location, jobTitle, company) + override fun hashCode(): Int = Objects.hash(firstName, lastName, displayName, description, pronunciation, pronouns, location, jobTitle, company, cellPhone, contactEmail, hiddenContactInfo) public class Builder { // The user's first name. @@ -106,6 +121,18 @@ public class UpdateProfileRequest internal constructor( @set:JvmSynthetic // Hide 'void' setter from Java public var company: kotlin.String? = null + // The user's cell phone number. + @set:JvmSynthetic // Hide 'void' setter from Java + public var cellPhone: kotlin.String? = null + + // The user's contact email address. + @set:JvmSynthetic // Hide 'void' setter from Java + public var contactEmail: kotlin.String? = null + + // Whether the user's contact information is hidden on their profile. + @set:JvmSynthetic // Hide 'void' setter from Java + public var hiddenContactInfo: kotlin.Boolean? = null + public fun setFirstName(firstName: kotlin.String?): Builder = apply { this.firstName = firstName } public fun setLastName(lastName: kotlin.String?): Builder = apply { this.lastName = lastName } @@ -124,7 +151,13 @@ public class UpdateProfileRequest internal constructor( public fun setCompany(company: kotlin.String?): Builder = apply { this.company = company } - public fun build(): UpdateProfileRequest = UpdateProfileRequest(firstName, lastName, displayName, description, pronunciation, pronouns, location, jobTitle, company) + public fun setCellPhone(cellPhone: kotlin.String?): Builder = apply { this.cellPhone = cellPhone } + + public fun setContactEmail(contactEmail: kotlin.String?): Builder = apply { this.contactEmail = contactEmail } + + public fun setHiddenContactInfo(hiddenContactInfo: kotlin.Boolean?): Builder = apply { this.hiddenContactInfo = hiddenContactInfo } + + public fun build(): UpdateProfileRequest = UpdateProfileRequest(firstName, lastName, displayName, description, pronunciation, pronouns, location, jobTitle, company, cellPhone, contactEmail, hiddenContactInfo) } }