All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.workmail.model.DescribeUserResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon WorkMail module holds the client classes that are used for communicating with Amazon WorkMail Service

There is a newer version: 2.28.3
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.workmail.model;

import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class DescribeUserResponse extends WorkMailResponse implements
        ToCopyableBuilder {
    private static final SdkField USER_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("UserId")
            .getter(getter(DescribeUserResponse::userId)).setter(setter(Builder::userId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserId").build()).build();

    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
            .getter(getter(DescribeUserResponse::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();

    private static final SdkField EMAIL_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Email")
            .getter(getter(DescribeUserResponse::email)).setter(setter(Builder::email))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Email").build()).build();

    private static final SdkField DISPLAY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("DisplayName").getter(getter(DescribeUserResponse::displayName)).setter(setter(Builder::displayName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisplayName").build()).build();

    private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("State")
            .getter(getter(DescribeUserResponse::stateAsString)).setter(setter(Builder::state))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State").build()).build();

    private static final SdkField USER_ROLE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("UserRole").getter(getter(DescribeUserResponse::userRoleAsString)).setter(setter(Builder::userRole))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserRole").build()).build();

    private static final SdkField ENABLED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("EnabledDate").getter(getter(DescribeUserResponse::enabledDate)).setter(setter(Builder::enabledDate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnabledDate").build()).build();

    private static final SdkField DISABLED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("DisabledDate").getter(getter(DescribeUserResponse::disabledDate)).setter(setter(Builder::disabledDate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisabledDate").build()).build();

    private static final SdkField MAILBOX_PROVISIONED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("MailboxProvisionedDate").getter(getter(DescribeUserResponse::mailboxProvisionedDate))
            .setter(setter(Builder::mailboxProvisionedDate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MailboxProvisionedDate").build())
            .build();

    private static final SdkField MAILBOX_DEPROVISIONED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("MailboxDeprovisionedDate").getter(getter(DescribeUserResponse::mailboxDeprovisionedDate))
            .setter(setter(Builder::mailboxDeprovisionedDate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MailboxDeprovisionedDate").build())
            .build();

    private static final SdkField FIRST_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("FirstName").getter(getter(DescribeUserResponse::firstName)).setter(setter(Builder::firstName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FirstName").build()).build();

    private static final SdkField LAST_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("LastName").getter(getter(DescribeUserResponse::lastName)).setter(setter(Builder::lastName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastName").build()).build();

    private static final SdkField HIDDEN_FROM_GLOBAL_ADDRESS_LIST_FIELD = SdkField
            . builder(MarshallingType.BOOLEAN)
            .memberName("HiddenFromGlobalAddressList")
            .getter(getter(DescribeUserResponse::hiddenFromGlobalAddressList))
            .setter(setter(Builder::hiddenFromGlobalAddressList))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HiddenFromGlobalAddressList")
                    .build()).build();

    private static final SdkField INITIALS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Initials").getter(getter(DescribeUserResponse::initials)).setter(setter(Builder::initials))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Initials").build()).build();

    private static final SdkField TELEPHONE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Telephone").getter(getter(DescribeUserResponse::telephone)).setter(setter(Builder::telephone))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Telephone").build()).build();

    private static final SdkField STREET_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Street")
            .getter(getter(DescribeUserResponse::street)).setter(setter(Builder::street))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Street").build()).build();

    private static final SdkField JOB_TITLE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("JobTitle").getter(getter(DescribeUserResponse::jobTitle)).setter(setter(Builder::jobTitle))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JobTitle").build()).build();

    private static final SdkField CITY_FIELD = SdkField. builder(MarshallingType.STRING).memberName("City")
            .getter(getter(DescribeUserResponse::city)).setter(setter(Builder::city))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("City").build()).build();

    private static final SdkField COMPANY_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Company")
            .getter(getter(DescribeUserResponse::company)).setter(setter(Builder::company))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Company").build()).build();

    private static final SdkField ZIP_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ZipCode").getter(getter(DescribeUserResponse::zipCode)).setter(setter(Builder::zipCode))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ZipCode").build()).build();

    private static final SdkField DEPARTMENT_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Department").getter(getter(DescribeUserResponse::department)).setter(setter(Builder::department))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Department").build()).build();

    private static final SdkField COUNTRY_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Country")
            .getter(getter(DescribeUserResponse::country)).setter(setter(Builder::country))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Country").build()).build();

    private static final SdkField OFFICE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Office")
            .getter(getter(DescribeUserResponse::office)).setter(setter(Builder::office))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Office").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(USER_ID_FIELD, NAME_FIELD,
            EMAIL_FIELD, DISPLAY_NAME_FIELD, STATE_FIELD, USER_ROLE_FIELD, ENABLED_DATE_FIELD, DISABLED_DATE_FIELD,
            MAILBOX_PROVISIONED_DATE_FIELD, MAILBOX_DEPROVISIONED_DATE_FIELD, FIRST_NAME_FIELD, LAST_NAME_FIELD,
            HIDDEN_FROM_GLOBAL_ADDRESS_LIST_FIELD, INITIALS_FIELD, TELEPHONE_FIELD, STREET_FIELD, JOB_TITLE_FIELD, CITY_FIELD,
            COMPANY_FIELD, ZIP_CODE_FIELD, DEPARTMENT_FIELD, COUNTRY_FIELD, OFFICE_FIELD));

    private final String userId;

    private final String name;

    private final String email;

    private final String displayName;

    private final String state;

    private final String userRole;

    private final Instant enabledDate;

    private final Instant disabledDate;

    private final Instant mailboxProvisionedDate;

    private final Instant mailboxDeprovisionedDate;

    private final String firstName;

    private final String lastName;

    private final Boolean hiddenFromGlobalAddressList;

    private final String initials;

    private final String telephone;

    private final String street;

    private final String jobTitle;

    private final String city;

    private final String company;

    private final String zipCode;

    private final String department;

    private final String country;

    private final String office;

    private DescribeUserResponse(BuilderImpl builder) {
        super(builder);
        this.userId = builder.userId;
        this.name = builder.name;
        this.email = builder.email;
        this.displayName = builder.displayName;
        this.state = builder.state;
        this.userRole = builder.userRole;
        this.enabledDate = builder.enabledDate;
        this.disabledDate = builder.disabledDate;
        this.mailboxProvisionedDate = builder.mailboxProvisionedDate;
        this.mailboxDeprovisionedDate = builder.mailboxDeprovisionedDate;
        this.firstName = builder.firstName;
        this.lastName = builder.lastName;
        this.hiddenFromGlobalAddressList = builder.hiddenFromGlobalAddressList;
        this.initials = builder.initials;
        this.telephone = builder.telephone;
        this.street = builder.street;
        this.jobTitle = builder.jobTitle;
        this.city = builder.city;
        this.company = builder.company;
        this.zipCode = builder.zipCode;
        this.department = builder.department;
        this.country = builder.country;
        this.office = builder.office;
    }

    /**
     * 

* The identifier for the described user. *

* * @return The identifier for the described user. */ public final String userId() { return userId; } /** *

* The name for the user. *

* * @return The name for the user. */ public final String name() { return name; } /** *

* The email of the user. *

* * @return The email of the user. */ public final String email() { return email; } /** *

* The display name of the user. *

* * @return The display name of the user. */ public final String displayName() { return displayName; } /** *

* The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to WorkMail). *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link EntityState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

* * @return The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to * WorkMail). * @see EntityState */ public final EntityState state() { return EntityState.fromValue(state); } /** *

* The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to WorkMail). *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link EntityState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

* * @return The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to * WorkMail). * @see EntityState */ public final String stateAsString() { return state; } /** *

* In certain cases, other entities are modeled as users. If interoperability is enabled, resources are imported * into WorkMail as users. Because different WorkMail organizations rely on different directory types, * administrators can distinguish between an unregistered user (account is disabled and has a user role) and the * directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #userRole} will * return {@link UserRole#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #userRoleAsString}. *

* * @return In certain cases, other entities are modeled as users. If interoperability is enabled, resources are * imported into WorkMail as users. Because different WorkMail organizations rely on different directory * types, administrators can distinguish between an unregistered user (account is disabled and has a user * role) and the directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. * @see UserRole */ public final UserRole userRole() { return UserRole.fromValue(userRole); } /** *

* In certain cases, other entities are modeled as users. If interoperability is enabled, resources are imported * into WorkMail as users. Because different WorkMail organizations rely on different directory types, * administrators can distinguish between an unregistered user (account is disabled and has a user role) and the * directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #userRole} will * return {@link UserRole#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #userRoleAsString}. *

* * @return In certain cases, other entities are modeled as users. If interoperability is enabled, resources are * imported into WorkMail as users. Because different WorkMail organizations rely on different directory * types, administrators can distinguish between an unregistered user (account is disabled and has a user * role) and the directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. * @see UserRole */ public final String userRoleAsString() { return userRole; } /** *

* The date and time at which the user was enabled for WorkMailusage, in UNIX epoch time format. *

* * @return The date and time at which the user was enabled for WorkMailusage, in UNIX epoch time format. */ public final Instant enabledDate() { return enabledDate; } /** *

* The date and time at which the user was disabled for WorkMail usage, in UNIX epoch time format. *

* * @return The date and time at which the user was disabled for WorkMail usage, in UNIX epoch time format. */ public final Instant disabledDate() { return disabledDate; } /** *

* The date when the mailbox was created for the user. *

* * @return The date when the mailbox was created for the user. */ public final Instant mailboxProvisionedDate() { return mailboxProvisionedDate; } /** *

* The date when the mailbox was removed for the user. *

* * @return The date when the mailbox was removed for the user. */ public final Instant mailboxDeprovisionedDate() { return mailboxDeprovisionedDate; } /** *

* First name of the user. *

* * @return First name of the user. */ public final String firstName() { return firstName; } /** *

* Last name of the user. *

* * @return Last name of the user. */ public final String lastName() { return lastName; } /** *

* If enabled, the user is hidden from the global address list. *

* * @return If enabled, the user is hidden from the global address list. */ public final Boolean hiddenFromGlobalAddressList() { return hiddenFromGlobalAddressList; } /** *

* Initials of the user. *

* * @return Initials of the user. */ public final String initials() { return initials; } /** *

* User's contact number. *

* * @return User's contact number. */ public final String telephone() { return telephone; } /** *

* Street where the user is located. *

* * @return Street where the user is located. */ public final String street() { return street; } /** *

* Job title of the user. *

* * @return Job title of the user. */ public final String jobTitle() { return jobTitle; } /** *

* City where the user is located. *

* * @return City where the user is located. */ public final String city() { return city; } /** *

* Company of the user. *

* * @return Company of the user. */ public final String company() { return company; } /** *

* Zip code of the user. *

* * @return Zip code of the user. */ public final String zipCode() { return zipCode; } /** *

* Department of the user. *

* * @return Department of the user. */ public final String department() { return department; } /** *

* Country where the user is located. *

* * @return Country where the user is located. */ public final String country() { return country; } /** *

* Office where the user is located. *

* * @return Office where the user is located. */ public final String office() { return office; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(userId()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(email()); hashCode = 31 * hashCode + Objects.hashCode(displayName()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(userRoleAsString()); hashCode = 31 * hashCode + Objects.hashCode(enabledDate()); hashCode = 31 * hashCode + Objects.hashCode(disabledDate()); hashCode = 31 * hashCode + Objects.hashCode(mailboxProvisionedDate()); hashCode = 31 * hashCode + Objects.hashCode(mailboxDeprovisionedDate()); hashCode = 31 * hashCode + Objects.hashCode(firstName()); hashCode = 31 * hashCode + Objects.hashCode(lastName()); hashCode = 31 * hashCode + Objects.hashCode(hiddenFromGlobalAddressList()); hashCode = 31 * hashCode + Objects.hashCode(initials()); hashCode = 31 * hashCode + Objects.hashCode(telephone()); hashCode = 31 * hashCode + Objects.hashCode(street()); hashCode = 31 * hashCode + Objects.hashCode(jobTitle()); hashCode = 31 * hashCode + Objects.hashCode(city()); hashCode = 31 * hashCode + Objects.hashCode(company()); hashCode = 31 * hashCode + Objects.hashCode(zipCode()); hashCode = 31 * hashCode + Objects.hashCode(department()); hashCode = 31 * hashCode + Objects.hashCode(country()); hashCode = 31 * hashCode + Objects.hashCode(office()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DescribeUserResponse)) { return false; } DescribeUserResponse other = (DescribeUserResponse) obj; return Objects.equals(userId(), other.userId()) && Objects.equals(name(), other.name()) && Objects.equals(email(), other.email()) && Objects.equals(displayName(), other.displayName()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(userRoleAsString(), other.userRoleAsString()) && Objects.equals(enabledDate(), other.enabledDate()) && Objects.equals(disabledDate(), other.disabledDate()) && Objects.equals(mailboxProvisionedDate(), other.mailboxProvisionedDate()) && Objects.equals(mailboxDeprovisionedDate(), other.mailboxDeprovisionedDate()) && Objects.equals(firstName(), other.firstName()) && Objects.equals(lastName(), other.lastName()) && Objects.equals(hiddenFromGlobalAddressList(), other.hiddenFromGlobalAddressList()) && Objects.equals(initials(), other.initials()) && Objects.equals(telephone(), other.telephone()) && Objects.equals(street(), other.street()) && Objects.equals(jobTitle(), other.jobTitle()) && Objects.equals(city(), other.city()) && Objects.equals(company(), other.company()) && Objects.equals(zipCode(), other.zipCode()) && Objects.equals(department(), other.department()) && Objects.equals(country(), other.country()) && Objects.equals(office(), other.office()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("DescribeUserResponse").add("UserId", userId()).add("Name", name()).add("Email", email()) .add("DisplayName", displayName() == null ? null : "*** Sensitive Data Redacted ***") .add("State", stateAsString()).add("UserRole", userRoleAsString()).add("EnabledDate", enabledDate()) .add("DisabledDate", disabledDate()).add("MailboxProvisionedDate", mailboxProvisionedDate()) .add("MailboxDeprovisionedDate", mailboxDeprovisionedDate()) .add("FirstName", firstName() == null ? null : "*** Sensitive Data Redacted ***") .add("LastName", lastName() == null ? null : "*** Sensitive Data Redacted ***") .add("HiddenFromGlobalAddressList", hiddenFromGlobalAddressList()) .add("Initials", initials() == null ? null : "*** Sensitive Data Redacted ***") .add("Telephone", telephone() == null ? null : "*** Sensitive Data Redacted ***") .add("Street", street() == null ? null : "*** Sensitive Data Redacted ***") .add("JobTitle", jobTitle() == null ? null : "*** Sensitive Data Redacted ***") .add("City", city() == null ? null : "*** Sensitive Data Redacted ***") .add("Company", company() == null ? null : "*** Sensitive Data Redacted ***") .add("ZipCode", zipCode() == null ? null : "*** Sensitive Data Redacted ***") .add("Department", department() == null ? null : "*** Sensitive Data Redacted ***") .add("Country", country() == null ? null : "*** Sensitive Data Redacted ***") .add("Office", office() == null ? null : "*** Sensitive Data Redacted ***").build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "UserId": return Optional.ofNullable(clazz.cast(userId())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "Email": return Optional.ofNullable(clazz.cast(email())); case "DisplayName": return Optional.ofNullable(clazz.cast(displayName())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "UserRole": return Optional.ofNullable(clazz.cast(userRoleAsString())); case "EnabledDate": return Optional.ofNullable(clazz.cast(enabledDate())); case "DisabledDate": return Optional.ofNullable(clazz.cast(disabledDate())); case "MailboxProvisionedDate": return Optional.ofNullable(clazz.cast(mailboxProvisionedDate())); case "MailboxDeprovisionedDate": return Optional.ofNullable(clazz.cast(mailboxDeprovisionedDate())); case "FirstName": return Optional.ofNullable(clazz.cast(firstName())); case "LastName": return Optional.ofNullable(clazz.cast(lastName())); case "HiddenFromGlobalAddressList": return Optional.ofNullable(clazz.cast(hiddenFromGlobalAddressList())); case "Initials": return Optional.ofNullable(clazz.cast(initials())); case "Telephone": return Optional.ofNullable(clazz.cast(telephone())); case "Street": return Optional.ofNullable(clazz.cast(street())); case "JobTitle": return Optional.ofNullable(clazz.cast(jobTitle())); case "City": return Optional.ofNullable(clazz.cast(city())); case "Company": return Optional.ofNullable(clazz.cast(company())); case "ZipCode": return Optional.ofNullable(clazz.cast(zipCode())); case "Department": return Optional.ofNullable(clazz.cast(department())); case "Country": return Optional.ofNullable(clazz.cast(country())); case "Office": return Optional.ofNullable(clazz.cast(office())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DescribeUserResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends WorkMailResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The identifier for the described user. *

* * @param userId * The identifier for the described user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder userId(String userId); /** *

* The name for the user. *

* * @param name * The name for the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* The email of the user. *

* * @param email * The email of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder email(String email); /** *

* The display name of the user. *

* * @param displayName * The display name of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder displayName(String displayName); /** *

* The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to * WorkMail). *

* * @param state * The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to * WorkMail). * @see EntityState * @return Returns a reference to this object so that method calls can be chained together. * @see EntityState */ Builder state(String state); /** *

* The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to * WorkMail). *

* * @param state * The state of a user: enabled (registered to WorkMail) or disabled (deregistered or never registered to * WorkMail). * @see EntityState * @return Returns a reference to this object so that method calls can be chained together. * @see EntityState */ Builder state(EntityState state); /** *

* In certain cases, other entities are modeled as users. If interoperability is enabled, resources are imported * into WorkMail as users. Because different WorkMail organizations rely on different directory types, * administrators can distinguish between an unregistered user (account is disabled and has a user role) and the * directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. *

* * @param userRole * In certain cases, other entities are modeled as users. If interoperability is enabled, resources are * imported into WorkMail as users. Because different WorkMail organizations rely on different directory * types, administrators can distinguish between an unregistered user (account is disabled and has a user * role) and the directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. * @see UserRole * @return Returns a reference to this object so that method calls can be chained together. * @see UserRole */ Builder userRole(String userRole); /** *

* In certain cases, other entities are modeled as users. If interoperability is enabled, resources are imported * into WorkMail as users. Because different WorkMail organizations rely on different directory types, * administrators can distinguish between an unregistered user (account is disabled and has a user role) and the * directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. *

* * @param userRole * In certain cases, other entities are modeled as users. If interoperability is enabled, resources are * imported into WorkMail as users. Because different WorkMail organizations rely on different directory * types, administrators can distinguish between an unregistered user (account is disabled and has a user * role) and the directory administrators. The values are USER, RESOURCE, SYSTEM_USER, and REMOTE_USER. * @see UserRole * @return Returns a reference to this object so that method calls can be chained together. * @see UserRole */ Builder userRole(UserRole userRole); /** *

* The date and time at which the user was enabled for WorkMailusage, in UNIX epoch time format. *

* * @param enabledDate * The date and time at which the user was enabled for WorkMailusage, in UNIX epoch time format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enabledDate(Instant enabledDate); /** *

* The date and time at which the user was disabled for WorkMail usage, in UNIX epoch time format. *

* * @param disabledDate * The date and time at which the user was disabled for WorkMail usage, in UNIX epoch time format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder disabledDate(Instant disabledDate); /** *

* The date when the mailbox was created for the user. *

* * @param mailboxProvisionedDate * The date when the mailbox was created for the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mailboxProvisionedDate(Instant mailboxProvisionedDate); /** *

* The date when the mailbox was removed for the user. *

* * @param mailboxDeprovisionedDate * The date when the mailbox was removed for the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mailboxDeprovisionedDate(Instant mailboxDeprovisionedDate); /** *

* First name of the user. *

* * @param firstName * First name of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder firstName(String firstName); /** *

* Last name of the user. *

* * @param lastName * Last name of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastName(String lastName); /** *

* If enabled, the user is hidden from the global address list. *

* * @param hiddenFromGlobalAddressList * If enabled, the user is hidden from the global address list. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hiddenFromGlobalAddressList(Boolean hiddenFromGlobalAddressList); /** *

* Initials of the user. *

* * @param initials * Initials of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder initials(String initials); /** *

* User's contact number. *

* * @param telephone * User's contact number. * @return Returns a reference to this object so that method calls can be chained together. */ Builder telephone(String telephone); /** *

* Street where the user is located. *

* * @param street * Street where the user is located. * @return Returns a reference to this object so that method calls can be chained together. */ Builder street(String street); /** *

* Job title of the user. *

* * @param jobTitle * Job title of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobTitle(String jobTitle); /** *

* City where the user is located. *

* * @param city * City where the user is located. * @return Returns a reference to this object so that method calls can be chained together. */ Builder city(String city); /** *

* Company of the user. *

* * @param company * Company of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder company(String company); /** *

* Zip code of the user. *

* * @param zipCode * Zip code of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder zipCode(String zipCode); /** *

* Department of the user. *

* * @param department * Department of the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder department(String department); /** *

* Country where the user is located. *

* * @param country * Country where the user is located. * @return Returns a reference to this object so that method calls can be chained together. */ Builder country(String country); /** *

* Office where the user is located. *

* * @param office * Office where the user is located. * @return Returns a reference to this object so that method calls can be chained together. */ Builder office(String office); } static final class BuilderImpl extends WorkMailResponse.BuilderImpl implements Builder { private String userId; private String name; private String email; private String displayName; private String state; private String userRole; private Instant enabledDate; private Instant disabledDate; private Instant mailboxProvisionedDate; private Instant mailboxDeprovisionedDate; private String firstName; private String lastName; private Boolean hiddenFromGlobalAddressList; private String initials; private String telephone; private String street; private String jobTitle; private String city; private String company; private String zipCode; private String department; private String country; private String office; private BuilderImpl() { } private BuilderImpl(DescribeUserResponse model) { super(model); userId(model.userId); name(model.name); email(model.email); displayName(model.displayName); state(model.state); userRole(model.userRole); enabledDate(model.enabledDate); disabledDate(model.disabledDate); mailboxProvisionedDate(model.mailboxProvisionedDate); mailboxDeprovisionedDate(model.mailboxDeprovisionedDate); firstName(model.firstName); lastName(model.lastName); hiddenFromGlobalAddressList(model.hiddenFromGlobalAddressList); initials(model.initials); telephone(model.telephone); street(model.street); jobTitle(model.jobTitle); city(model.city); company(model.company); zipCode(model.zipCode); department(model.department); country(model.country); office(model.office); } public final String getUserId() { return userId; } public final void setUserId(String userId) { this.userId = userId; } @Override public final Builder userId(String userId) { this.userId = userId; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final String getEmail() { return email; } public final void setEmail(String email) { this.email = email; } @Override public final Builder email(String email) { this.email = email; return this; } public final String getDisplayName() { return displayName; } public final void setDisplayName(String displayName) { this.displayName = displayName; } @Override public final Builder displayName(String displayName) { this.displayName = displayName; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(EntityState state) { this.state(state == null ? null : state.toString()); return this; } public final String getUserRole() { return userRole; } public final void setUserRole(String userRole) { this.userRole = userRole; } @Override public final Builder userRole(String userRole) { this.userRole = userRole; return this; } @Override public final Builder userRole(UserRole userRole) { this.userRole(userRole == null ? null : userRole.toString()); return this; } public final Instant getEnabledDate() { return enabledDate; } public final void setEnabledDate(Instant enabledDate) { this.enabledDate = enabledDate; } @Override public final Builder enabledDate(Instant enabledDate) { this.enabledDate = enabledDate; return this; } public final Instant getDisabledDate() { return disabledDate; } public final void setDisabledDate(Instant disabledDate) { this.disabledDate = disabledDate; } @Override public final Builder disabledDate(Instant disabledDate) { this.disabledDate = disabledDate; return this; } public final Instant getMailboxProvisionedDate() { return mailboxProvisionedDate; } public final void setMailboxProvisionedDate(Instant mailboxProvisionedDate) { this.mailboxProvisionedDate = mailboxProvisionedDate; } @Override public final Builder mailboxProvisionedDate(Instant mailboxProvisionedDate) { this.mailboxProvisionedDate = mailboxProvisionedDate; return this; } public final Instant getMailboxDeprovisionedDate() { return mailboxDeprovisionedDate; } public final void setMailboxDeprovisionedDate(Instant mailboxDeprovisionedDate) { this.mailboxDeprovisionedDate = mailboxDeprovisionedDate; } @Override public final Builder mailboxDeprovisionedDate(Instant mailboxDeprovisionedDate) { this.mailboxDeprovisionedDate = mailboxDeprovisionedDate; return this; } public final String getFirstName() { return firstName; } public final void setFirstName(String firstName) { this.firstName = firstName; } @Override public final Builder firstName(String firstName) { this.firstName = firstName; return this; } public final String getLastName() { return lastName; } public final void setLastName(String lastName) { this.lastName = lastName; } @Override public final Builder lastName(String lastName) { this.lastName = lastName; return this; } public final Boolean getHiddenFromGlobalAddressList() { return hiddenFromGlobalAddressList; } public final void setHiddenFromGlobalAddressList(Boolean hiddenFromGlobalAddressList) { this.hiddenFromGlobalAddressList = hiddenFromGlobalAddressList; } @Override public final Builder hiddenFromGlobalAddressList(Boolean hiddenFromGlobalAddressList) { this.hiddenFromGlobalAddressList = hiddenFromGlobalAddressList; return this; } public final String getInitials() { return initials; } public final void setInitials(String initials) { this.initials = initials; } @Override public final Builder initials(String initials) { this.initials = initials; return this; } public final String getTelephone() { return telephone; } public final void setTelephone(String telephone) { this.telephone = telephone; } @Override public final Builder telephone(String telephone) { this.telephone = telephone; return this; } public final String getStreet() { return street; } public final void setStreet(String street) { this.street = street; } @Override public final Builder street(String street) { this.street = street; return this; } public final String getJobTitle() { return jobTitle; } public final void setJobTitle(String jobTitle) { this.jobTitle = jobTitle; } @Override public final Builder jobTitle(String jobTitle) { this.jobTitle = jobTitle; return this; } public final String getCity() { return city; } public final void setCity(String city) { this.city = city; } @Override public final Builder city(String city) { this.city = city; return this; } public final String getCompany() { return company; } public final void setCompany(String company) { this.company = company; } @Override public final Builder company(String company) { this.company = company; return this; } public final String getZipCode() { return zipCode; } public final void setZipCode(String zipCode) { this.zipCode = zipCode; } @Override public final Builder zipCode(String zipCode) { this.zipCode = zipCode; return this; } public final String getDepartment() { return department; } public final void setDepartment(String department) { this.department = department; } @Override public final Builder department(String department) { this.department = department; return this; } public final String getCountry() { return country; } public final void setCountry(String country) { this.country = country; } @Override public final Builder country(String country) { this.country = country; return this; } public final String getOffice() { return office; } public final void setOffice(String office) { this.office = office; } @Override public final Builder office(String office) { this.office = office; return this; } @Override public DescribeUserResponse build() { return new DescribeUserResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy