com.google.api.services.directory.model.SchemaFieldSpec Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* 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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.directory.model;
/**
* You can use schemas to add custom fields to user profiles. You can use these fields to store
* information such as the projects your users work on, their physical locations, their hire dates,
* or whatever else fits your business needs. For more information, see [Custom User Fields](/admin-
* sdk/directory/v1/guides/manage-schemas).
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Admin SDK API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class SchemaFieldSpec extends com.google.api.client.json.GenericJson {
/**
* Display Name of the field.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String displayName;
/**
* The ETag of the field.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String etag;
/**
* The unique identifier of the field (Read-only)
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String fieldId;
/**
* The name of the field.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String fieldName;
/**
* The type of the field.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String fieldType;
/**
* Boolean specifying whether the field is indexed or not. Default: `true`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean indexed;
/**
* The kind of resource this is. For schema fields this is always
* `admin#directory#schema#fieldspec`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String kind;
/**
* A boolean specifying whether this is a multi-valued field or not. Default: `false`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean multiValued;
/**
* Indexing spec for a numeric field. By default, only exact match queries will be supported for
* numeric fields. Setting the `numericIndexingSpec` allows range queries to be supported.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private NumericIndexingSpec numericIndexingSpec;
/**
* Specifies who can view values of this field. See [Retrieve users as a non-administrator
* ](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin) for more information.
* Note: It may take up to 24 hours for changes to this field to be reflected.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String readAccessType;
/**
* Display Name of the field.
* @return value or {@code null} for none
*/
public java.lang.String getDisplayName() {
return displayName;
}
/**
* Display Name of the field.
* @param displayName displayName or {@code null} for none
*/
public SchemaFieldSpec setDisplayName(java.lang.String displayName) {
this.displayName = displayName;
return this;
}
/**
* The ETag of the field.
* @return value or {@code null} for none
*/
public java.lang.String getEtag() {
return etag;
}
/**
* The ETag of the field.
* @param etag etag or {@code null} for none
*/
public SchemaFieldSpec setEtag(java.lang.String etag) {
this.etag = etag;
return this;
}
/**
* The unique identifier of the field (Read-only)
* @return value or {@code null} for none
*/
public java.lang.String getFieldId() {
return fieldId;
}
/**
* The unique identifier of the field (Read-only)
* @param fieldId fieldId or {@code null} for none
*/
public SchemaFieldSpec setFieldId(java.lang.String fieldId) {
this.fieldId = fieldId;
return this;
}
/**
* The name of the field.
* @return value or {@code null} for none
*/
public java.lang.String getFieldName() {
return fieldName;
}
/**
* The name of the field.
* @param fieldName fieldName or {@code null} for none
*/
public SchemaFieldSpec setFieldName(java.lang.String fieldName) {
this.fieldName = fieldName;
return this;
}
/**
* The type of the field.
* @return value or {@code null} for none
*/
public java.lang.String getFieldType() {
return fieldType;
}
/**
* The type of the field.
* @param fieldType fieldType or {@code null} for none
*/
public SchemaFieldSpec setFieldType(java.lang.String fieldType) {
this.fieldType = fieldType;
return this;
}
/**
* Boolean specifying whether the field is indexed or not. Default: `true`.
* @return value or {@code null} for none
*/
public java.lang.Boolean getIndexed() {
return indexed;
}
/**
* Boolean specifying whether the field is indexed or not. Default: `true`.
* @param indexed indexed or {@code null} for none
*/
public SchemaFieldSpec setIndexed(java.lang.Boolean indexed) {
this.indexed = indexed;
return this;
}
/**
* Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}.
*
*
* Boolean properties can have four possible values:
* {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE}
* or {@link Boolean#FALSE}.
*
*
*
* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE}
* and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}.
* {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and
* it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}.
*
*
*
* Boolean specifying whether the field is indexed or not. Default: `true`.
*
*/
public boolean isIndexed() {
if (indexed == null || indexed == com.google.api.client.util.Data.NULL_BOOLEAN) {
return true;
}
return indexed;
}
/**
* The kind of resource this is. For schema fields this is always
* `admin#directory#schema#fieldspec`.
* @return value or {@code null} for none
*/
public java.lang.String getKind() {
return kind;
}
/**
* The kind of resource this is. For schema fields this is always
* `admin#directory#schema#fieldspec`.
* @param kind kind or {@code null} for none
*/
public SchemaFieldSpec setKind(java.lang.String kind) {
this.kind = kind;
return this;
}
/**
* A boolean specifying whether this is a multi-valued field or not. Default: `false`.
* @return value or {@code null} for none
*/
public java.lang.Boolean getMultiValued() {
return multiValued;
}
/**
* A boolean specifying whether this is a multi-valued field or not. Default: `false`.
* @param multiValued multiValued or {@code null} for none
*/
public SchemaFieldSpec setMultiValued(java.lang.Boolean multiValued) {
this.multiValued = multiValued;
return this;
}
/**
* Indexing spec for a numeric field. By default, only exact match queries will be supported for
* numeric fields. Setting the `numericIndexingSpec` allows range queries to be supported.
* @return value or {@code null} for none
*/
public NumericIndexingSpec getNumericIndexingSpec() {
return numericIndexingSpec;
}
/**
* Indexing spec for a numeric field. By default, only exact match queries will be supported for
* numeric fields. Setting the `numericIndexingSpec` allows range queries to be supported.
* @param numericIndexingSpec numericIndexingSpec or {@code null} for none
*/
public SchemaFieldSpec setNumericIndexingSpec(NumericIndexingSpec numericIndexingSpec) {
this.numericIndexingSpec = numericIndexingSpec;
return this;
}
/**
* Specifies who can view values of this field. See [Retrieve users as a non-administrator
* ](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin) for more information.
* Note: It may take up to 24 hours for changes to this field to be reflected.
* @return value or {@code null} for none
*/
public java.lang.String getReadAccessType() {
return readAccessType;
}
/**
* Specifies who can view values of this field. See [Retrieve users as a non-administrator
* ](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin) for more information.
* Note: It may take up to 24 hours for changes to this field to be reflected.
* @param readAccessType readAccessType or {@code null} for none
*/
public SchemaFieldSpec setReadAccessType(java.lang.String readAccessType) {
this.readAccessType = readAccessType;
return this;
}
@Override
public SchemaFieldSpec set(String fieldName, Object value) {
return (SchemaFieldSpec) super.set(fieldName, value);
}
@Override
public SchemaFieldSpec clone() {
return (SchemaFieldSpec) super.clone();
}
/**
* Indexing spec for a numeric field. By default, only exact match queries will be supported for
* numeric fields. Setting the `numericIndexingSpec` allows range queries to be supported.
*/
public static final class NumericIndexingSpec extends com.google.api.client.json.GenericJson {
/**
* Maximum value of this field. This is meant to be indicative rather than enforced. Values
* outside this range will still be indexed, but search may not be as performant.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Double maxValue;
/**
* Minimum value of this field. This is meant to be indicative rather than enforced. Values
* outside this range will still be indexed, but search may not be as performant.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Double minValue;
/**
* Maximum value of this field. This is meant to be indicative rather than enforced. Values
* outside this range will still be indexed, but search may not be as performant.
* @return value or {@code null} for none
*/
public java.lang.Double getMaxValue() {
return maxValue;
}
/**
* Maximum value of this field. This is meant to be indicative rather than enforced. Values
* outside this range will still be indexed, but search may not be as performant.
* @param maxValue maxValue or {@code null} for none
*/
public NumericIndexingSpec setMaxValue(java.lang.Double maxValue) {
this.maxValue = maxValue;
return this;
}
/**
* Minimum value of this field. This is meant to be indicative rather than enforced. Values
* outside this range will still be indexed, but search may not be as performant.
* @return value or {@code null} for none
*/
public java.lang.Double getMinValue() {
return minValue;
}
/**
* Minimum value of this field. This is meant to be indicative rather than enforced. Values
* outside this range will still be indexed, but search may not be as performant.
* @param minValue minValue or {@code null} for none
*/
public NumericIndexingSpec setMinValue(java.lang.Double minValue) {
this.minValue = minValue;
return this;
}
@Override
public NumericIndexingSpec set(String fieldName, Object value) {
return (NumericIndexingSpec) super.set(fieldName, value);
}
@Override
public NumericIndexingSpec clone() {
return (NumericIndexingSpec) super.clone();
}
}
}