deleteUserFromA
sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers);
return operation.doRequest(request).thenCompose(operation::handleResponse);
}
+
+ /**
+ * List Account Users
+ *
+ * Gets a list of all users associated with your account.
+ *
+ * @return The async call builder
+ */
+ public ListAccountUsersRequestBuilder listAccountUsers() {
+ return new ListAccountUsersRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * List Account Users
+ *
+ *
Gets a list of all users associated with your account.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture listAccountUsers(@Nonnull ListAccountUsersRequest request) {
+ return listAccountUsers(request, null);
+ }
+
+ /**
+ * List Account Users
+ *
+ * Gets a list of all users associated with your account.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @param options additional options
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture listAccountUsers(
+ @Nonnull ListAccountUsersRequest request, @Nullable Options options) {
+ AsyncRequestOperation operation =
+ new ListAccountUsers.Async(sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers);
+ return operation.doRequest(request).thenCompose(operation::handleResponse);
+ }
+
+ /**
+ * Get Account User
+ *
+ * Gets a single account user.
+ *
+ * @return The async call builder
+ */
+ public GetAccountUserRequestBuilder getAccountUser() {
+ return new GetAccountUserRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Get Account User
+ *
+ *
Gets a single account user.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture getAccountUser(@Nonnull GetAccountUserRequest request) {
+ return getAccountUser(request, null);
+ }
+
+ /**
+ * Get Account User
+ *
+ * Gets a single account user.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @param options additional options
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture getAccountUser(
+ @Nonnull GetAccountUserRequest request, @Nullable Options options) {
+ AsyncRequestOperation operation =
+ new GetAccountUser.Async(sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers);
+ return operation.doRequest(request).thenCompose(operation::handleResponse);
+ }
}
diff --git a/packages/java/src/main/java/com/cvent/SDKConfiguration.java b/packages/java/src/main/java/com/cvent/SDKConfiguration.java
index 61cce32f0..f37650929 100644
--- a/packages/java/src/main/java/com/cvent/SDKConfiguration.java
+++ b/packages/java/src/main/java/com/cvent/SDKConfiguration.java
@@ -20,7 +20,7 @@ public class SDKConfiguration {
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "ea";
- public static final String SDK_VERSION = "1.6.4";
+ public static final String SDK_VERSION = "1.6.5";
public static final String GEN_VERSION = "2.859.2";
private static final String BASE_PACKAGE = "com.cvent";
public static final String USER_AGENT = String.format(
diff --git a/packages/java/src/main/java/com/cvent/Users.java b/packages/java/src/main/java/com/cvent/Users.java
index 06cb8f94e..58a85c367 100644
--- a/packages/java/src/main/java/com/cvent/Users.java
+++ b/packages/java/src/main/java/com/cvent/Users.java
@@ -23,6 +23,12 @@
import com.cvent.models.operations.GetAccountUserGroupsRequest;
import com.cvent.models.operations.GetAccountUserGroupsRequestBuilder;
import com.cvent.models.operations.GetAccountUserGroupsResponse;
+import com.cvent.models.operations.GetAccountUserRequest;
+import com.cvent.models.operations.GetAccountUserRequestBuilder;
+import com.cvent.models.operations.GetAccountUserResponse;
+import com.cvent.models.operations.ListAccountUsersRequest;
+import com.cvent.models.operations.ListAccountUsersRequestBuilder;
+import com.cvent.models.operations.ListAccountUsersResponse;
import com.cvent.models.operations.UpdateAccountUserGroupRequest;
import com.cvent.models.operations.UpdateAccountUserGroupRequestBuilder;
import com.cvent.models.operations.UpdateAccountUserGroupResponse;
@@ -30,8 +36,10 @@
import com.cvent.operations.CreateAccountUserGroup;
import com.cvent.operations.DeleteAccountUserGroup;
import com.cvent.operations.DeleteUserFromAccountUserGroup;
+import com.cvent.operations.GetAccountUser;
import com.cvent.operations.GetAccountUserGroup;
import com.cvent.operations.GetAccountUserGroups;
+import com.cvent.operations.ListAccountUsers;
import com.cvent.operations.UpdateAccountUserGroup;
import com.cvent.utils.Headers;
import com.cvent.utils.Options;
@@ -348,4 +356,85 @@ public DeleteUserFromAccountUserGroupResponse deleteUserFromAccountUserGroup(
new DeleteUserFromAccountUserGroup.Sync(sdkConfiguration, options, _headers);
return operation.handleResponse(operation.doRequest(request));
}
+
+ /**
+ * List Account Users
+ *
+ * Gets a list of all users associated with your account.
+ *
+ * @return The call builder
+ */
+ public ListAccountUsersRequestBuilder listAccountUsers() {
+ return new ListAccountUsersRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * List Account Users
+ *
+ *
Gets a list of all users associated with your account.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public ListAccountUsersResponse listAccountUsers(@Nonnull ListAccountUsersRequest request) {
+ return listAccountUsers(request, null);
+ }
+
+ /**
+ * List Account Users
+ *
+ *
Gets a list of all users associated with your account.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @param options additional options
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public ListAccountUsersResponse listAccountUsers(
+ @Nonnull ListAccountUsersRequest request, @Nullable Options options) {
+ RequestOperation operation =
+ new ListAccountUsers.Sync(sdkConfiguration, options, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
+ /**
+ * Get Account User
+ *
+ * Gets a single account user.
+ *
+ * @return The call builder
+ */
+ public GetAccountUserRequestBuilder getAccountUser() {
+ return new GetAccountUserRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Get Account User
+ *
+ *
Gets a single account user.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public GetAccountUserResponse getAccountUser(@Nonnull GetAccountUserRequest request) {
+ return getAccountUser(request, null);
+ }
+
+ /**
+ * Get Account User
+ *
+ *
Gets a single account user.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @param options additional options
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public GetAccountUserResponse getAccountUser(@Nonnull GetAccountUserRequest request, @Nullable Options options) {
+ RequestOperation operation =
+ new GetAccountUser.Sync(sdkConfiguration, options, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
}
diff --git a/packages/java/src/main/java/com/cvent/hooks/OAuth2Scopes.java b/packages/java/src/main/java/com/cvent/hooks/OAuth2Scopes.java
index c043d8b16..05a96e519 100644
--- a/packages/java/src/main/java/com/cvent/hooks/OAuth2Scopes.java
+++ b/packages/java/src/main/java/com/cvent/hooks/OAuth2Scopes.java
@@ -52,7 +52,7 @@ public static enum OAuth2AuthorizationCode {
AccountUsersDelete("account/users:delete"),
/**
- * Allows the reading of User, User Group
+ * Allows the reading of account users
*/
AccountUsersRead("account/users:read"),
@@ -1194,7 +1194,7 @@ public static enum OAuth2ClientCredentials {
AccountUsersDelete("account/users:delete"),
/**
- * Allows the reading of User, User Group
+ * Allows the reading of account users
*/
AccountUsersRead("account/users:read"),
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUser.java b/packages/java/src/main/java/com/cvent/models/components/AccountUser.java
new file mode 100644
index 000000000..91ad43803
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUser.java
@@ -0,0 +1,886 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.LazySingletonValue;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.lang.Boolean;
+import java.lang.Override;
+import java.lang.String;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * AccountUser
+ *
+ * Represents a Cvent core account user.
+ */
+public class AccountUser {
+ /**
+ * The identifier of the Account User.
+ */
+ @JsonProperty("id")
+ private String id;
+
+ /**
+ * The account user's platform identifier.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("platformUserId")
+ private String platformUserId;
+
+ /**
+ * The account user's username used to log into the account.
+ */
+ @JsonProperty("username")
+ private String username;
+
+ /**
+ * The account user's federated SSO login name.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("federatedSsoLoginName")
+ private String federatedSsoLoginName;
+
+ /**
+ * The contact details of a Cvent core account user.
+ */
+ @JsonProperty("contact")
+ private AccountUserContactDetails contact;
+
+ /**
+ * Locale code
+ */
+ @JsonProperty("locale")
+ private String locale;
+
+ /**
+ * The IANA timezone of the user.
+ */
+ @JsonProperty("timezone")
+ private String timezone;
+
+ /**
+ * True indicates the account user is active. Active users can log into the account. Account users are
+ * created with this flag set to false by default.
+ */
+ @JsonProperty("active")
+ private boolean active;
+
+ /**
+ * True indicates the account user's username has been verified.
+ */
+ @JsonProperty("usernameVerified")
+ private boolean usernameVerified;
+
+ /**
+ * The account user's email verification status: `UNVERIFIED` indicates the email address has not been
+ * verified, `VERIFIED` indicates the email address has been verified, and `UNVERIFIED_BLOCK_LOGIN`
+ * indicates the email address has not been verified and the account user is blocked from logging in.
+ */
+ @JsonProperty("emailVerified")
+ private EmailVerified emailVerified;
+
+ /**
+ * True indicates the account user is locked.
+ */
+ @JsonProperty("lockedOut")
+ private boolean lockedOut;
+
+ /**
+ * True indicates the account user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ @JsonProperty("termsOfUseAccepted")
+ private boolean termsOfUseAccepted;
+
+ /**
+ * The number of failed login attempts.
+ */
+ @JsonProperty("failedLoginCount")
+ private long failedLoginCount;
+
+ /**
+ * True indicates the account user's uploaded documents will be considered internal and can only be
+ * viewed within the Cvent Platform.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("markDocumentsAsInternal")
+ private Boolean markDocumentsAsInternal;
+
+ /**
+ * The visibility access of the user.
+ *
+ *
`DOCUMENT` - The user has the ability to view all documents uploaded within their account.
+ *
+ *
`EMARKETING_CAMPAIGN` - The user has the ability to view all eMarketing campaigns within their
+ * account.
+ *
+ *
`EVENT` - The user has the ability to view all Events within their account.
+ *
+ *
`MEETING_REQUEST` - The user has the ability to view all meeting requests within their account.
+ *
+ *
`RFI` - The user has the ability to view all RFIs within their account.
+ *
+ *
`RFP` - The user has the ability to view all RFPs within their account.
+ *
+ *
`SURVEY` - The user has the ability to view all Surveys within their account.
+ */
+ @JsonProperty("visibilityAccess")
+ private List visibilityAccess;
+
+ /**
+ * The audit details of a Cvent core account user.
+ */
+ @JsonProperty("audit")
+ private AccountUserAuditDetails audit;
+
+ /**
+ * The account user's answers to account-level custom fields. Each item includes the custom field's ID,
+ * name, type, and submitted answer value(s).
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("customFields")
+ private List customFields;
+
+ /**
+ * A model used to reference a Cvent core account user role by its ID.
+ */
+ @JsonProperty("role")
+ private AccountUserRoleReference role;
+
+ @JsonCreator
+ public AccountUser(
+ @JsonProperty("id") @Nonnull String id,
+ @JsonProperty("platformUserId") @Nullable String platformUserId,
+ @JsonProperty("username") @Nonnull String username,
+ @JsonProperty("federatedSsoLoginName") @Nullable String federatedSsoLoginName,
+ @JsonProperty("contact") @Nonnull AccountUserContactDetails contact,
+ @JsonProperty("locale") @Nonnull String locale,
+ @JsonProperty("timezone") @Nonnull String timezone,
+ @JsonProperty("active") boolean active,
+ @JsonProperty("usernameVerified") boolean usernameVerified,
+ @JsonProperty("emailVerified") @Nonnull EmailVerified emailVerified,
+ @JsonProperty("lockedOut") boolean lockedOut,
+ @JsonProperty("termsOfUseAccepted") boolean termsOfUseAccepted,
+ @JsonProperty("failedLoginCount") long failedLoginCount,
+ @JsonProperty("markDocumentsAsInternal") @Nullable Boolean markDocumentsAsInternal,
+ @JsonProperty("visibilityAccess") @Nonnull List visibilityAccess,
+ @JsonProperty("audit") @Nonnull AccountUserAuditDetails audit,
+ @JsonProperty("customFields") @Nullable List customFields,
+ @JsonProperty("role") @Nonnull AccountUserRoleReference role) {
+ this.id = Optional.ofNullable(id).orElseThrow(() -> new IllegalArgumentException("id cannot be null"));
+ this.platformUserId = platformUserId;
+ this.username = Optional.ofNullable(username)
+ .orElseThrow(() -> new IllegalArgumentException("username cannot be null"));
+ this.federatedSsoLoginName = federatedSsoLoginName;
+ this.contact =
+ Optional.ofNullable(contact).orElseThrow(() -> new IllegalArgumentException("contact cannot be null"));
+ this.locale =
+ Optional.ofNullable(locale).orElseThrow(() -> new IllegalArgumentException("locale cannot be null"));
+ this.timezone = Optional.ofNullable(timezone)
+ .orElseThrow(() -> new IllegalArgumentException("timezone cannot be null"));
+ this.active = active;
+ this.usernameVerified = usernameVerified;
+ this.emailVerified = Optional.ofNullable(emailVerified)
+ .orElseThrow(() -> new IllegalArgumentException("emailVerified cannot be null"));
+ this.lockedOut = lockedOut;
+ this.termsOfUseAccepted = termsOfUseAccepted;
+ this.failedLoginCount = failedLoginCount;
+ this.markDocumentsAsInternal = Optional.ofNullable(markDocumentsAsInternal)
+ .orElse(Builder._SINGLETON_VALUE_MarkDocumentsAsInternal.value());
+ this.visibilityAccess = Optional.ofNullable(visibilityAccess)
+ .orElseThrow(() -> new IllegalArgumentException("visibilityAccess cannot be null"));
+ this.audit = Optional.ofNullable(audit).orElseThrow(() -> new IllegalArgumentException("audit cannot be null"));
+ this.customFields = customFields;
+ this.role = Optional.ofNullable(role).orElseThrow(() -> new IllegalArgumentException("role cannot be null"));
+ }
+
+ public AccountUser(
+ @Nonnull String id,
+ @Nonnull String username,
+ @Nonnull AccountUserContactDetails contact,
+ @Nonnull String locale,
+ @Nonnull String timezone,
+ boolean active,
+ boolean usernameVerified,
+ @Nonnull EmailVerified emailVerified,
+ boolean lockedOut,
+ boolean termsOfUseAccepted,
+ long failedLoginCount,
+ @Nonnull List visibilityAccess,
+ @Nonnull AccountUserAuditDetails audit,
+ @Nonnull AccountUserRoleReference role) {
+ this(
+ id,
+ null,
+ username,
+ null,
+ contact,
+ locale,
+ timezone,
+ active,
+ usernameVerified,
+ emailVerified,
+ lockedOut,
+ termsOfUseAccepted,
+ failedLoginCount,
+ null,
+ visibilityAccess,
+ audit,
+ null,
+ role);
+ }
+
+ /**
+ * The identifier of the Account User.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * The account user's platform identifier.
+ */
+ public Optional platformUserId() {
+ return Optional.ofNullable(this.platformUserId);
+ }
+
+ /**
+ * The account user's username used to log into the account.
+ */
+ public String username() {
+ return this.username;
+ }
+
+ /**
+ * The account user's federated SSO login name.
+ */
+ public Optional federatedSsoLoginName() {
+ return Optional.ofNullable(this.federatedSsoLoginName);
+ }
+
+ /**
+ * The contact details of a Cvent core account user.
+ */
+ public AccountUserContactDetails contact() {
+ return this.contact;
+ }
+
+ /**
+ * Locale code
+ */
+ public String locale() {
+ return this.locale;
+ }
+
+ /**
+ * The IANA timezone of the user.
+ */
+ public String timezone() {
+ return this.timezone;
+ }
+
+ /**
+ * True indicates the account user is active. Active users can log into the account. Account users are
+ * created with this flag set to false by default.
+ */
+ public boolean active() {
+ return this.active;
+ }
+
+ /**
+ * True indicates the account user's username has been verified.
+ */
+ public boolean usernameVerified() {
+ return this.usernameVerified;
+ }
+
+ /**
+ * The account user's email verification status: `UNVERIFIED` indicates the email address has not been
+ * verified, `VERIFIED` indicates the email address has been verified, and `UNVERIFIED_BLOCK_LOGIN`
+ * indicates the email address has not been verified and the account user is blocked from logging in.
+ */
+ public EmailVerified emailVerified() {
+ return this.emailVerified;
+ }
+
+ /**
+ * True indicates the account user is locked.
+ */
+ public boolean lockedOut() {
+ return this.lockedOut;
+ }
+
+ /**
+ * True indicates the account user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ public boolean termsOfUseAccepted() {
+ return this.termsOfUseAccepted;
+ }
+
+ /**
+ * The number of failed login attempts.
+ */
+ public long failedLoginCount() {
+ return this.failedLoginCount;
+ }
+
+ /**
+ * True indicates the account user's uploaded documents will be considered internal and can only be
+ * viewed within the Cvent Platform.
+ */
+ public Optional markDocumentsAsInternal() {
+ return Optional.ofNullable(this.markDocumentsAsInternal);
+ }
+
+ /**
+ * The visibility access of the user.
+ *
+ * `DOCUMENT` - The user has the ability to view all documents uploaded within their account.
+ *
+ *
`EMARKETING_CAMPAIGN` - The user has the ability to view all eMarketing campaigns within their
+ * account.
+ *
+ *
`EVENT` - The user has the ability to view all Events within their account.
+ *
+ *
`MEETING_REQUEST` - The user has the ability to view all meeting requests within their account.
+ *
+ *
`RFI` - The user has the ability to view all RFIs within their account.
+ *
+ *
`RFP` - The user has the ability to view all RFPs within their account.
+ *
+ *
`SURVEY` - The user has the ability to view all Surveys within their account.
+ */
+ public List visibilityAccess() {
+ return this.visibilityAccess;
+ }
+
+ /**
+ * The audit details of a Cvent core account user.
+ */
+ public AccountUserAuditDetails audit() {
+ return this.audit;
+ }
+
+ /**
+ * The account user's answers to account-level custom fields. Each item includes the custom field's ID,
+ * name, type, and submitted answer value(s).
+ */
+ public Optional> customFields() {
+ return Optional.ofNullable(this.customFields);
+ }
+
+ /**
+ * A model used to reference a Cvent core account user role by its ID.
+ */
+ public AccountUserRoleReference role() {
+ return this.role;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * The identifier of the Account User.
+ */
+ public AccountUser withId(@Nonnull String id) {
+ this.id = Utils.checkNotNull(id, "id");
+ return this;
+ }
+
+ /**
+ * The account user's platform identifier.
+ */
+ public AccountUser withPlatformUserId(@Nullable String platformUserId) {
+ this.platformUserId = platformUserId;
+ return this;
+ }
+
+ /**
+ * The account user's username used to log into the account.
+ */
+ public AccountUser withUsername(@Nonnull String username) {
+ this.username = Utils.checkNotNull(username, "username");
+ return this;
+ }
+
+ /**
+ * The account user's federated SSO login name.
+ */
+ public AccountUser withFederatedSsoLoginName(@Nullable String federatedSsoLoginName) {
+ this.federatedSsoLoginName = federatedSsoLoginName;
+ return this;
+ }
+
+ /**
+ * The contact details of a Cvent core account user.
+ */
+ public AccountUser withContact(@Nonnull AccountUserContactDetails contact) {
+ this.contact = Utils.checkNotNull(contact, "contact");
+ return this;
+ }
+
+ /**
+ * Locale code
+ */
+ public AccountUser withLocale(@Nonnull String locale) {
+ this.locale = Utils.checkNotNull(locale, "locale");
+ return this;
+ }
+
+ /**
+ * The IANA timezone of the user.
+ */
+ public AccountUser withTimezone(@Nonnull String timezone) {
+ this.timezone = Utils.checkNotNull(timezone, "timezone");
+ return this;
+ }
+
+ /**
+ * True indicates the account user is active. Active users can log into the account. Account users are
+ * created with this flag set to false by default.
+ */
+ public AccountUser withActive(boolean active) {
+ this.active = active;
+ return this;
+ }
+
+ /**
+ * True indicates the account user's username has been verified.
+ */
+ public AccountUser withUsernameVerified(boolean usernameVerified) {
+ this.usernameVerified = usernameVerified;
+ return this;
+ }
+
+ /**
+ * The account user's email verification status: `UNVERIFIED` indicates the email address has not been
+ * verified, `VERIFIED` indicates the email address has been verified, and `UNVERIFIED_BLOCK_LOGIN`
+ * indicates the email address has not been verified and the account user is blocked from logging in.
+ */
+ public AccountUser withEmailVerified(@Nonnull EmailVerified emailVerified) {
+ this.emailVerified = Utils.checkNotNull(emailVerified, "emailVerified");
+ return this;
+ }
+
+ /**
+ * True indicates the account user is locked.
+ */
+ public AccountUser withLockedOut(boolean lockedOut) {
+ this.lockedOut = lockedOut;
+ return this;
+ }
+
+ /**
+ * True indicates the account user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ public AccountUser withTermsOfUseAccepted(boolean termsOfUseAccepted) {
+ this.termsOfUseAccepted = termsOfUseAccepted;
+ return this;
+ }
+
+ /**
+ * The number of failed login attempts.
+ */
+ public AccountUser withFailedLoginCount(long failedLoginCount) {
+ this.failedLoginCount = failedLoginCount;
+ return this;
+ }
+
+ /**
+ * True indicates the account user's uploaded documents will be considered internal and can only be
+ * viewed within the Cvent Platform.
+ */
+ public AccountUser withMarkDocumentsAsInternal(@Nullable Boolean markDocumentsAsInternal) {
+ this.markDocumentsAsInternal = markDocumentsAsInternal;
+ return this;
+ }
+
+ /**
+ * The visibility access of the user.
+ *
+ * `DOCUMENT` - The user has the ability to view all documents uploaded within their account.
+ *
+ *
`EMARKETING_CAMPAIGN` - The user has the ability to view all eMarketing campaigns within their
+ * account.
+ *
+ *
`EVENT` - The user has the ability to view all Events within their account.
+ *
+ *
`MEETING_REQUEST` - The user has the ability to view all meeting requests within their account.
+ *
+ *
`RFI` - The user has the ability to view all RFIs within their account.
+ *
+ *
`RFP` - The user has the ability to view all RFPs within their account.
+ *
+ *
`SURVEY` - The user has the ability to view all Surveys within their account.
+ */
+ public AccountUser withVisibilityAccess(@Nonnull List visibilityAccess) {
+ this.visibilityAccess = Utils.checkNotNull(visibilityAccess, "visibilityAccess");
+ return this;
+ }
+
+ /**
+ * The audit details of a Cvent core account user.
+ */
+ public AccountUser withAudit(@Nonnull AccountUserAuditDetails audit) {
+ this.audit = Utils.checkNotNull(audit, "audit");
+ return this;
+ }
+
+ /**
+ * The account user's answers to account-level custom fields. Each item includes the custom field's ID,
+ * name, type, and submitted answer value(s).
+ */
+ public AccountUser withCustomFields(@Nullable List customFields) {
+ this.customFields = customFields;
+ return this;
+ }
+
+ /**
+ * A model used to reference a Cvent core account user role by its ID.
+ */
+ public AccountUser withRole(@Nonnull AccountUserRoleReference role) {
+ this.role = Utils.checkNotNull(role, "role");
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUser other = (AccountUser) o;
+ return Utils.enhancedDeepEquals(this.id, other.id)
+ && Utils.enhancedDeepEquals(this.platformUserId, other.platformUserId)
+ && Utils.enhancedDeepEquals(this.username, other.username)
+ && Utils.enhancedDeepEquals(this.federatedSsoLoginName, other.federatedSsoLoginName)
+ && Utils.enhancedDeepEquals(this.contact, other.contact)
+ && Utils.enhancedDeepEquals(this.locale, other.locale)
+ && Utils.enhancedDeepEquals(this.timezone, other.timezone)
+ && Utils.enhancedDeepEquals(this.active, other.active)
+ && Utils.enhancedDeepEquals(this.usernameVerified, other.usernameVerified)
+ && Utils.enhancedDeepEquals(this.emailVerified, other.emailVerified)
+ && Utils.enhancedDeepEquals(this.lockedOut, other.lockedOut)
+ && Utils.enhancedDeepEquals(this.termsOfUseAccepted, other.termsOfUseAccepted)
+ && Utils.enhancedDeepEquals(this.failedLoginCount, other.failedLoginCount)
+ && Utils.enhancedDeepEquals(this.markDocumentsAsInternal, other.markDocumentsAsInternal)
+ && Utils.enhancedDeepEquals(this.visibilityAccess, other.visibilityAccess)
+ && Utils.enhancedDeepEquals(this.audit, other.audit)
+ && Utils.enhancedDeepEquals(this.customFields, other.customFields)
+ && Utils.enhancedDeepEquals(this.role, other.role);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ id,
+ platformUserId,
+ username,
+ federatedSsoLoginName,
+ contact,
+ locale,
+ timezone,
+ active,
+ usernameVerified,
+ emailVerified,
+ lockedOut,
+ termsOfUseAccepted,
+ failedLoginCount,
+ markDocumentsAsInternal,
+ visibilityAccess,
+ audit,
+ customFields,
+ role);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ AccountUser.class,
+ "id",
+ id,
+ "platformUserId",
+ platformUserId,
+ "username",
+ username,
+ "federatedSsoLoginName",
+ federatedSsoLoginName,
+ "contact",
+ contact,
+ "locale",
+ locale,
+ "timezone",
+ timezone,
+ "active",
+ active,
+ "usernameVerified",
+ usernameVerified,
+ "emailVerified",
+ emailVerified,
+ "lockedOut",
+ lockedOut,
+ "termsOfUseAccepted",
+ termsOfUseAccepted,
+ "failedLoginCount",
+ failedLoginCount,
+ "markDocumentsAsInternal",
+ markDocumentsAsInternal,
+ "visibilityAccess",
+ visibilityAccess,
+ "audit",
+ audit,
+ "customFields",
+ customFields,
+ "role",
+ role);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String id;
+
+ private String platformUserId;
+
+ private String username;
+
+ private String federatedSsoLoginName;
+
+ private AccountUserContactDetails contact;
+
+ private String locale;
+
+ private String timezone;
+
+ private boolean active;
+
+ private boolean usernameVerified;
+
+ private EmailVerified emailVerified;
+
+ private boolean lockedOut;
+
+ private boolean termsOfUseAccepted;
+
+ private long failedLoginCount;
+
+ private Boolean markDocumentsAsInternal;
+
+ private List visibilityAccess;
+
+ private AccountUserAuditDetails audit;
+
+ private List customFields;
+
+ private AccountUserRoleReference role;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * The identifier of the Account User.
+ */
+ public Builder id(@Nonnull String id) {
+ this.id = Utils.checkNotNull(id, "id");
+ return this;
+ }
+
+ /**
+ * The account user's platform identifier.
+ */
+ public Builder platformUserId(@Nullable String platformUserId) {
+ this.platformUserId = platformUserId;
+ return this;
+ }
+
+ /**
+ * The account user's username used to log into the account.
+ */
+ public Builder username(@Nonnull String username) {
+ this.username = Utils.checkNotNull(username, "username");
+ return this;
+ }
+
+ /**
+ * The account user's federated SSO login name.
+ */
+ public Builder federatedSsoLoginName(@Nullable String federatedSsoLoginName) {
+ this.federatedSsoLoginName = federatedSsoLoginName;
+ return this;
+ }
+
+ /**
+ * The contact details of a Cvent core account user.
+ */
+ public Builder contact(@Nonnull AccountUserContactDetails contact) {
+ this.contact = Utils.checkNotNull(contact, "contact");
+ return this;
+ }
+
+ /**
+ * Locale code
+ */
+ public Builder locale(@Nonnull String locale) {
+ this.locale = Utils.checkNotNull(locale, "locale");
+ return this;
+ }
+
+ /**
+ * The IANA timezone of the user.
+ */
+ public Builder timezone(@Nonnull String timezone) {
+ this.timezone = Utils.checkNotNull(timezone, "timezone");
+ return this;
+ }
+
+ /**
+ * True indicates the account user is active. Active users can log into the account. Account users are
+ * created with this flag set to false by default.
+ */
+ public Builder active(boolean active) {
+ this.active = active;
+ return this;
+ }
+
+ /**
+ * True indicates the account user's username has been verified.
+ */
+ public Builder usernameVerified(boolean usernameVerified) {
+ this.usernameVerified = usernameVerified;
+ return this;
+ }
+
+ /**
+ * The account user's email verification status: `UNVERIFIED` indicates the email address has not been
+ * verified, `VERIFIED` indicates the email address has been verified, and `UNVERIFIED_BLOCK_LOGIN`
+ * indicates the email address has not been verified and the account user is blocked from logging in.
+ */
+ public Builder emailVerified(@Nonnull EmailVerified emailVerified) {
+ this.emailVerified = Utils.checkNotNull(emailVerified, "emailVerified");
+ return this;
+ }
+
+ /**
+ * True indicates the account user is locked.
+ */
+ public Builder lockedOut(boolean lockedOut) {
+ this.lockedOut = lockedOut;
+ return this;
+ }
+
+ /**
+ * True indicates the account user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ public Builder termsOfUseAccepted(boolean termsOfUseAccepted) {
+ this.termsOfUseAccepted = termsOfUseAccepted;
+ return this;
+ }
+
+ /**
+ * The number of failed login attempts.
+ */
+ public Builder failedLoginCount(long failedLoginCount) {
+ this.failedLoginCount = failedLoginCount;
+ return this;
+ }
+
+ /**
+ * True indicates the account user's uploaded documents will be considered internal and can only be
+ * viewed within the Cvent Platform.
+ */
+ public Builder markDocumentsAsInternal(@Nullable Boolean markDocumentsAsInternal) {
+ this.markDocumentsAsInternal = markDocumentsAsInternal;
+ return this;
+ }
+
+ /**
+ * The visibility access of the user.
+ *
+ * `DOCUMENT` - The user has the ability to view all documents uploaded within their account.
+ *
+ *
`EMARKETING_CAMPAIGN` - The user has the ability to view all eMarketing campaigns within their
+ * account.
+ *
+ *
`EVENT` - The user has the ability to view all Events within their account.
+ *
+ *
`MEETING_REQUEST` - The user has the ability to view all meeting requests within their account.
+ *
+ *
`RFI` - The user has the ability to view all RFIs within their account.
+ *
+ *
`RFP` - The user has the ability to view all RFPs within their account.
+ *
+ *
`SURVEY` - The user has the ability to view all Surveys within their account.
+ */
+ public Builder visibilityAccess(@Nonnull List visibilityAccess) {
+ this.visibilityAccess = Utils.checkNotNull(visibilityAccess, "visibilityAccess");
+ return this;
+ }
+
+ /**
+ * The audit details of a Cvent core account user.
+ */
+ public Builder audit(@Nonnull AccountUserAuditDetails audit) {
+ this.audit = Utils.checkNotNull(audit, "audit");
+ return this;
+ }
+
+ /**
+ * The account user's answers to account-level custom fields. Each item includes the custom field's ID,
+ * name, type, and submitted answer value(s).
+ */
+ public Builder customFields(@Nullable List customFields) {
+ this.customFields = customFields;
+ return this;
+ }
+
+ /**
+ * A model used to reference a Cvent core account user role by its ID.
+ */
+ public Builder role(@Nonnull AccountUserRoleReference role) {
+ this.role = Utils.checkNotNull(role, "role");
+ return this;
+ }
+
+ public AccountUser build() {
+ return new AccountUser(
+ id,
+ platformUserId,
+ username,
+ federatedSsoLoginName,
+ contact,
+ locale,
+ timezone,
+ active,
+ usernameVerified,
+ emailVerified,
+ lockedOut,
+ termsOfUseAccepted,
+ failedLoginCount,
+ markDocumentsAsInternal,
+ visibilityAccess,
+ audit,
+ customFields,
+ role);
+ }
+
+ private static final LazySingletonValue _SINGLETON_VALUE_MarkDocumentsAsInternal =
+ new LazySingletonValue<>("markDocumentsAsInternal", "false", new TypeReference() {});
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUserAddress.java b/packages/java/src/main/java/com/cvent/models/components/AccountUserAddress.java
new file mode 100644
index 000000000..3f81c7c86
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUserAddress.java
@@ -0,0 +1,334 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.annotation.Nullable;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+
+/**
+ * AccountUserAddress
+ *
+ * Represents the address of a Cvent core account user.
+ */
+public class AccountUserAddress {
+ /**
+ * First address line.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("address1")
+ private String address1;
+
+ /**
+ * Second address line.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("address2")
+ private String address2;
+
+ /**
+ * Third address line.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("address3")
+ private String address3;
+
+ /**
+ * Address city.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("city")
+ private String city;
+
+ /**
+ * The ISO 3166-1 alpha-2 code which represents the Country. Visit [Cvent's Country Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#country-codes) to learn more.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("countryCode")
+ private String countryCode;
+
+ /**
+ * The region, province, or state code. Visit [Cvent's Region Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#region-codes) to learn more.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("regionCode")
+ private String regionCode;
+
+ /**
+ * Address postal code.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("postalCode")
+ private String postalCode;
+
+ @JsonCreator
+ public AccountUserAddress(
+ @JsonProperty("address1") @Nullable String address1,
+ @JsonProperty("address2") @Nullable String address2,
+ @JsonProperty("address3") @Nullable String address3,
+ @JsonProperty("city") @Nullable String city,
+ @JsonProperty("countryCode") @Nullable String countryCode,
+ @JsonProperty("regionCode") @Nullable String regionCode,
+ @JsonProperty("postalCode") @Nullable String postalCode) {
+ this.address1 = address1;
+ this.address2 = address2;
+ this.address3 = address3;
+ this.city = city;
+ this.countryCode = countryCode;
+ this.regionCode = regionCode;
+ this.postalCode = postalCode;
+ }
+
+ public AccountUserAddress() {
+ this(null, null, null, null, null, null, null);
+ }
+
+ /**
+ * First address line.
+ */
+ public Optional address1() {
+ return Optional.ofNullable(this.address1);
+ }
+
+ /**
+ * Second address line.
+ */
+ public Optional address2() {
+ return Optional.ofNullable(this.address2);
+ }
+
+ /**
+ * Third address line.
+ */
+ public Optional address3() {
+ return Optional.ofNullable(this.address3);
+ }
+
+ /**
+ * Address city.
+ */
+ public Optional city() {
+ return Optional.ofNullable(this.city);
+ }
+
+ /**
+ * The ISO 3166-1 alpha-2 code which represents the Country. Visit [Cvent's Country Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#country-codes) to learn more.
+ */
+ public Optional countryCode() {
+ return Optional.ofNullable(this.countryCode);
+ }
+
+ /**
+ * The region, province, or state code. Visit [Cvent's Region Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#region-codes) to learn more.
+ */
+ public Optional regionCode() {
+ return Optional.ofNullable(this.regionCode);
+ }
+
+ /**
+ * Address postal code.
+ */
+ public Optional postalCode() {
+ return Optional.ofNullable(this.postalCode);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * First address line.
+ */
+ public AccountUserAddress withAddress1(@Nullable String address1) {
+ this.address1 = address1;
+ return this;
+ }
+
+ /**
+ * Second address line.
+ */
+ public AccountUserAddress withAddress2(@Nullable String address2) {
+ this.address2 = address2;
+ return this;
+ }
+
+ /**
+ * Third address line.
+ */
+ public AccountUserAddress withAddress3(@Nullable String address3) {
+ this.address3 = address3;
+ return this;
+ }
+
+ /**
+ * Address city.
+ */
+ public AccountUserAddress withCity(@Nullable String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * The ISO 3166-1 alpha-2 code which represents the Country. Visit [Cvent's Country Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#country-codes) to learn more.
+ */
+ public AccountUserAddress withCountryCode(@Nullable String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * The region, province, or state code. Visit [Cvent's Region Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#region-codes) to learn more.
+ */
+ public AccountUserAddress withRegionCode(@Nullable String regionCode) {
+ this.regionCode = regionCode;
+ return this;
+ }
+
+ /**
+ * Address postal code.
+ */
+ public AccountUserAddress withPostalCode(@Nullable String postalCode) {
+ this.postalCode = postalCode;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUserAddress other = (AccountUserAddress) o;
+ return Utils.enhancedDeepEquals(this.address1, other.address1)
+ && Utils.enhancedDeepEquals(this.address2, other.address2)
+ && Utils.enhancedDeepEquals(this.address3, other.address3)
+ && Utils.enhancedDeepEquals(this.city, other.city)
+ && Utils.enhancedDeepEquals(this.countryCode, other.countryCode)
+ && Utils.enhancedDeepEquals(this.regionCode, other.regionCode)
+ && Utils.enhancedDeepEquals(this.postalCode, other.postalCode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(address1, address2, address3, city, countryCode, regionCode, postalCode);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ AccountUserAddress.class,
+ "address1",
+ address1,
+ "address2",
+ address2,
+ "address3",
+ address3,
+ "city",
+ city,
+ "countryCode",
+ countryCode,
+ "regionCode",
+ regionCode,
+ "postalCode",
+ postalCode);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String address1;
+
+ private String address2;
+
+ private String address3;
+
+ private String city;
+
+ private String countryCode;
+
+ private String regionCode;
+
+ private String postalCode;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * First address line.
+ */
+ public Builder address1(@Nullable String address1) {
+ this.address1 = address1;
+ return this;
+ }
+
+ /**
+ * Second address line.
+ */
+ public Builder address2(@Nullable String address2) {
+ this.address2 = address2;
+ return this;
+ }
+
+ /**
+ * Third address line.
+ */
+ public Builder address3(@Nullable String address3) {
+ this.address3 = address3;
+ return this;
+ }
+
+ /**
+ * Address city.
+ */
+ public Builder city(@Nullable String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * The ISO 3166-1 alpha-2 code which represents the Country. Visit [Cvent's Country Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#country-codes) to learn more.
+ */
+ public Builder countryCode(@Nullable String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * The region, province, or state code. Visit [Cvent's Region Code API
+ * Standards](https://developers.cvent.com/docs/rest-api/api-standards#region-codes) to learn more.
+ */
+ public Builder regionCode(@Nullable String regionCode) {
+ this.regionCode = regionCode;
+ return this;
+ }
+
+ /**
+ * Address postal code.
+ */
+ public Builder postalCode(@Nullable String postalCode) {
+ this.postalCode = postalCode;
+ return this;
+ }
+
+ public AccountUserAddress build() {
+ return new AccountUserAddress(address1, address2, address3, city, countryCode, regionCode, postalCode);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUserAuditDetails.java b/packages/java/src/main/java/com/cvent/models/components/AccountUserAuditDetails.java
new file mode 100644
index 000000000..7ca5f6492
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUserAuditDetails.java
@@ -0,0 +1,378 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.annotation.Nonnull;
+import java.lang.Override;
+import java.lang.String;
+import java.time.OffsetDateTime;
+import java.util.Optional;
+
+/**
+ * AccountUserAuditDetails
+ *
+ * The audit details of a Cvent core account user.
+ */
+public class AccountUserAuditDetails {
+ /**
+ * The ISO 8601 zoned date time when this record was created.
+ */
+ @JsonProperty("created")
+ private OffsetDateTime created;
+
+ /**
+ * The identifier of the user that created this record.
+ */
+ @JsonProperty("createdBy")
+ private String createdBy;
+
+ /**
+ * The ISO 8601 zoned date time when this record was updated.
+ */
+ @JsonProperty("lastModified")
+ private OffsetDateTime lastModified;
+
+ /**
+ * The identifier of the user that last updated this record.
+ */
+ @JsonProperty("lastModifiedBy")
+ private String lastModifiedBy;
+
+ /**
+ * The ISO 8601 zoned date time when the user was locked out.
+ */
+ @JsonProperty("lockedOutDate")
+ private OffsetDateTime lockedOutDate;
+
+ /**
+ * The ISO 8601 zoned date time when the user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ @JsonProperty("termsOfUseAcceptedDate")
+ private OffsetDateTime termsOfUseAcceptedDate;
+
+ /**
+ * The ISO 8601 zoned date time when the user last logged in.
+ */
+ @JsonProperty("lastLoginDate")
+ private OffsetDateTime lastLoginDate;
+
+ /**
+ * The ISO 8601 zoned date time when the user's password was last modified.
+ */
+ @JsonProperty("passwordLastModifiedDate")
+ private OffsetDateTime passwordLastModifiedDate;
+
+ @JsonCreator
+ public AccountUserAuditDetails(
+ @JsonProperty("created") @Nonnull OffsetDateTime created,
+ @JsonProperty("createdBy") @Nonnull String createdBy,
+ @JsonProperty("lastModified") @Nonnull OffsetDateTime lastModified,
+ @JsonProperty("lastModifiedBy") @Nonnull String lastModifiedBy,
+ @JsonProperty("lockedOutDate") @Nonnull OffsetDateTime lockedOutDate,
+ @JsonProperty("termsOfUseAcceptedDate") @Nonnull OffsetDateTime termsOfUseAcceptedDate,
+ @JsonProperty("lastLoginDate") @Nonnull OffsetDateTime lastLoginDate,
+ @JsonProperty("passwordLastModifiedDate") @Nonnull OffsetDateTime passwordLastModifiedDate) {
+ this.created =
+ Optional.ofNullable(created).orElseThrow(() -> new IllegalArgumentException("created cannot be null"));
+ this.createdBy = Optional.ofNullable(createdBy)
+ .orElseThrow(() -> new IllegalArgumentException("createdBy cannot be null"));
+ this.lastModified = Optional.ofNullable(lastModified)
+ .orElseThrow(() -> new IllegalArgumentException("lastModified cannot be null"));
+ this.lastModifiedBy = Optional.ofNullable(lastModifiedBy)
+ .orElseThrow(() -> new IllegalArgumentException("lastModifiedBy cannot be null"));
+ this.lockedOutDate = Optional.ofNullable(lockedOutDate)
+ .orElseThrow(() -> new IllegalArgumentException("lockedOutDate cannot be null"));
+ this.termsOfUseAcceptedDate = Optional.ofNullable(termsOfUseAcceptedDate)
+ .orElseThrow(() -> new IllegalArgumentException("termsOfUseAcceptedDate cannot be null"));
+ this.lastLoginDate = Optional.ofNullable(lastLoginDate)
+ .orElseThrow(() -> new IllegalArgumentException("lastLoginDate cannot be null"));
+ this.passwordLastModifiedDate = Optional.ofNullable(passwordLastModifiedDate)
+ .orElseThrow(() -> new IllegalArgumentException("passwordLastModifiedDate cannot be null"));
+ }
+
+ /**
+ * The ISO 8601 zoned date time when this record was created.
+ */
+ public OffsetDateTime created() {
+ return this.created;
+ }
+
+ /**
+ * The identifier of the user that created this record.
+ */
+ public String createdBy() {
+ return this.createdBy;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when this record was updated.
+ */
+ public OffsetDateTime lastModified() {
+ return this.lastModified;
+ }
+
+ /**
+ * The identifier of the user that last updated this record.
+ */
+ public String lastModifiedBy() {
+ return this.lastModifiedBy;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user was locked out.
+ */
+ public OffsetDateTime lockedOutDate() {
+ return this.lockedOutDate;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ public OffsetDateTime termsOfUseAcceptedDate() {
+ return this.termsOfUseAcceptedDate;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user last logged in.
+ */
+ public OffsetDateTime lastLoginDate() {
+ return this.lastLoginDate;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user's password was last modified.
+ */
+ public OffsetDateTime passwordLastModifiedDate() {
+ return this.passwordLastModifiedDate;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * The ISO 8601 zoned date time when this record was created.
+ */
+ public AccountUserAuditDetails withCreated(@Nonnull OffsetDateTime created) {
+ this.created = Utils.checkNotNull(created, "created");
+ return this;
+ }
+
+ /**
+ * The identifier of the user that created this record.
+ */
+ public AccountUserAuditDetails withCreatedBy(@Nonnull String createdBy) {
+ this.createdBy = Utils.checkNotNull(createdBy, "createdBy");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when this record was updated.
+ */
+ public AccountUserAuditDetails withLastModified(@Nonnull OffsetDateTime lastModified) {
+ this.lastModified = Utils.checkNotNull(lastModified, "lastModified");
+ return this;
+ }
+
+ /**
+ * The identifier of the user that last updated this record.
+ */
+ public AccountUserAuditDetails withLastModifiedBy(@Nonnull String lastModifiedBy) {
+ this.lastModifiedBy = Utils.checkNotNull(lastModifiedBy, "lastModifiedBy");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user was locked out.
+ */
+ public AccountUserAuditDetails withLockedOutDate(@Nonnull OffsetDateTime lockedOutDate) {
+ this.lockedOutDate = Utils.checkNotNull(lockedOutDate, "lockedOutDate");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ public AccountUserAuditDetails withTermsOfUseAcceptedDate(@Nonnull OffsetDateTime termsOfUseAcceptedDate) {
+ this.termsOfUseAcceptedDate = Utils.checkNotNull(termsOfUseAcceptedDate, "termsOfUseAcceptedDate");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user last logged in.
+ */
+ public AccountUserAuditDetails withLastLoginDate(@Nonnull OffsetDateTime lastLoginDate) {
+ this.lastLoginDate = Utils.checkNotNull(lastLoginDate, "lastLoginDate");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user's password was last modified.
+ */
+ public AccountUserAuditDetails withPasswordLastModifiedDate(@Nonnull OffsetDateTime passwordLastModifiedDate) {
+ this.passwordLastModifiedDate = Utils.checkNotNull(passwordLastModifiedDate, "passwordLastModifiedDate");
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUserAuditDetails other = (AccountUserAuditDetails) o;
+ return Utils.enhancedDeepEquals(this.created, other.created)
+ && Utils.enhancedDeepEquals(this.createdBy, other.createdBy)
+ && Utils.enhancedDeepEquals(this.lastModified, other.lastModified)
+ && Utils.enhancedDeepEquals(this.lastModifiedBy, other.lastModifiedBy)
+ && Utils.enhancedDeepEquals(this.lockedOutDate, other.lockedOutDate)
+ && Utils.enhancedDeepEquals(this.termsOfUseAcceptedDate, other.termsOfUseAcceptedDate)
+ && Utils.enhancedDeepEquals(this.lastLoginDate, other.lastLoginDate)
+ && Utils.enhancedDeepEquals(this.passwordLastModifiedDate, other.passwordLastModifiedDate);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ created,
+ createdBy,
+ lastModified,
+ lastModifiedBy,
+ lockedOutDate,
+ termsOfUseAcceptedDate,
+ lastLoginDate,
+ passwordLastModifiedDate);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ AccountUserAuditDetails.class,
+ "created",
+ created,
+ "createdBy",
+ createdBy,
+ "lastModified",
+ lastModified,
+ "lastModifiedBy",
+ lastModifiedBy,
+ "lockedOutDate",
+ lockedOutDate,
+ "termsOfUseAcceptedDate",
+ termsOfUseAcceptedDate,
+ "lastLoginDate",
+ lastLoginDate,
+ "passwordLastModifiedDate",
+ passwordLastModifiedDate);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private OffsetDateTime created;
+
+ private String createdBy;
+
+ private OffsetDateTime lastModified;
+
+ private String lastModifiedBy;
+
+ private OffsetDateTime lockedOutDate;
+
+ private OffsetDateTime termsOfUseAcceptedDate;
+
+ private OffsetDateTime lastLoginDate;
+
+ private OffsetDateTime passwordLastModifiedDate;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * The ISO 8601 zoned date time when this record was created.
+ */
+ public Builder created(@Nonnull OffsetDateTime created) {
+ this.created = Utils.checkNotNull(created, "created");
+ return this;
+ }
+
+ /**
+ * The identifier of the user that created this record.
+ */
+ public Builder createdBy(@Nonnull String createdBy) {
+ this.createdBy = Utils.checkNotNull(createdBy, "createdBy");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when this record was updated.
+ */
+ public Builder lastModified(@Nonnull OffsetDateTime lastModified) {
+ this.lastModified = Utils.checkNotNull(lastModified, "lastModified");
+ return this;
+ }
+
+ /**
+ * The identifier of the user that last updated this record.
+ */
+ public Builder lastModifiedBy(@Nonnull String lastModifiedBy) {
+ this.lastModifiedBy = Utils.checkNotNull(lastModifiedBy, "lastModifiedBy");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user was locked out.
+ */
+ public Builder lockedOutDate(@Nonnull OffsetDateTime lockedOutDate) {
+ this.lockedOutDate = Utils.checkNotNull(lockedOutDate, "lockedOutDate");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user has accepted [Cvent's Terms of
+ * Use](https://www.cvent.com/en/product-terms-of-use).
+ */
+ public Builder termsOfUseAcceptedDate(@Nonnull OffsetDateTime termsOfUseAcceptedDate) {
+ this.termsOfUseAcceptedDate = Utils.checkNotNull(termsOfUseAcceptedDate, "termsOfUseAcceptedDate");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user last logged in.
+ */
+ public Builder lastLoginDate(@Nonnull OffsetDateTime lastLoginDate) {
+ this.lastLoginDate = Utils.checkNotNull(lastLoginDate, "lastLoginDate");
+ return this;
+ }
+
+ /**
+ * The ISO 8601 zoned date time when the user's password was last modified.
+ */
+ public Builder passwordLastModifiedDate(@Nonnull OffsetDateTime passwordLastModifiedDate) {
+ this.passwordLastModifiedDate = Utils.checkNotNull(passwordLastModifiedDate, "passwordLastModifiedDate");
+ return this;
+ }
+
+ public AccountUserAuditDetails build() {
+ return new AccountUserAuditDetails(
+ created,
+ createdBy,
+ lastModified,
+ lastModifiedBy,
+ lockedOutDate,
+ termsOfUseAcceptedDate,
+ lastLoginDate,
+ passwordLastModifiedDate);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUserContactDetails.java b/packages/java/src/main/java/com/cvent/models/components/AccountUserContactDetails.java
new file mode 100644
index 000000000..4c47f651f
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUserContactDetails.java
@@ -0,0 +1,613 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+
+/**
+ * AccountUserContactDetails
+ *
+ *
The contact details of a Cvent core account user.
+ */
+public class AccountUserContactDetails {
+ /**
+ * Honorific prefix to use before users name.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("honorificPrefix")
+ private String honorificPrefix;
+
+ /**
+ * User's first name.
+ */
+ @JsonProperty("firstName")
+ private String firstName;
+
+ /**
+ * User's middle name.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("middleName")
+ private String middleName;
+
+ /**
+ * User's last name.
+ */
+ @JsonProperty("lastName")
+ private String lastName;
+
+ /**
+ * Position held by the current user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("title")
+ private String title;
+
+ /**
+ * Organization in which the user is employed.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("organization")
+ private String organization;
+
+ /**
+ * User associated email.
+ */
+ @JsonProperty("email")
+ private String email;
+
+ /**
+ * Phone number associated to given user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("homePhone")
+ private String homePhone;
+
+ /**
+ * Phone number associated to given user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("homeFax")
+ private String homeFax;
+
+ /**
+ * Phone number associated to given user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("mobilePhone")
+ private String mobilePhone;
+
+ /**
+ * Phone number associated to given user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("workPhone")
+ private String workPhone;
+
+ /**
+ * Phone number associated to given user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("workFax")
+ private String workFax;
+
+ /**
+ * Phone number associated to given user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("pager")
+ private String pager;
+
+ /**
+ * Represents the address of a Cvent core account user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("address")
+ private AccountUserAddress address;
+
+ @JsonCreator
+ public AccountUserContactDetails(
+ @JsonProperty("honorificPrefix") @Nullable String honorificPrefix,
+ @JsonProperty("firstName") @Nonnull String firstName,
+ @JsonProperty("middleName") @Nullable String middleName,
+ @JsonProperty("lastName") @Nonnull String lastName,
+ @JsonProperty("title") @Nullable String title,
+ @JsonProperty("organization") @Nullable String organization,
+ @JsonProperty("email") @Nonnull String email,
+ @JsonProperty("homePhone") @Nullable String homePhone,
+ @JsonProperty("homeFax") @Nullable String homeFax,
+ @JsonProperty("mobilePhone") @Nullable String mobilePhone,
+ @JsonProperty("workPhone") @Nullable String workPhone,
+ @JsonProperty("workFax") @Nullable String workFax,
+ @JsonProperty("pager") @Nullable String pager,
+ @JsonProperty("address") @Nullable AccountUserAddress address) {
+ this.honorificPrefix = honorificPrefix;
+ this.firstName = Optional.ofNullable(firstName)
+ .orElseThrow(() -> new IllegalArgumentException("firstName cannot be null"));
+ this.middleName = middleName;
+ this.lastName = Optional.ofNullable(lastName)
+ .orElseThrow(() -> new IllegalArgumentException("lastName cannot be null"));
+ this.title = title;
+ this.organization = organization;
+ this.email = Optional.ofNullable(email).orElseThrow(() -> new IllegalArgumentException("email cannot be null"));
+ this.homePhone = homePhone;
+ this.homeFax = homeFax;
+ this.mobilePhone = mobilePhone;
+ this.workPhone = workPhone;
+ this.workFax = workFax;
+ this.pager = pager;
+ this.address = address;
+ }
+
+ public AccountUserContactDetails(@Nonnull String firstName, @Nonnull String lastName, @Nonnull String email) {
+ this(null, firstName, null, lastName, null, null, email, null, null, null, null, null, null, null);
+ }
+
+ /**
+ * Honorific prefix to use before users name.
+ */
+ public Optional honorificPrefix() {
+ return Optional.ofNullable(this.honorificPrefix);
+ }
+
+ /**
+ * User's first name.
+ */
+ public String firstName() {
+ return this.firstName;
+ }
+
+ /**
+ * User's middle name.
+ */
+ public Optional middleName() {
+ return Optional.ofNullable(this.middleName);
+ }
+
+ /**
+ * User's last name.
+ */
+ public String lastName() {
+ return this.lastName;
+ }
+
+ /**
+ * Position held by the current user.
+ */
+ public Optional title() {
+ return Optional.ofNullable(this.title);
+ }
+
+ /**
+ * Organization in which the user is employed.
+ */
+ public Optional organization() {
+ return Optional.ofNullable(this.organization);
+ }
+
+ /**
+ * User associated email.
+ */
+ public String email() {
+ return this.email;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Optional homePhone() {
+ return Optional.ofNullable(this.homePhone);
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Optional homeFax() {
+ return Optional.ofNullable(this.homeFax);
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Optional mobilePhone() {
+ return Optional.ofNullable(this.mobilePhone);
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Optional workPhone() {
+ return Optional.ofNullable(this.workPhone);
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Optional workFax() {
+ return Optional.ofNullable(this.workFax);
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Optional pager() {
+ return Optional.ofNullable(this.pager);
+ }
+
+ /**
+ * Represents the address of a Cvent core account user.
+ */
+ public Optional address() {
+ return Optional.ofNullable(this.address);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Honorific prefix to use before users name.
+ */
+ public AccountUserContactDetails withHonorificPrefix(@Nullable String honorificPrefix) {
+ this.honorificPrefix = honorificPrefix;
+ return this;
+ }
+
+ /**
+ * User's first name.
+ */
+ public AccountUserContactDetails withFirstName(@Nonnull String firstName) {
+ this.firstName = Utils.checkNotNull(firstName, "firstName");
+ return this;
+ }
+
+ /**
+ * User's middle name.
+ */
+ public AccountUserContactDetails withMiddleName(@Nullable String middleName) {
+ this.middleName = middleName;
+ return this;
+ }
+
+ /**
+ * User's last name.
+ */
+ public AccountUserContactDetails withLastName(@Nonnull String lastName) {
+ this.lastName = Utils.checkNotNull(lastName, "lastName");
+ return this;
+ }
+
+ /**
+ * Position held by the current user.
+ */
+ public AccountUserContactDetails withTitle(@Nullable String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Organization in which the user is employed.
+ */
+ public AccountUserContactDetails withOrganization(@Nullable String organization) {
+ this.organization = organization;
+ return this;
+ }
+
+ /**
+ * User associated email.
+ */
+ public AccountUserContactDetails withEmail(@Nonnull String email) {
+ this.email = Utils.checkNotNull(email, "email");
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public AccountUserContactDetails withHomePhone(@Nullable String homePhone) {
+ this.homePhone = homePhone;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public AccountUserContactDetails withHomeFax(@Nullable String homeFax) {
+ this.homeFax = homeFax;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public AccountUserContactDetails withMobilePhone(@Nullable String mobilePhone) {
+ this.mobilePhone = mobilePhone;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public AccountUserContactDetails withWorkPhone(@Nullable String workPhone) {
+ this.workPhone = workPhone;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public AccountUserContactDetails withWorkFax(@Nullable String workFax) {
+ this.workFax = workFax;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public AccountUserContactDetails withPager(@Nullable String pager) {
+ this.pager = pager;
+ return this;
+ }
+
+ /**
+ * Represents the address of a Cvent core account user.
+ */
+ public AccountUserContactDetails withAddress(@Nullable AccountUserAddress address) {
+ this.address = address;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUserContactDetails other = (AccountUserContactDetails) o;
+ return Utils.enhancedDeepEquals(this.honorificPrefix, other.honorificPrefix)
+ && Utils.enhancedDeepEquals(this.firstName, other.firstName)
+ && Utils.enhancedDeepEquals(this.middleName, other.middleName)
+ && Utils.enhancedDeepEquals(this.lastName, other.lastName)
+ && Utils.enhancedDeepEquals(this.title, other.title)
+ && Utils.enhancedDeepEquals(this.organization, other.organization)
+ && Utils.enhancedDeepEquals(this.email, other.email)
+ && Utils.enhancedDeepEquals(this.homePhone, other.homePhone)
+ && Utils.enhancedDeepEquals(this.homeFax, other.homeFax)
+ && Utils.enhancedDeepEquals(this.mobilePhone, other.mobilePhone)
+ && Utils.enhancedDeepEquals(this.workPhone, other.workPhone)
+ && Utils.enhancedDeepEquals(this.workFax, other.workFax)
+ && Utils.enhancedDeepEquals(this.pager, other.pager)
+ && Utils.enhancedDeepEquals(this.address, other.address);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ honorificPrefix,
+ firstName,
+ middleName,
+ lastName,
+ title,
+ organization,
+ email,
+ homePhone,
+ homeFax,
+ mobilePhone,
+ workPhone,
+ workFax,
+ pager,
+ address);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ AccountUserContactDetails.class,
+ "honorificPrefix",
+ honorificPrefix,
+ "firstName",
+ firstName,
+ "middleName",
+ middleName,
+ "lastName",
+ lastName,
+ "title",
+ title,
+ "organization",
+ organization,
+ "email",
+ email,
+ "homePhone",
+ homePhone,
+ "homeFax",
+ homeFax,
+ "mobilePhone",
+ mobilePhone,
+ "workPhone",
+ workPhone,
+ "workFax",
+ workFax,
+ "pager",
+ pager,
+ "address",
+ address);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String honorificPrefix;
+
+ private String firstName;
+
+ private String middleName;
+
+ private String lastName;
+
+ private String title;
+
+ private String organization;
+
+ private String email;
+
+ private String homePhone;
+
+ private String homeFax;
+
+ private String mobilePhone;
+
+ private String workPhone;
+
+ private String workFax;
+
+ private String pager;
+
+ private AccountUserAddress address;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * Honorific prefix to use before users name.
+ */
+ public Builder honorificPrefix(@Nullable String honorificPrefix) {
+ this.honorificPrefix = honorificPrefix;
+ return this;
+ }
+
+ /**
+ * User's first name.
+ */
+ public Builder firstName(@Nonnull String firstName) {
+ this.firstName = Utils.checkNotNull(firstName, "firstName");
+ return this;
+ }
+
+ /**
+ * User's middle name.
+ */
+ public Builder middleName(@Nullable String middleName) {
+ this.middleName = middleName;
+ return this;
+ }
+
+ /**
+ * User's last name.
+ */
+ public Builder lastName(@Nonnull String lastName) {
+ this.lastName = Utils.checkNotNull(lastName, "lastName");
+ return this;
+ }
+
+ /**
+ * Position held by the current user.
+ */
+ public Builder title(@Nullable String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Organization in which the user is employed.
+ */
+ public Builder organization(@Nullable String organization) {
+ this.organization = organization;
+ return this;
+ }
+
+ /**
+ * User associated email.
+ */
+ public Builder email(@Nonnull String email) {
+ this.email = Utils.checkNotNull(email, "email");
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Builder homePhone(@Nullable String homePhone) {
+ this.homePhone = homePhone;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Builder homeFax(@Nullable String homeFax) {
+ this.homeFax = homeFax;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Builder mobilePhone(@Nullable String mobilePhone) {
+ this.mobilePhone = mobilePhone;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Builder workPhone(@Nullable String workPhone) {
+ this.workPhone = workPhone;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Builder workFax(@Nullable String workFax) {
+ this.workFax = workFax;
+ return this;
+ }
+
+ /**
+ * Phone number associated to given user.
+ */
+ public Builder pager(@Nullable String pager) {
+ this.pager = pager;
+ return this;
+ }
+
+ /**
+ * Represents the address of a Cvent core account user.
+ */
+ public Builder address(@Nullable AccountUserAddress address) {
+ this.address = address;
+ return this;
+ }
+
+ public AccountUserContactDetails build() {
+ return new AccountUserContactDetails(
+ honorificPrefix,
+ firstName,
+ middleName,
+ lastName,
+ title,
+ organization,
+ email,
+ homePhone,
+ homeFax,
+ mobilePhone,
+ workPhone,
+ workFax,
+ pager,
+ address);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUserCustomField.java b/packages/java/src/main/java/com/cvent/models/components/AccountUserCustomField.java
new file mode 100644
index 000000000..d66652199
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUserCustomField.java
@@ -0,0 +1,248 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.lang.Long;
+import java.lang.Override;
+import java.lang.String;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * AccountUserCustomField
+ *
+ * Represents an account user's answer to a custom field.
+ */
+public class AccountUserCustomField {
+ /**
+ * The unique ID representing this custom field.
+ */
+ @JsonProperty("id")
+ private String id;
+
+ /**
+ * The actual text of the custom field.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("name")
+ private String name;
+
+ /**
+ * The type of data collected by this custom field.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("type")
+ private AccountUserCustomFieldType type;
+
+ /**
+ * The custom field answer or answers, represented as an array of strings. Single-answer or text fields
+ * contain one string; multiple-answer fields may contain multiple strings.
+ */
+ @JsonProperty("values")
+ private List values;
+
+ /**
+ * The order of this custom field relative to other custom fields.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("order")
+ private Long order;
+
+ @JsonCreator
+ public AccountUserCustomField(
+ @JsonProperty("id") @Nonnull String id,
+ @JsonProperty("name") @Nullable String name,
+ @JsonProperty("type") @Nullable AccountUserCustomFieldType type,
+ @JsonProperty("values") @Nonnull List values,
+ @JsonProperty("order") @Nullable Long order) {
+ this.id = Optional.ofNullable(id).orElseThrow(() -> new IllegalArgumentException("id cannot be null"));
+ this.name = name;
+ this.type = type;
+ this.values =
+ Optional.ofNullable(values).orElseThrow(() -> new IllegalArgumentException("values cannot be null"));
+ this.order = order;
+ }
+
+ public AccountUserCustomField(@Nonnull String id, @Nonnull List values) {
+ this(id, null, null, values, null);
+ }
+
+ /**
+ * The unique ID representing this custom field.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * The actual text of the custom field.
+ */
+ public Optional name() {
+ return Optional.ofNullable(this.name);
+ }
+
+ /**
+ * The type of data collected by this custom field.
+ */
+ public Optional type() {
+ return Optional.ofNullable(this.type);
+ }
+
+ /**
+ * The custom field answer or answers, represented as an array of strings. Single-answer or text fields
+ * contain one string; multiple-answer fields may contain multiple strings.
+ */
+ public List values() {
+ return this.values;
+ }
+
+ /**
+ * The order of this custom field relative to other custom fields.
+ */
+ public Optional order() {
+ return Optional.ofNullable(this.order);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * The unique ID representing this custom field.
+ */
+ public AccountUserCustomField withId(@Nonnull String id) {
+ this.id = Utils.checkNotNull(id, "id");
+ return this;
+ }
+
+ /**
+ * The actual text of the custom field.
+ */
+ public AccountUserCustomField withName(@Nullable String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The type of data collected by this custom field.
+ */
+ public AccountUserCustomField withType(@Nullable AccountUserCustomFieldType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The custom field answer or answers, represented as an array of strings. Single-answer or text fields
+ * contain one string; multiple-answer fields may contain multiple strings.
+ */
+ public AccountUserCustomField withValues(@Nonnull List values) {
+ this.values = Utils.checkNotNull(values, "values");
+ return this;
+ }
+
+ /**
+ * The order of this custom field relative to other custom fields.
+ */
+ public AccountUserCustomField withOrder(@Nullable Long order) {
+ this.order = order;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUserCustomField other = (AccountUserCustomField) o;
+ return Utils.enhancedDeepEquals(this.id, other.id)
+ && Utils.enhancedDeepEquals(this.name, other.name)
+ && Utils.enhancedDeepEquals(this.type, other.type)
+ && Utils.enhancedDeepEquals(this.values, other.values)
+ && Utils.enhancedDeepEquals(this.order, other.order);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(id, name, type, values, order);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ AccountUserCustomField.class, "id", id, "name", name, "type", type, "values", values, "order", order);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String id;
+
+ private String name;
+
+ private AccountUserCustomFieldType type;
+
+ private List values;
+
+ private Long order;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * The unique ID representing this custom field.
+ */
+ public Builder id(@Nonnull String id) {
+ this.id = Utils.checkNotNull(id, "id");
+ return this;
+ }
+
+ /**
+ * The actual text of the custom field.
+ */
+ public Builder name(@Nullable String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The type of data collected by this custom field.
+ */
+ public Builder type(@Nullable AccountUserCustomFieldType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The custom field answer or answers, represented as an array of strings. Single-answer or text fields
+ * contain one string; multiple-answer fields may contain multiple strings.
+ */
+ public Builder values(@Nonnull List values) {
+ this.values = Utils.checkNotNull(values, "values");
+ return this;
+ }
+
+ /**
+ * The order of this custom field relative to other custom fields.
+ */
+ public Builder order(@Nullable Long order) {
+ this.order = order;
+ return this;
+ }
+
+ public AccountUserCustomField build() {
+ return new AccountUserCustomField(id, name, type, values, order);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUserCustomFieldType.java b/packages/java/src/main/java/com/cvent/models/components/AccountUserCustomFieldType.java
new file mode 100644
index 000000000..c543a596f
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUserCustomFieldType.java
@@ -0,0 +1,43 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.lang.String;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * AccountUserCustomFieldType
+ *
+ * The type of data collected by this custom field.
+ */
+public enum AccountUserCustomFieldType {
+ OPEN_ENDED_TEXT_DATE_TIME("Open Ended Text - Date/Time"),
+ OPEN_ENDED_TEXT_ONE_LINE("Open Ended Text - One Line"),
+ OPEN_ENDED_TEXT_COMMENT_BOX("Open Ended Text - Comment Box"),
+ CHOICE_SINGLE_ANSWER("Choice - Single Answer"),
+ CHOICE_MULTIPLE_ANSWERS("Choice - Multiple Answers"),
+ AUTO_INCREMENT("Auto-Increment");
+
+ @JsonValue
+ private final String value;
+
+ AccountUserCustomFieldType(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Optional fromValue(String value) {
+ for (AccountUserCustomFieldType o : AccountUserCustomFieldType.values()) {
+ if (Objects.deepEquals(o.value, value)) {
+ return Optional.of(o);
+ }
+ }
+ return Optional.empty();
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUserRoleReference.java b/packages/java/src/main/java/com/cvent/models/components/AccountUserRoleReference.java
new file mode 100644
index 000000000..f9537fa7a
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUserRoleReference.java
@@ -0,0 +1,93 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.annotation.Nonnull;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+
+/**
+ * AccountUserRoleReference
+ *
+ * A model used to reference a Cvent core account user role by its ID.
+ */
+public class AccountUserRoleReference {
+ /**
+ * Represents the unique ID of an account user role.
+ */
+ @JsonProperty("id")
+ private String id;
+
+ @JsonCreator
+ public AccountUserRoleReference(@JsonProperty("id") @Nonnull String id) {
+ this.id = Optional.ofNullable(id).orElseThrow(() -> new IllegalArgumentException("id cannot be null"));
+ }
+
+ /**
+ * Represents the unique ID of an account user role.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Represents the unique ID of an account user role.
+ */
+ public AccountUserRoleReference withId(@Nonnull String id) {
+ this.id = Utils.checkNotNull(id, "id");
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUserRoleReference other = (AccountUserRoleReference) o;
+ return Utils.enhancedDeepEquals(this.id, other.id);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(id);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(AccountUserRoleReference.class, "id", id);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String id;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * Represents the unique ID of an account user role.
+ */
+ public Builder id(@Nonnull String id) {
+ this.id = Utils.checkNotNull(id, "id");
+ return this;
+ }
+
+ public AccountUserRoleReference build() {
+ return new AccountUserRoleReference(id);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/AccountUsers.java b/packages/java/src/main/java/com/cvent/models/components/AccountUsers.java
new file mode 100644
index 000000000..e85b12b2f
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/AccountUsers.java
@@ -0,0 +1,128 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.annotation.Nonnull;
+import java.lang.Override;
+import java.lang.String;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * AccountUsers
+ *
+ *
A paginated result for a list of account users.
+ */
+public class AccountUsers {
+ /**
+ * Represents pagination information for a collection of resources.
+ */
+ @JsonProperty("paging")
+ private Paging paging;
+
+ /**
+ * The list of Account Users retrieved for the specified page.
+ */
+ @JsonProperty("data")
+ private List data;
+
+ @JsonCreator
+ public AccountUsers(
+ @JsonProperty("paging") @Nonnull Paging paging, @JsonProperty("data") @Nonnull List data) {
+ this.paging =
+ Optional.ofNullable(paging).orElseThrow(() -> new IllegalArgumentException("paging cannot be null"));
+ this.data = Optional.ofNullable(data).orElseThrow(() -> new IllegalArgumentException("data cannot be null"));
+ }
+
+ /**
+ * Represents pagination information for a collection of resources.
+ */
+ public Paging paging() {
+ return this.paging;
+ }
+
+ /**
+ * The list of Account Users retrieved for the specified page.
+ */
+ public List data() {
+ return this.data;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Represents pagination information for a collection of resources.
+ */
+ public AccountUsers withPaging(@Nonnull Paging paging) {
+ this.paging = Utils.checkNotNull(paging, "paging");
+ return this;
+ }
+
+ /**
+ * The list of Account Users retrieved for the specified page.
+ */
+ public AccountUsers withData(@Nonnull List data) {
+ this.data = Utils.checkNotNull(data, "data");
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountUsers other = (AccountUsers) o;
+ return Utils.enhancedDeepEquals(this.paging, other.paging) && Utils.enhancedDeepEquals(this.data, other.data);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(paging, data);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(AccountUsers.class, "paging", paging, "data", data);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private Paging paging;
+
+ private List data;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * Represents pagination information for a collection of resources.
+ */
+ public Builder paging(@Nonnull Paging paging) {
+ this.paging = Utils.checkNotNull(paging, "paging");
+ return this;
+ }
+
+ /**
+ * The list of Account Users retrieved for the specified page.
+ */
+ public Builder data(@Nonnull List data) {
+ this.data = Utils.checkNotNull(data, "data");
+ return this;
+ }
+
+ public AccountUsers build() {
+ return new AccountUsers(paging, data);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/EmailVerified.java b/packages/java/src/main/java/com/cvent/models/components/EmailVerified.java
new file mode 100644
index 000000000..33f1a001b
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/EmailVerified.java
@@ -0,0 +1,42 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.lang.String;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * EmailVerified
+ *
+ * The account user's email verification status: `UNVERIFIED` indicates the email address has not been
+ * verified, `VERIFIED` indicates the email address has been verified, and `UNVERIFIED_BLOCK_LOGIN`
+ * indicates the email address has not been verified and the account user is blocked from logging in.
+ */
+public enum EmailVerified {
+ UNVERIFIED("UNVERIFIED"),
+ VERIFIED("VERIFIED"),
+ UNVERIFIED_BLOCK_LOGIN("UNVERIFIED_BLOCK_LOGIN");
+
+ @JsonValue
+ private final String value;
+
+ EmailVerified(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Optional fromValue(String value) {
+ for (EmailVerified o : EmailVerified.values()) {
+ if (Objects.deepEquals(o.value, value)) {
+ return Optional.of(o);
+ }
+ }
+ return Optional.empty();
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/components/VisibilityAccess.java b/packages/java/src/main/java/com/cvent/models/components/VisibilityAccess.java
new file mode 100644
index 000000000..0a40743e0
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/components/VisibilityAccess.java
@@ -0,0 +1,59 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.components;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.lang.String;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * VisibilityAccess
+ *
+ * Enumerated type to outline what the user has access to.
+ *
+ *
`DOCUMENT` - The user has the ability to view all documents uploaded within their account.
+ *
+ *
`EMARKETING_CAMPAIGN` - The user has the ability to view all eMarketing campaigns within their
+ * account.
+ *
+ *
`EVENT` - The user has the ability to view all Events within their account.
+ *
+ *
`MEETING_REQUEST` - The user has the ability to view all meeting requests within their account.
+ *
+ *
`RFI` - The user has the ability to view all RFIs within their account.
+ *
+ *
`RFP` - The user has the ability to view all RFPs within their account.
+ *
+ *
`SURVEY` - The user has the ability to view all Surveys within their account.
+ */
+public enum VisibilityAccess {
+ DOCUMENT("DOCUMENT"),
+ EMARKETING_CAMPAIGN("EMARKETING_CAMPAIGN"),
+ EVENT("EVENT"),
+ MEETING_REQUEST("MEETING_REQUEST"),
+ RFI("RFI"),
+ RFP("RFP"),
+ SURVEY("SURVEY");
+
+ @JsonValue
+ private final String value;
+
+ VisibilityAccess(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Optional fromValue(String value) {
+ for (VisibilityAccess o : VisibilityAccess.values()) {
+ if (Objects.deepEquals(o.value, value)) {
+ return Optional.of(o);
+ }
+ }
+ return Optional.empty();
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserRequest.java b/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserRequest.java
new file mode 100644
index 000000000..e501d875f
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserRequest.java
@@ -0,0 +1,89 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations;
+
+import com.cvent.utils.SpeakeasyMetadata;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import jakarta.annotation.Nonnull;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+
+public class GetAccountUserRequest {
+ /**
+ * The Account User's Id.
+ */
+ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=userId")
+ private String userId;
+
+ @JsonCreator
+ public GetAccountUserRequest(@Nonnull String userId) {
+ this.userId =
+ Optional.ofNullable(userId).orElseThrow(() -> new IllegalArgumentException("userId cannot be null"));
+ }
+
+ /**
+ * The Account User's Id.
+ */
+ public String userId() {
+ return this.userId;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * The Account User's Id.
+ */
+ public GetAccountUserRequest withUserId(@Nonnull String userId) {
+ this.userId = Utils.checkNotNull(userId, "userId");
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GetAccountUserRequest other = (GetAccountUserRequest) o;
+ return Utils.enhancedDeepEquals(this.userId, other.userId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(userId);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(GetAccountUserRequest.class, "userId", userId);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String userId;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * The Account User's Id.
+ */
+ public Builder userId(@Nonnull String userId) {
+ this.userId = Utils.checkNotNull(userId, "userId");
+ return this;
+ }
+
+ public GetAccountUserRequest build() {
+ return new GetAccountUserRequest(userId);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserRequestBuilder.java b/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserRequestBuilder.java
new file mode 100644
index 000000000..1d1094482
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserRequestBuilder.java
@@ -0,0 +1,60 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations;
+
+import static com.cvent.operations.Operations.RequestOperation;
+
+import com.cvent.SDKConfiguration;
+import com.cvent.operations.GetAccountUser;
+import com.cvent.utils.Headers;
+import com.cvent.utils.Options;
+import com.cvent.utils.RetryConfig;
+import com.cvent.utils.Utils;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+
+public class GetAccountUserRequestBuilder {
+ private final SDKConfiguration sdkConfiguration;
+ private final Headers _headers = new Headers();
+ private GetAccountUserRequest request;
+ private final Options.Builder optionsBuilder;
+
+ public GetAccountUserRequestBuilder(SDKConfiguration sdkConfiguration) {
+ this.sdkConfiguration = sdkConfiguration;
+ this.optionsBuilder = Options.builder();
+ }
+
+ public GetAccountUserRequestBuilder retryConfig(RetryConfig retryConfig) {
+ this.optionsBuilder.retryConfig(retryConfig);
+ return this;
+ }
+
+ public GetAccountUserRequestBuilder request(@Nonnull GetAccountUserRequest request) {
+ this.request = Utils.checkNotNull(request, "request");
+ return this;
+ }
+
+ private GetAccountUserRequest _buildRequest() {
+ return this.request;
+ }
+
+ public GetAccountUserRequestBuilder header(String name, String value) {
+ Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(value, "value");
+ this._headers.add(name, value);
+ return this;
+ }
+
+ /**
+ * Executes the request and returns the response.
+ *
+ * @return The response from the server.
+ */
+ public GetAccountUserResponse call() {
+ Options options = optionsBuilder.build();
+ RequestOperation operation =
+ new GetAccountUser.Sync(sdkConfiguration, options, _headers);
+ return operation.handleResponse(operation.doRequest(this._buildRequest()));
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserResponse.java b/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserResponse.java
new file mode 100644
index 000000000..296546286
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/GetAccountUserResponse.java
@@ -0,0 +1,207 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations;
+
+import com.cvent.models.components.AccountUser;
+import com.cvent.utils.Response;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Override;
+import java.lang.String;
+import java.net.http.HttpResponse;
+import java.util.Optional;
+
+public class GetAccountUserResponse implements Response {
+ /**
+ * HTTP response content type for this operation
+ */
+ private String contentType;
+
+ /**
+ * HTTP response status code for this operation
+ */
+ private int statusCode;
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ private HttpResponse rawResponse;
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ private AccountUser accountUser;
+
+ @JsonCreator
+ public GetAccountUserResponse(
+ @Nonnull String contentType,
+ int statusCode,
+ @Nonnull HttpResponse rawResponse,
+ @Nullable AccountUser accountUser) {
+ this.contentType = Optional.ofNullable(contentType)
+ .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null"));
+ this.statusCode = statusCode;
+ this.rawResponse = Optional.ofNullable(rawResponse)
+ .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null"));
+ this.accountUser = accountUser;
+ }
+
+ public GetAccountUserResponse(
+ @Nonnull String contentType, int statusCode, @Nonnull HttpResponse rawResponse) {
+ this(contentType, statusCode, rawResponse, null);
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public String contentType() {
+ return this.contentType;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public int statusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public HttpResponse rawResponse() {
+ return this.rawResponse;
+ }
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ public Optional accountUser() {
+ return Optional.ofNullable(this.accountUser);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public GetAccountUserResponse withContentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public GetAccountUserResponse withStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public GetAccountUserResponse withRawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ public GetAccountUserResponse withAccountUser(@Nullable AccountUser accountUser) {
+ this.accountUser = accountUser;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GetAccountUserResponse other = (GetAccountUserResponse) o;
+ return Utils.enhancedDeepEquals(this.contentType, other.contentType)
+ && Utils.enhancedDeepEquals(this.statusCode, other.statusCode)
+ && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse)
+ && Utils.enhancedDeepEquals(this.accountUser, other.accountUser);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(contentType, statusCode, rawResponse, accountUser);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ GetAccountUserResponse.class,
+ "contentType",
+ contentType,
+ "statusCode",
+ statusCode,
+ "rawResponse",
+ rawResponse,
+ "accountUser",
+ accountUser);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String contentType;
+
+ private int statusCode;
+
+ private HttpResponse rawResponse;
+
+ private AccountUser accountUser;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public Builder contentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public Builder statusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public Builder rawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ public Builder accountUser(@Nullable AccountUser accountUser) {
+ this.accountUser = accountUser;
+ return this;
+ }
+
+ public GetAccountUserResponse build() {
+ return new GetAccountUserResponse(contentType, statusCode, rawResponse, accountUser);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersRequest.java b/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersRequest.java
new file mode 100644
index 000000000..d4538b8fa
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersRequest.java
@@ -0,0 +1,291 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations;
+
+import com.cvent.utils.LazySingletonValue;
+import com.cvent.utils.SpeakeasyMetadata;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.type.TypeReference;
+import jakarta.annotation.Nullable;
+import java.lang.Long;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+
+public class ListAccountUsersRequest {
+ /**
+ * A Cvent DSL filter expression used to apply a filtered down list of account users. Combine multiple
+ * conditions using the `and` and `or` logical operators, and group them with parentheses.
+ *
+ * Fields that may contain personally identifiable information (PII) are excluded from this filter
+ * query parameter.
+ *
+ *
## Supported Account Users Filters:
+ *
+ *
| Field Path | Operators |
+ * |--------------------|---------------------------------------------|
+ * | role.id | `in`, `eq`, `ne` |
+ * | id | `in`, `eq`, `ne` |
+ * | active | `eq`, `ne` |
+ * | lockedOut | `eq`, `ne` |
+ * | audit.created | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ * | audit.lastModified | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter")
+ private String filter;
+
+ /**
+ * The maximum number of records to return per page.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit")
+ private Long limit;
+
+ /**
+ * The pagination token returned from a previous call.
+ * This will override any other pageable parameters provided.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=token")
+ private String token;
+
+ /**
+ * Sorts items in the list of results.
+ *
+ *
There are two orders:
+ * - ascending: ASC
+ * - descending: DESC
+ *
+ *
The following fields are sortable:
+ * - username
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort")
+ private String sort;
+
+ @JsonCreator
+ public ListAccountUsersRequest(
+ @Nullable String filter, @Nullable Long limit, @Nullable String token, @Nullable String sort) {
+ this.filter = filter;
+ this.limit = Optional.ofNullable(limit).orElse(Builder._SINGLETON_VALUE_Limit.value());
+ this.token = token;
+ this.sort = sort;
+ }
+
+ public ListAccountUsersRequest() {
+ this(null, null, null, null);
+ }
+
+ /**
+ * A Cvent DSL filter expression used to apply a filtered down list of account users. Combine multiple
+ * conditions using the `and` and `or` logical operators, and group them with parentheses.
+ *
+ *
Fields that may contain personally identifiable information (PII) are excluded from this filter
+ * query parameter.
+ *
+ *
## Supported Account Users Filters:
+ *
+ *
| Field Path | Operators |
+ * |--------------------|---------------------------------------------|
+ * | role.id | `in`, `eq`, `ne` |
+ * | id | `in`, `eq`, `ne` |
+ * | active | `eq`, `ne` |
+ * | lockedOut | `eq`, `ne` |
+ * | audit.created | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ * | audit.lastModified | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ */
+ public Optional filter() {
+ return Optional.ofNullable(this.filter);
+ }
+
+ /**
+ * The maximum number of records to return per page.
+ */
+ public Optional limit() {
+ return Optional.ofNullable(this.limit);
+ }
+
+ /**
+ * The pagination token returned from a previous call.
+ * This will override any other pageable parameters provided.
+ */
+ public Optional token() {
+ return Optional.ofNullable(this.token);
+ }
+
+ /**
+ * Sorts items in the list of results.
+ *
+ * There are two orders:
+ * - ascending: ASC
+ * - descending: DESC
+ *
+ *
The following fields are sortable:
+ * - username
+ */
+ public Optional sort() {
+ return Optional.ofNullable(this.sort);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * A Cvent DSL filter expression used to apply a filtered down list of account users. Combine multiple
+ * conditions using the `and` and `or` logical operators, and group them with parentheses.
+ *
+ * Fields that may contain personally identifiable information (PII) are excluded from this filter
+ * query parameter.
+ *
+ *
## Supported Account Users Filters:
+ *
+ *
| Field Path | Operators |
+ * |--------------------|---------------------------------------------|
+ * | role.id | `in`, `eq`, `ne` |
+ * | id | `in`, `eq`, `ne` |
+ * | active | `eq`, `ne` |
+ * | lockedOut | `eq`, `ne` |
+ * | audit.created | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ * | audit.lastModified | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ */
+ public ListAccountUsersRequest withFilter(@Nullable String filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * The maximum number of records to return per page.
+ */
+ public ListAccountUsersRequest withLimit(@Nullable Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * The pagination token returned from a previous call.
+ * This will override any other pageable parameters provided.
+ */
+ public ListAccountUsersRequest withToken(@Nullable String token) {
+ this.token = token;
+ return this;
+ }
+
+ /**
+ * Sorts items in the list of results.
+ *
+ *
There are two orders:
+ * - ascending: ASC
+ * - descending: DESC
+ *
+ *
The following fields are sortable:
+ * - username
+ */
+ public ListAccountUsersRequest withSort(@Nullable String sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ListAccountUsersRequest other = (ListAccountUsersRequest) o;
+ return Utils.enhancedDeepEquals(this.filter, other.filter)
+ && Utils.enhancedDeepEquals(this.limit, other.limit)
+ && Utils.enhancedDeepEquals(this.token, other.token)
+ && Utils.enhancedDeepEquals(this.sort, other.sort);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(filter, limit, token, sort);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ ListAccountUsersRequest.class, "filter", filter, "limit", limit, "token", token, "sort", sort);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String filter;
+
+ private Long limit;
+
+ private String token;
+
+ private String sort;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * A Cvent DSL filter expression used to apply a filtered down list of account users. Combine multiple
+ * conditions using the `and` and `or` logical operators, and group them with parentheses.
+ *
+ *
Fields that may contain personally identifiable information (PII) are excluded from this filter
+ * query parameter.
+ *
+ *
## Supported Account Users Filters:
+ *
+ *
| Field Path | Operators |
+ * |--------------------|---------------------------------------------|
+ * | role.id | `in`, `eq`, `ne` |
+ * | id | `in`, `eq`, `ne` |
+ * | active | `eq`, `ne` |
+ * | lockedOut | `eq`, `ne` |
+ * | audit.created | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ * | audit.lastModified | `eq`, `ne`, `lt`, `gt`, `le`, `ge` |
+ */
+ public Builder filter(@Nullable String filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * The maximum number of records to return per page.
+ */
+ public Builder limit(@Nullable Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * The pagination token returned from a previous call.
+ * This will override any other pageable parameters provided.
+ */
+ public Builder token(@Nullable String token) {
+ this.token = token;
+ return this;
+ }
+
+ /**
+ * Sorts items in the list of results.
+ *
+ *
There are two orders:
+ * - ascending: ASC
+ * - descending: DESC
+ *
+ *
The following fields are sortable:
+ * - username
+ */
+ public Builder sort(@Nullable String sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ public ListAccountUsersRequest build() {
+ return new ListAccountUsersRequest(filter, limit, token, sort);
+ }
+
+ private static final LazySingletonValue _SINGLETON_VALUE_Limit =
+ new LazySingletonValue<>("limit", "100", new TypeReference() {});
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersRequestBuilder.java b/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersRequestBuilder.java
new file mode 100644
index 000000000..73af6c92b
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersRequestBuilder.java
@@ -0,0 +1,107 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations;
+
+import static com.cvent.operations.Operations.RequestOperation;
+import static com.cvent.utils.Exceptions.unchecked;
+import static com.cvent.utils.Utils.toStream;
+import static com.cvent.utils.Utils.transform;
+
+import com.cvent.SDKConfiguration;
+import com.cvent.operations.ListAccountUsers;
+import com.cvent.utils.Headers;
+import com.cvent.utils.Options;
+import com.cvent.utils.RetryConfig;
+import com.cvent.utils.Utils;
+import com.cvent.utils.pagination.CursorTracker;
+import com.cvent.utils.pagination.Paginator;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Iterable;
+import java.lang.String;
+import java.net.http.HttpResponse;
+import java.util.Iterator;
+import java.util.stream.Stream;
+
+public class ListAccountUsersRequestBuilder {
+ private final SDKConfiguration sdkConfiguration;
+ private final Headers _headers = new Headers();
+ private ListAccountUsersRequest request;
+ private final Options.Builder optionsBuilder;
+
+ public ListAccountUsersRequestBuilder(SDKConfiguration sdkConfiguration) {
+ this.sdkConfiguration = sdkConfiguration;
+ this.optionsBuilder = Options.builder();
+ }
+
+ public ListAccountUsersRequestBuilder retryConfig(RetryConfig retryConfig) {
+ this.optionsBuilder.retryConfig(retryConfig);
+ return this;
+ }
+
+ public ListAccountUsersRequestBuilder request(@Nonnull ListAccountUsersRequest request) {
+ this.request = Utils.checkNotNull(request, "request");
+ return this;
+ }
+
+ private ListAccountUsersRequest _buildRequest() {
+ return this.request;
+ }
+
+ public ListAccountUsersRequestBuilder header(String name, String value) {
+ Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(value, "value");
+ this._headers.add(name, value);
+ return this;
+ }
+
+ /**
+ * Executes the request and returns the response.
+ *
+ * @return The response from the server.
+ */
+ public ListAccountUsersResponse call() {
+ Options options = optionsBuilder.build();
+ RequestOperation operation =
+ new ListAccountUsers.Sync(sdkConfiguration, options, _headers);
+ return operation.handleResponse(operation.doRequest(this._buildRequest()));
+ }
+
+ /**
+ * Returns an iterable that performs next page calls till no more pages
+ * are returned.
+ *
+ * The returned iterable can be used in a for-each loop:
+ *
+ * for (ListAccountUsersResponse page : builder.callAsIterable()) {
+ * // Process each page
+ * }
+ *
+ *
+ * @return An iterable that can be used to iterate through all pages
+ */
+ public Iterable callAsIterable() {
+ ListAccountUsersRequest request = this.request;
+ Options options = optionsBuilder.build();
+ RequestOperation operation =
+ new ListAccountUsers.Sync(sdkConfiguration, options, _headers);
+
+ Iterator> iterator = new Paginator<>(
+ request, new CursorTracker<>("$.paging.nextToken", String.class), (req, pos) -> {
+ var modifiedReq = pos == null ? req : req.withToken(pos);
+ return unchecked(() -> operation.doRequest(modifiedReq)).get();
+ });
+
+ return () -> transform(iterator, operation::handleResponse);
+ }
+
+ /**
+ * Returns a stream that performs next page calls till no more pages
+ * are returned.
+ **/
+ public Stream callAsStream() {
+ return toStream(callAsIterable());
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersResponse.java b/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersResponse.java
new file mode 100644
index 000000000..a4624f426
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/ListAccountUsersResponse.java
@@ -0,0 +1,207 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations;
+
+import com.cvent.models.components.AccountUsers;
+import com.cvent.utils.Response;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Override;
+import java.lang.String;
+import java.net.http.HttpResponse;
+import java.util.Optional;
+
+public class ListAccountUsersResponse implements Response {
+ /**
+ * HTTP response content type for this operation
+ */
+ private String contentType;
+
+ /**
+ * HTTP response status code for this operation
+ */
+ private int statusCode;
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ private HttpResponse rawResponse;
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ private AccountUsers accountUsers;
+
+ @JsonCreator
+ public ListAccountUsersResponse(
+ @Nonnull String contentType,
+ int statusCode,
+ @Nonnull HttpResponse rawResponse,
+ @Nullable AccountUsers accountUsers) {
+ this.contentType = Optional.ofNullable(contentType)
+ .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null"));
+ this.statusCode = statusCode;
+ this.rawResponse = Optional.ofNullable(rawResponse)
+ .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null"));
+ this.accountUsers = accountUsers;
+ }
+
+ public ListAccountUsersResponse(
+ @Nonnull String contentType, int statusCode, @Nonnull HttpResponse rawResponse) {
+ this(contentType, statusCode, rawResponse, null);
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public String contentType() {
+ return this.contentType;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public int statusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public HttpResponse rawResponse() {
+ return this.rawResponse;
+ }
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ public Optional accountUsers() {
+ return Optional.ofNullable(this.accountUsers);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public ListAccountUsersResponse withContentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public ListAccountUsersResponse withStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public ListAccountUsersResponse withRawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ public ListAccountUsersResponse withAccountUsers(@Nullable AccountUsers accountUsers) {
+ this.accountUsers = accountUsers;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ListAccountUsersResponse other = (ListAccountUsersResponse) o;
+ return Utils.enhancedDeepEquals(this.contentType, other.contentType)
+ && Utils.enhancedDeepEquals(this.statusCode, other.statusCode)
+ && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse)
+ && Utils.enhancedDeepEquals(this.accountUsers, other.accountUsers);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(contentType, statusCode, rawResponse, accountUsers);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ ListAccountUsersResponse.class,
+ "contentType",
+ contentType,
+ "statusCode",
+ statusCode,
+ "rawResponse",
+ rawResponse,
+ "accountUsers",
+ accountUsers);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String contentType;
+
+ private int statusCode;
+
+ private HttpResponse rawResponse;
+
+ private AccountUsers accountUsers;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public Builder contentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public Builder statusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public Builder rawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ public Builder accountUsers(@Nullable AccountUsers accountUsers) {
+ this.accountUsers = accountUsers;
+ return this;
+ }
+
+ public ListAccountUsersResponse build() {
+ return new ListAccountUsersResponse(contentType, statusCode, rawResponse, accountUsers);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/async/GetAccountUserRequestBuilder.java b/packages/java/src/main/java/com/cvent/models/operations/async/GetAccountUserRequestBuilder.java
new file mode 100644
index 000000000..8b93742a2
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/async/GetAccountUserRequestBuilder.java
@@ -0,0 +1,62 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations.async;
+
+import static com.cvent.operations.Operations.AsyncRequestOperation;
+
+import com.cvent.SDKConfiguration;
+import com.cvent.models.operations.GetAccountUserRequest;
+import com.cvent.operations.GetAccountUser;
+import com.cvent.utils.Headers;
+import com.cvent.utils.Options;
+import com.cvent.utils.RetryConfig;
+import com.cvent.utils.Utils;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.util.concurrent.CompletableFuture;
+
+public class GetAccountUserRequestBuilder {
+ private final SDKConfiguration sdkConfiguration;
+ private final Headers _headers = new Headers();
+ private GetAccountUserRequest request;
+ private final Options.Builder optionsBuilder;
+
+ public GetAccountUserRequestBuilder(SDKConfiguration sdkConfiguration) {
+ this.sdkConfiguration = sdkConfiguration;
+ this.optionsBuilder = Options.builder();
+ }
+
+ public GetAccountUserRequestBuilder retryConfig(RetryConfig retryConfig) {
+ this.optionsBuilder.retryConfig(retryConfig);
+ return this;
+ }
+
+ public GetAccountUserRequestBuilder request(@Nonnull GetAccountUserRequest request) {
+ this.request = Utils.checkNotNull(request, "request");
+ return this;
+ }
+
+ private GetAccountUserRequest _buildRequest() {
+ return this.request;
+ }
+
+ public GetAccountUserRequestBuilder header(String name, String value) {
+ Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(value, "value");
+ this._headers.add(name, value);
+ return this;
+ }
+
+ /**
+ * Executes the request and returns the response.
+ *
+ * @return The response from the server.
+ */
+ public CompletableFuture call() {
+ Options options = optionsBuilder.build();
+ AsyncRequestOperation operation =
+ new GetAccountUser.Async(sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers);
+ return operation.doRequest(this._buildRequest()).thenCompose(operation::handleResponse);
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/async/GetAccountUserResponse.java b/packages/java/src/main/java/com/cvent/models/operations/async/GetAccountUserResponse.java
new file mode 100644
index 000000000..14bb8c25d
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/async/GetAccountUserResponse.java
@@ -0,0 +1,208 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations.async;
+
+import com.cvent.models.components.AccountUser;
+import com.cvent.utils.AsyncResponse;
+import com.cvent.utils.Blob;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Override;
+import java.lang.String;
+import java.net.http.HttpResponse;
+import java.util.Optional;
+
+public class GetAccountUserResponse implements AsyncResponse {
+ /**
+ * HTTP response content type for this operation
+ */
+ private String contentType;
+
+ /**
+ * HTTP response status code for this operation
+ */
+ private int statusCode;
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ private HttpResponse rawResponse;
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ private AccountUser accountUser;
+
+ @JsonCreator
+ public GetAccountUserResponse(
+ @Nonnull String contentType,
+ int statusCode,
+ @Nonnull HttpResponse rawResponse,
+ @Nullable AccountUser accountUser) {
+ this.contentType = Optional.ofNullable(contentType)
+ .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null"));
+ this.statusCode = statusCode;
+ this.rawResponse = Optional.ofNullable(rawResponse)
+ .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null"));
+ this.accountUser = accountUser;
+ }
+
+ public GetAccountUserResponse(
+ @Nonnull String contentType, int statusCode, @Nonnull HttpResponse rawResponse) {
+ this(contentType, statusCode, rawResponse, null);
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public String contentType() {
+ return this.contentType;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public int statusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public HttpResponse rawResponse() {
+ return this.rawResponse;
+ }
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ public Optional accountUser() {
+ return Optional.ofNullable(this.accountUser);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public GetAccountUserResponse withContentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public GetAccountUserResponse withStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public GetAccountUserResponse withRawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ public GetAccountUserResponse withAccountUser(@Nullable AccountUser accountUser) {
+ this.accountUser = accountUser;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GetAccountUserResponse other = (GetAccountUserResponse) o;
+ return Utils.enhancedDeepEquals(this.contentType, other.contentType)
+ && Utils.enhancedDeepEquals(this.statusCode, other.statusCode)
+ && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse)
+ && Utils.enhancedDeepEquals(this.accountUser, other.accountUser);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(contentType, statusCode, rawResponse, accountUser);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ GetAccountUserResponse.class,
+ "contentType",
+ contentType,
+ "statusCode",
+ statusCode,
+ "rawResponse",
+ rawResponse,
+ "accountUser",
+ accountUser);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String contentType;
+
+ private int statusCode;
+
+ private HttpResponse rawResponse;
+
+ private AccountUser accountUser;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public Builder contentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public Builder statusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public Builder rawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved the specified account user.
+ */
+ public Builder accountUser(@Nullable AccountUser accountUser) {
+ this.accountUser = accountUser;
+ return this;
+ }
+
+ public GetAccountUserResponse build() {
+ return new GetAccountUserResponse(contentType, statusCode, rawResponse, accountUser);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/async/ListAccountUsersRequestBuilder.java b/packages/java/src/main/java/com/cvent/models/operations/async/ListAccountUsersRequestBuilder.java
new file mode 100644
index 000000000..381b6d60d
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/async/ListAccountUsersRequestBuilder.java
@@ -0,0 +1,105 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations.async;
+
+import static com.cvent.operations.Operations.AsyncRequestOperation;
+import static com.cvent.utils.Exceptions.unchecked;
+import static com.cvent.utils.reactive.ReactiveUtils.mapAsync;
+
+import com.cvent.SDKConfiguration;
+import com.cvent.models.operations.ListAccountUsersRequest;
+import com.cvent.operations.ListAccountUsers;
+import com.cvent.utils.Blob;
+import com.cvent.utils.Headers;
+import com.cvent.utils.Options;
+import com.cvent.utils.RetryConfig;
+import com.cvent.utils.Utils;
+import com.cvent.utils.pagination.AsyncPaginator;
+import com.cvent.utils.pagination.CursorTracker;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.lang.String;
+import java.net.http.HttpResponse;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Flow;
+import org.reactivestreams.FlowAdapters;
+import org.reactivestreams.Publisher;
+import org.reactivestreams.Subscriber;
+
+public class ListAccountUsersRequestBuilder {
+ private final SDKConfiguration sdkConfiguration;
+ private final Headers _headers = new Headers();
+ private ListAccountUsersRequest request;
+ private final Options.Builder optionsBuilder;
+
+ public ListAccountUsersRequestBuilder(SDKConfiguration sdkConfiguration) {
+ this.sdkConfiguration = sdkConfiguration;
+ this.optionsBuilder = Options.builder();
+ }
+
+ public ListAccountUsersRequestBuilder retryConfig(RetryConfig retryConfig) {
+ this.optionsBuilder.retryConfig(retryConfig);
+ return this;
+ }
+
+ public ListAccountUsersRequestBuilder request(@Nonnull ListAccountUsersRequest request) {
+ this.request = Utils.checkNotNull(request, "request");
+ return this;
+ }
+
+ private ListAccountUsersRequest _buildRequest() {
+ return this.request;
+ }
+
+ public ListAccountUsersRequestBuilder header(String name, String value) {
+ Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(value, "value");
+ this._headers.add(name, value);
+ return this;
+ }
+
+ /**
+ * Executes the request and returns the response.
+ *
+ * @return The response from the server.
+ */
+ public CompletableFuture call() {
+ Options options = optionsBuilder.build();
+ AsyncRequestOperation operation =
+ new ListAccountUsers.Async(sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers);
+ return operation.doRequest(this._buildRequest()).thenCompose(operation::handleResponse);
+ }
+
+ /**
+ * Returns a {@link Publisher} that performs next page calls till no more pages
+ * are returned.
+ *
+ * The returned {@link Publisher} can be used with reactive frameworks:
+ *
+ * Publisher<ListAccountUsersResponse> publisher = builder.callAsPublisher();
+ * publisher.subscribe(new Subscriber<ListAccountUsersResponse>() {
+ * // Handle onNext, onError, onComplete
+ * });
+ *
+ *
+ * @return A {@link Publisher} that emits pages asynchronously
+ */
+ public Publisher callAsPublisher() {
+ ListAccountUsersRequest request = this.request;
+ Options options = optionsBuilder.build();
+ AsyncRequestOperation operation =
+ new ListAccountUsers.Async(sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers);
+
+ Flow.Publisher> asyncPaginator = new AsyncPaginator<>(
+ request, new CursorTracker<>("$.paging.nextToken", String.class), (req, pos) -> {
+ var modifiedReq = pos == null ? req : req.withToken(pos);
+ return operation.doRequest(modifiedReq);
+ });
+
+ Flow.Publisher flowPublisher = mapAsync(asyncPaginator, operation::handleResponse);
+
+ // Convert Flow.Publisher to Reactive Streams Publisher at the last stage
+ return FlowAdapters.toPublisher(flowPublisher);
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/models/operations/async/ListAccountUsersResponse.java b/packages/java/src/main/java/com/cvent/models/operations/async/ListAccountUsersResponse.java
new file mode 100644
index 000000000..6c6d8778f
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/models/operations/async/ListAccountUsersResponse.java
@@ -0,0 +1,208 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.models.operations.async;
+
+import com.cvent.models.components.AccountUsers;
+import com.cvent.utils.AsyncResponse;
+import com.cvent.utils.Blob;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Override;
+import java.lang.String;
+import java.net.http.HttpResponse;
+import java.util.Optional;
+
+public class ListAccountUsersResponse implements AsyncResponse {
+ /**
+ * HTTP response content type for this operation
+ */
+ private String contentType;
+
+ /**
+ * HTTP response status code for this operation
+ */
+ private int statusCode;
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ private HttpResponse rawResponse;
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ private AccountUsers accountUsers;
+
+ @JsonCreator
+ public ListAccountUsersResponse(
+ @Nonnull String contentType,
+ int statusCode,
+ @Nonnull HttpResponse rawResponse,
+ @Nullable AccountUsers accountUsers) {
+ this.contentType = Optional.ofNullable(contentType)
+ .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null"));
+ this.statusCode = statusCode;
+ this.rawResponse = Optional.ofNullable(rawResponse)
+ .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null"));
+ this.accountUsers = accountUsers;
+ }
+
+ public ListAccountUsersResponse(
+ @Nonnull String contentType, int statusCode, @Nonnull HttpResponse rawResponse) {
+ this(contentType, statusCode, rawResponse, null);
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public String contentType() {
+ return this.contentType;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public int statusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public HttpResponse rawResponse() {
+ return this.rawResponse;
+ }
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ public Optional accountUsers() {
+ return Optional.ofNullable(this.accountUsers);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public ListAccountUsersResponse withContentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public ListAccountUsersResponse withStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public ListAccountUsersResponse withRawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ public ListAccountUsersResponse withAccountUsers(@Nullable AccountUsers accountUsers) {
+ this.accountUsers = accountUsers;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ListAccountUsersResponse other = (ListAccountUsersResponse) o;
+ return Utils.enhancedDeepEquals(this.contentType, other.contentType)
+ && Utils.enhancedDeepEquals(this.statusCode, other.statusCode)
+ && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse)
+ && Utils.enhancedDeepEquals(this.accountUsers, other.accountUsers);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(contentType, statusCode, rawResponse, accountUsers);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(
+ ListAccountUsersResponse.class,
+ "contentType",
+ contentType,
+ "statusCode",
+ statusCode,
+ "rawResponse",
+ rawResponse,
+ "accountUsers",
+ accountUsers);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+
+ private String contentType;
+
+ private int statusCode;
+
+ private HttpResponse rawResponse;
+
+ private AccountUsers accountUsers;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * HTTP response content type for this operation
+ */
+ public Builder contentType(@Nonnull String contentType) {
+ this.contentType = Utils.checkNotNull(contentType, "contentType");
+ return this;
+ }
+
+ /**
+ * HTTP response status code for this operation
+ */
+ public Builder statusCode(int statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ public Builder rawResponse(@Nonnull HttpResponse rawResponse) {
+ this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse");
+ return this;
+ }
+
+ /**
+ * Successfully retrieved a paginated list of account users.
+ */
+ public Builder accountUsers(@Nullable AccountUsers accountUsers) {
+ this.accountUsers = accountUsers;
+ return this;
+ }
+
+ public ListAccountUsersResponse build() {
+ return new ListAccountUsersResponse(contentType, statusCode, rawResponse, accountUsers);
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/operations/GetAccountUser.java b/packages/java/src/main/java/com/cvent/operations/GetAccountUser.java
new file mode 100644
index 000000000..6507a9e25
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/operations/GetAccountUser.java
@@ -0,0 +1,293 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.operations;
+
+import static com.cvent.operations.Operations.AsyncRequestOperation;
+import static com.cvent.operations.Operations.RequestOperation;
+import static com.cvent.utils.Exceptions.unchecked;
+
+import com.cvent.SDKConfiguration;
+import com.cvent.SecuritySource;
+import com.cvent.models.components.AccountUser;
+import com.cvent.models.errors.APIException;
+import com.cvent.models.errors.ErrorResponse12;
+import com.cvent.models.operations.GetAccountUserRequest;
+import com.cvent.models.operations.GetAccountUserResponse;
+import com.cvent.utils.AsyncRetries;
+import com.cvent.utils.BackoffStrategy;
+import com.cvent.utils.Blob;
+import com.cvent.utils.HTTPClient;
+import com.cvent.utils.HTTPRequest;
+import com.cvent.utils.Headers;
+import com.cvent.utils.Hook.AfterErrorContextImpl;
+import com.cvent.utils.Hook.AfterSuccessContextImpl;
+import com.cvent.utils.Hook.BeforeRequestContextImpl;
+import com.cvent.utils.NonRetryableException;
+import com.cvent.utils.Options;
+import com.cvent.utils.Retries;
+import com.cvent.utils.RetryConfig;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.core.type.TypeReference;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Exception;
+import java.lang.String;
+import java.lang.Throwable;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+
+public class GetAccountUser {
+
+ abstract static class Base {
+ final SDKConfiguration sdkConfiguration;
+ final String baseUrl;
+ final SecuritySource securitySource;
+ final List retryStatusCodes;
+ final RetryConfig retryConfig;
+ final HTTPClient client;
+ final Headers _headers;
+
+ public Base(@Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, Headers _headers) {
+ this.sdkConfiguration = sdkConfiguration;
+ this._headers = _headers;
+ this.baseUrl = this.sdkConfiguration.serverUrl();
+ this.securitySource = this.sdkConfiguration.securitySource();
+ Optional.ofNullable(options).ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG)));
+ this.retryStatusCodes = List.of("502", "503", "504");
+ this.retryConfig = Optional.ofNullable(options)
+ .flatMap(Options::retryConfig)
+ .or(sdkConfiguration::retryConfig)
+ .orElse(RetryConfig.builder()
+ .backoff(BackoffStrategy.builder()
+ .initialInterval(2000, TimeUnit.MILLISECONDS)
+ .maxInterval(16000, TimeUnit.MILLISECONDS)
+ .baseFactor((double) (2))
+ .maxElapsedTime(40000, TimeUnit.MILLISECONDS)
+ .retryConnectError(true)
+ .build())
+ .build());
+ this.client = this.sdkConfiguration.client();
+ }
+
+ Optional securitySource() {
+ return Optional.ofNullable(this.securitySource);
+ }
+
+ BeforeRequestContextImpl createBeforeRequestContext() {
+ return new BeforeRequestContextImpl(
+ this.sdkConfiguration,
+ this.baseUrl,
+ "getAccountUser",
+ java.util.Optional.of(java.util.List.of("account/users:read")),
+ securitySource());
+ }
+
+ AfterSuccessContextImpl createAfterSuccessContext() {
+ return new AfterSuccessContextImpl(
+ this.sdkConfiguration,
+ this.baseUrl,
+ "getAccountUser",
+ java.util.Optional.of(java.util.List.of("account/users:read")),
+ securitySource());
+ }
+
+ AfterErrorContextImpl createAfterErrorContext() {
+ return new AfterErrorContextImpl(
+ this.sdkConfiguration,
+ this.baseUrl,
+ "getAccountUser",
+ java.util.Optional.of(java.util.List.of("account/users:read")),
+ securitySource());
+ }
+
+ HttpRequest buildRequest(T request, Class klass) throws Exception {
+ String url = Utils.generateURL(klass, this.baseUrl, "/users/{userId}", request, null);
+ HTTPRequest req = new HTTPRequest(url, "GET");
+ req.addHeader("Accept", "application/json").addHeader("user-agent", SDKConfiguration.USER_AGENT);
+ _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v)));
+ Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity());
+
+ return req.build();
+ }
+ }
+
+ public static class Sync extends Base implements RequestOperation {
+ public Sync(@Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, Headers _headers) {
+ super(sdkConfiguration, options, _headers);
+ }
+
+ private HttpRequest onBuildRequest(GetAccountUserRequest request) throws Exception {
+ HttpRequest req = buildRequest(request, GetAccountUserRequest.class);
+ return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req);
+ }
+
+ private HttpResponse onError(HttpResponse response, Exception error)
+ throws Exception {
+ return sdkConfiguration
+ .hooks()
+ .afterError(createAfterErrorContext(), Optional.ofNullable(response), Optional.ofNullable(error));
+ }
+
+ private HttpResponse onSuccess(HttpResponse response) throws Exception {
+ return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response);
+ }
+
+ @Override
+ public HttpResponse doRequest(GetAccountUserRequest request) {
+ Retries retries = Retries.builder()
+ .action(() -> {
+ HttpRequest r;
+ try {
+ r = onBuildRequest(request);
+ } catch (Exception e) {
+ throw new NonRetryableException(e);
+ }
+ try {
+ HttpResponse httpRes = client.send(r);
+ if (Utils.statusCodeMatches(httpRes.statusCode(), "401", "403", "404", "429", "4XX", "5XX")) {
+ return onError(httpRes, null);
+ }
+ return httpRes;
+ } catch (Exception e) {
+ return onError(null, e);
+ }
+ })
+ .retryConfig(retryConfig)
+ .statusCodes(retryStatusCodes)
+ .build();
+ return unchecked(() -> onSuccess(retries.run())).get();
+ }
+
+ @Override
+ public GetAccountUserResponse handleResponse(HttpResponse response) {
+ String contentType = response.headers().firstValue("Content-Type").orElse("application/octet-stream");
+ GetAccountUserResponse.Builder resBuilder = GetAccountUserResponse.builder()
+ .contentType(contentType)
+ .statusCode(response.statusCode())
+ .rawResponse(response);
+
+ GetAccountUserResponse res = resBuilder.build();
+
+ if (Utils.statusCodeMatches(response.statusCode(), "200")) {
+ if (Utils.contentTypeMatches(contentType, "application/json")) {
+ return res.withAccountUser(Utils.unmarshal(response, new TypeReference() {}));
+ } else {
+ throw APIException.from("Unexpected content-type received: " + contentType, response);
+ }
+ }
+ if (Utils.statusCodeMatches(response.statusCode(), "401", "403", "404", "429")) {
+ if (Utils.contentTypeMatches(contentType, "application/json")) {
+ throw ErrorResponse12.from(response);
+ } else {
+ throw APIException.from("Unexpected content-type received: " + contentType, response);
+ }
+ }
+ if (Utils.statusCodeMatches(response.statusCode(), "4XX")) {
+ // no content
+ throw APIException.from("API error occurred", response);
+ }
+ if (Utils.statusCodeMatches(response.statusCode(), "5XX")) {
+ // no content
+ throw APIException.from("API error occurred", response);
+ }
+ throw APIException.from("Unexpected status code received: " + response.statusCode(), response);
+ }
+ }
+
+ public static class Async extends Base
+ implements AsyncRequestOperation<
+ GetAccountUserRequest, com.cvent.models.operations.async.GetAccountUserResponse> {
+ private final ScheduledExecutorService retryScheduler;
+
+ public Async(
+ @Nonnull SDKConfiguration sdkConfiguration,
+ @Nullable Options options,
+ @Nullable ScheduledExecutorService retryScheduler,
+ Headers _headers) {
+ super(sdkConfiguration, options, _headers);
+ this.retryScheduler = retryScheduler;
+ }
+
+ private CompletableFuture onBuildRequest(GetAccountUserRequest request) throws Exception {
+ HttpRequest req = buildRequest(request, GetAccountUserRequest.class);
+ return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req);
+ }
+
+ private CompletableFuture> onError(HttpResponse response, Throwable error) {
+ return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error);
+ }
+
+ private CompletableFuture> onSuccess(HttpResponse response) {
+ return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response);
+ }
+
+ @Override
+ public CompletableFuture> doRequest(GetAccountUserRequest request) {
+ AsyncRetries retries = AsyncRetries.builder()
+ .retryConfig(retryConfig)
+ .statusCodes(retryStatusCodes)
+ .scheduler(retryScheduler)
+ .build();
+ return retries.retry(() -> unchecked(() -> onBuildRequest(request))
+ .get()
+ .thenCompose(client::sendAsync)
+ .handle((resp, err) -> {
+ if (err != null) {
+ return onError(null, err);
+ }
+ if (Utils.statusCodeMatches(resp.statusCode(), "401", "403", "404", "429", "4XX", "5XX")) {
+ return onError(resp, null);
+ }
+ return CompletableFuture.completedFuture(resp);
+ })
+ .thenCompose(Function.identity()))
+ .thenCompose(this::onSuccess);
+ }
+
+ @Override
+ public CompletableFuture handleResponse(
+ HttpResponse response) {
+ String contentType = response.headers().firstValue("Content-Type").orElse("application/octet-stream");
+ com.cvent.models.operations.async.GetAccountUserResponse.Builder resBuilder =
+ com.cvent.models.operations.async.GetAccountUserResponse.builder()
+ .contentType(contentType)
+ .statusCode(response.statusCode())
+ .rawResponse(response);
+
+ com.cvent.models.operations.async.GetAccountUserResponse res = resBuilder.build();
+
+ if (Utils.statusCodeMatches(response.statusCode(), "200")) {
+ if (Utils.contentTypeMatches(contentType, "application/json")) {
+ return Utils.unmarshalAsync(response, new TypeReference() {})
+ .thenApply(res::withAccountUser);
+ } else {
+ return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType);
+ }
+ }
+ if (Utils.statusCodeMatches(response.statusCode(), "401", "403", "404", "429")) {
+ if (Utils.contentTypeMatches(contentType, "application/json")) {
+ return ErrorResponse12.fromAsync(response).thenCompose(CompletableFuture::failedFuture);
+ } else {
+ return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType);
+ }
+ }
+ if (Utils.statusCodeMatches(response.statusCode(), "4XX")) {
+ // no content
+ return Utils.createAsyncApiError(response, "API error occurred");
+ }
+ if (Utils.statusCodeMatches(response.statusCode(), "5XX")) {
+ // no content
+ return Utils.createAsyncApiError(response, "API error occurred");
+ }
+ return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode());
+ }
+ }
+}
diff --git a/packages/java/src/main/java/com/cvent/operations/ListAccountUsers.java b/packages/java/src/main/java/com/cvent/operations/ListAccountUsers.java
new file mode 100644
index 000000000..f2715d851
--- /dev/null
+++ b/packages/java/src/main/java/com/cvent/operations/ListAccountUsers.java
@@ -0,0 +1,296 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.cvent.operations;
+
+import static com.cvent.operations.Operations.AsyncRequestOperation;
+import static com.cvent.operations.Operations.RequestOperation;
+import static com.cvent.utils.Exceptions.unchecked;
+
+import com.cvent.SDKConfiguration;
+import com.cvent.SecuritySource;
+import com.cvent.models.components.AccountUsers;
+import com.cvent.models.errors.APIException;
+import com.cvent.models.errors.ErrorResponse12;
+import com.cvent.models.operations.ListAccountUsersRequest;
+import com.cvent.models.operations.ListAccountUsersResponse;
+import com.cvent.utils.AsyncRetries;
+import com.cvent.utils.BackoffStrategy;
+import com.cvent.utils.Blob;
+import com.cvent.utils.HTTPClient;
+import com.cvent.utils.HTTPRequest;
+import com.cvent.utils.Headers;
+import com.cvent.utils.Hook.AfterErrorContextImpl;
+import com.cvent.utils.Hook.AfterSuccessContextImpl;
+import com.cvent.utils.Hook.BeforeRequestContextImpl;
+import com.cvent.utils.NonRetryableException;
+import com.cvent.utils.Options;
+import com.cvent.utils.Retries;
+import com.cvent.utils.RetryConfig;
+import com.cvent.utils.Utils;
+import com.fasterxml.jackson.core.type.TypeReference;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+import java.io.InputStream;
+import java.lang.Exception;
+import java.lang.String;
+import java.lang.Throwable;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+
+public class ListAccountUsers {
+
+ abstract static class Base {
+ final SDKConfiguration sdkConfiguration;
+ final String baseUrl;
+ final SecuritySource securitySource;
+ final List retryStatusCodes;
+ final RetryConfig retryConfig;
+ final HTTPClient client;
+ final Headers _headers;
+
+ public Base(@Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, Headers _headers) {
+ this.sdkConfiguration = sdkConfiguration;
+ this._headers = _headers;
+ this.baseUrl = this.sdkConfiguration.serverUrl();
+ this.securitySource = this.sdkConfiguration.securitySource();
+ Optional.ofNullable(options).ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG)));
+ this.retryStatusCodes = List.of("502", "503", "504");
+ this.retryConfig = Optional.ofNullable(options)
+ .flatMap(Options::retryConfig)
+ .or(sdkConfiguration::retryConfig)
+ .orElse(RetryConfig.builder()
+ .backoff(BackoffStrategy.builder()
+ .initialInterval(2000, TimeUnit.MILLISECONDS)
+ .maxInterval(16000, TimeUnit.MILLISECONDS)
+ .baseFactor((double) (2))
+ .maxElapsedTime(40000, TimeUnit.MILLISECONDS)
+ .retryConnectError(true)
+ .build())
+ .build());
+ this.client = this.sdkConfiguration.client();
+ }
+
+ Optional securitySource() {
+ return Optional.ofNullable(this.securitySource);
+ }
+
+ BeforeRequestContextImpl createBeforeRequestContext() {
+ return new BeforeRequestContextImpl(
+ this.sdkConfiguration,
+ this.baseUrl,
+ "listAccountUsers",
+ java.util.Optional.of(java.util.List.of("account/users:read")),
+ securitySource());
+ }
+
+ AfterSuccessContextImpl createAfterSuccessContext() {
+ return new AfterSuccessContextImpl(
+ this.sdkConfiguration,
+ this.baseUrl,
+ "listAccountUsers",
+ java.util.Optional.of(java.util.List.of("account/users:read")),
+ securitySource());
+ }
+
+ AfterErrorContextImpl createAfterErrorContext() {
+ return new AfterErrorContextImpl(
+ this.sdkConfiguration,
+ this.baseUrl,
+ "listAccountUsers",
+ java.util.Optional.of(java.util.List.of("account/users:read")),
+ securitySource());
+ }
+
+