software.amazon.awssdk.services.workmail.model.DescribeUserResponse Maven / Gradle / Ivy
Show all versions of workmail Show documentation
/*
* 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 extends Builder> 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