com.google.api.services.datamigration.v1.model.ConstraintEntity 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.datamigration.v1.model;
/**
* Constraint is not used as an independent entity, it is retrieved as part of another entity such
* as Table or View.
*
* 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 Database Migration 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 ConstraintEntity extends com.google.api.client.json.GenericJson {
/**
* Custom engine specific features.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map customFeatures;
/**
* The name of the table constraint.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/**
* Reference columns which may be associated with the constraint. For example, if the constraint
* is a FOREIGN_KEY, this represents the list of full names of referenced columns by the foreign
* key.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List referenceColumns;
/**
* Reference table which may be associated with the constraint. For example, if the constraint is
* a FOREIGN_KEY, this represents the list of full name of the referenced table by the foreign
* key.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String referenceTable;
/**
* Table columns used as part of the Constraint, for example primary key constraint should list
* the columns which constitutes the key.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List tableColumns;
/**
* Table which is associated with the constraint. In case the constraint is defined on a table,
* this field is left empty as this information is stored in parent_name. However, if constraint
* is defined on a view, this field stores the table name on which the view is defined.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String tableName;
/**
* Type of constraint, for example unique, primary key, foreign key (currently only primary key is
* supported).
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String type;
/**
* Custom engine specific features.
* @return value or {@code null} for none
*/
public java.util.Map getCustomFeatures() {
return customFeatures;
}
/**
* Custom engine specific features.
* @param customFeatures customFeatures or {@code null} for none
*/
public ConstraintEntity setCustomFeatures(java.util.Map customFeatures) {
this.customFeatures = customFeatures;
return this;
}
/**
* The name of the table constraint.
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* The name of the table constraint.
* @param name name or {@code null} for none
*/
public ConstraintEntity setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* Reference columns which may be associated with the constraint. For example, if the constraint
* is a FOREIGN_KEY, this represents the list of full names of referenced columns by the foreign
* key.
* @return value or {@code null} for none
*/
public java.util.List getReferenceColumns() {
return referenceColumns;
}
/**
* Reference columns which may be associated with the constraint. For example, if the constraint
* is a FOREIGN_KEY, this represents the list of full names of referenced columns by the foreign
* key.
* @param referenceColumns referenceColumns or {@code null} for none
*/
public ConstraintEntity setReferenceColumns(java.util.List referenceColumns) {
this.referenceColumns = referenceColumns;
return this;
}
/**
* Reference table which may be associated with the constraint. For example, if the constraint is
* a FOREIGN_KEY, this represents the list of full name of the referenced table by the foreign
* key.
* @return value or {@code null} for none
*/
public java.lang.String getReferenceTable() {
return referenceTable;
}
/**
* Reference table which may be associated with the constraint. For example, if the constraint is
* a FOREIGN_KEY, this represents the list of full name of the referenced table by the foreign
* key.
* @param referenceTable referenceTable or {@code null} for none
*/
public ConstraintEntity setReferenceTable(java.lang.String referenceTable) {
this.referenceTable = referenceTable;
return this;
}
/**
* Table columns used as part of the Constraint, for example primary key constraint should list
* the columns which constitutes the key.
* @return value or {@code null} for none
*/
public java.util.List getTableColumns() {
return tableColumns;
}
/**
* Table columns used as part of the Constraint, for example primary key constraint should list
* the columns which constitutes the key.
* @param tableColumns tableColumns or {@code null} for none
*/
public ConstraintEntity setTableColumns(java.util.List tableColumns) {
this.tableColumns = tableColumns;
return this;
}
/**
* Table which is associated with the constraint. In case the constraint is defined on a table,
* this field is left empty as this information is stored in parent_name. However, if constraint
* is defined on a view, this field stores the table name on which the view is defined.
* @return value or {@code null} for none
*/
public java.lang.String getTableName() {
return tableName;
}
/**
* Table which is associated with the constraint. In case the constraint is defined on a table,
* this field is left empty as this information is stored in parent_name. However, if constraint
* is defined on a view, this field stores the table name on which the view is defined.
* @param tableName tableName or {@code null} for none
*/
public ConstraintEntity setTableName(java.lang.String tableName) {
this.tableName = tableName;
return this;
}
/**
* Type of constraint, for example unique, primary key, foreign key (currently only primary key is
* supported).
* @return value or {@code null} for none
*/
public java.lang.String getType() {
return type;
}
/**
* Type of constraint, for example unique, primary key, foreign key (currently only primary key is
* supported).
* @param type type or {@code null} for none
*/
public ConstraintEntity setType(java.lang.String type) {
this.type = type;
return this;
}
@Override
public ConstraintEntity set(String fieldName, Object value) {
return (ConstraintEntity) super.set(fieldName, value);
}
@Override
public ConstraintEntity clone() {
return (ConstraintEntity) super.clone();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy