implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ConceptRelation)
com.clarifai.grpc.api.ConceptRelationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptRelation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptRelation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ConceptRelation.class, com.clarifai.grpc.api.ConceptRelation.Builder.class);
}
// Construct using com.clarifai.grpc.api.ConceptRelation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
if (subjectConceptBuilder_ == null) {
subjectConcept_ = null;
} else {
subjectConcept_ = null;
subjectConceptBuilder_ = null;
}
if (objectConceptBuilder_ == null) {
objectConcept_ = null;
} else {
objectConcept_ = null;
objectConceptBuilder_ = null;
}
predicate_ = "";
knowledgeGraphId_ = "";
if (visibilityBuilder_ == null) {
visibility_ = null;
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptRelation_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptRelation getDefaultInstanceForType() {
return com.clarifai.grpc.api.ConceptRelation.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptRelation build() {
com.clarifai.grpc.api.ConceptRelation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptRelation buildPartial() {
com.clarifai.grpc.api.ConceptRelation result = new com.clarifai.grpc.api.ConceptRelation(this);
result.id_ = id_;
if (subjectConceptBuilder_ == null) {
result.subjectConcept_ = subjectConcept_;
} else {
result.subjectConcept_ = subjectConceptBuilder_.build();
}
if (objectConceptBuilder_ == null) {
result.objectConcept_ = objectConcept_;
} else {
result.objectConcept_ = objectConceptBuilder_.build();
}
result.predicate_ = predicate_;
result.knowledgeGraphId_ = knowledgeGraphId_;
if (visibilityBuilder_ == null) {
result.visibility_ = visibility_;
} else {
result.visibility_ = visibilityBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.clarifai.grpc.api.ConceptRelation) {
return mergeFrom((com.clarifai.grpc.api.ConceptRelation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ConceptRelation other) {
if (other == com.clarifai.grpc.api.ConceptRelation.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.hasSubjectConcept()) {
mergeSubjectConcept(other.getSubjectConcept());
}
if (other.hasObjectConcept()) {
mergeObjectConcept(other.getObjectConcept());
}
if (!other.getPredicate().isEmpty()) {
predicate_ = other.predicate_;
onChanged();
}
if (!other.getKnowledgeGraphId().isEmpty()) {
knowledgeGraphId_ = other.knowledgeGraphId_;
onChanged();
}
if (other.hasVisibility()) {
mergeVisibility(other.getVisibility());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.clarifai.grpc.api.ConceptRelation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ConceptRelation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
*
* ID of the concept relation
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the concept relation
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the concept relation
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the concept relation
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the concept relation
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.Concept subjectConcept_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder> subjectConceptBuilder_;
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
* @return Whether the subjectConcept field is set.
*/
public boolean hasSubjectConcept() {
return subjectConceptBuilder_ != null || subjectConcept_ != null;
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
* @return The subjectConcept.
*/
public com.clarifai.grpc.api.Concept getSubjectConcept() {
if (subjectConceptBuilder_ == null) {
return subjectConcept_ == null ? com.clarifai.grpc.api.Concept.getDefaultInstance() : subjectConcept_;
} else {
return subjectConceptBuilder_.getMessage();
}
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
public Builder setSubjectConcept(com.clarifai.grpc.api.Concept value) {
if (subjectConceptBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
subjectConcept_ = value;
onChanged();
} else {
subjectConceptBuilder_.setMessage(value);
}
return this;
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
public Builder setSubjectConcept(
com.clarifai.grpc.api.Concept.Builder builderForValue) {
if (subjectConceptBuilder_ == null) {
subjectConcept_ = builderForValue.build();
onChanged();
} else {
subjectConceptBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
public Builder mergeSubjectConcept(com.clarifai.grpc.api.Concept value) {
if (subjectConceptBuilder_ == null) {
if (subjectConcept_ != null) {
subjectConcept_ =
com.clarifai.grpc.api.Concept.newBuilder(subjectConcept_).mergeFrom(value).buildPartial();
} else {
subjectConcept_ = value;
}
onChanged();
} else {
subjectConceptBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
public Builder clearSubjectConcept() {
if (subjectConceptBuilder_ == null) {
subjectConcept_ = null;
onChanged();
} else {
subjectConcept_ = null;
subjectConceptBuilder_ = null;
}
return this;
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
public com.clarifai.grpc.api.Concept.Builder getSubjectConceptBuilder() {
onChanged();
return getSubjectConceptFieldBuilder().getBuilder();
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
public com.clarifai.grpc.api.ConceptOrBuilder getSubjectConceptOrBuilder() {
if (subjectConceptBuilder_ != null) {
return subjectConceptBuilder_.getMessageOrBuilder();
} else {
return subjectConcept_ == null ?
com.clarifai.grpc.api.Concept.getDefaultInstance() : subjectConcept_;
}
}
/**
*
* The subject concept (i.e. source) of the concept relation
*
*
* .clarifai.api.Concept subject_concept = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder>
getSubjectConceptFieldBuilder() {
if (subjectConceptBuilder_ == null) {
subjectConceptBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder>(
getSubjectConcept(),
getParentForChildren(),
isClean());
subjectConcept_ = null;
}
return subjectConceptBuilder_;
}
private com.clarifai.grpc.api.Concept objectConcept_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder> objectConceptBuilder_;
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
* @return Whether the objectConcept field is set.
*/
public boolean hasObjectConcept() {
return objectConceptBuilder_ != null || objectConcept_ != null;
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
* @return The objectConcept.
*/
public com.clarifai.grpc.api.Concept getObjectConcept() {
if (objectConceptBuilder_ == null) {
return objectConcept_ == null ? com.clarifai.grpc.api.Concept.getDefaultInstance() : objectConcept_;
} else {
return objectConceptBuilder_.getMessage();
}
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
public Builder setObjectConcept(com.clarifai.grpc.api.Concept value) {
if (objectConceptBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
objectConcept_ = value;
onChanged();
} else {
objectConceptBuilder_.setMessage(value);
}
return this;
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
public Builder setObjectConcept(
com.clarifai.grpc.api.Concept.Builder builderForValue) {
if (objectConceptBuilder_ == null) {
objectConcept_ = builderForValue.build();
onChanged();
} else {
objectConceptBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
public Builder mergeObjectConcept(com.clarifai.grpc.api.Concept value) {
if (objectConceptBuilder_ == null) {
if (objectConcept_ != null) {
objectConcept_ =
com.clarifai.grpc.api.Concept.newBuilder(objectConcept_).mergeFrom(value).buildPartial();
} else {
objectConcept_ = value;
}
onChanged();
} else {
objectConceptBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
public Builder clearObjectConcept() {
if (objectConceptBuilder_ == null) {
objectConcept_ = null;
onChanged();
} else {
objectConcept_ = null;
objectConceptBuilder_ = null;
}
return this;
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
public com.clarifai.grpc.api.Concept.Builder getObjectConceptBuilder() {
onChanged();
return getObjectConceptFieldBuilder().getBuilder();
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
public com.clarifai.grpc.api.ConceptOrBuilder getObjectConceptOrBuilder() {
if (objectConceptBuilder_ != null) {
return objectConceptBuilder_.getMessageOrBuilder();
} else {
return objectConcept_ == null ?
com.clarifai.grpc.api.Concept.getDefaultInstance() : objectConcept_;
}
}
/**
*
* The subject concept (i.e. destination) of the concept relation
*
*
* .clarifai.api.Concept object_concept = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder>
getObjectConceptFieldBuilder() {
if (objectConceptBuilder_ == null) {
objectConceptBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder>(
getObjectConcept(),
getParentForChildren(),
isClean());
objectConcept_ = null;
}
return objectConceptBuilder_;
}
private java.lang.Object predicate_ = "";
/**
*
* The predicate (i.e. edge) linking the subject and the object
* Both subject_concept and object_concept are concepts.
* The predicate is the type of relationship.
* That predicate acts on the subject.
* There are three current types of predicates:
* 1) "hyponym"
* 2) "hypernym"
* 3) "synonym"
* 1) For example, 'hyponym' is a type of predicate which represents 'is_a_kind_of' relation so
* the following relationship:
* 'honey' (subject), 'hyponym' (predicate), 'food' (object)
* Can more easily be read as:
* 'honey' 'is a kind of' 'food'
* 2) The 'hypernym' relation is the opposite of 'hyponym' and when you add one of the
* relationships the opposite will automatically appear for you in queries.
* The 'hypernym' can be read as 'is a parent of' so:
* 'food' (subject), 'hypernym' (predicate), 'honey' (object)
* Can more easily be read as:
* 'food' is a parent of 'honey'
* 3) The 'synonym' relation defines two concepts that essential mean the same thing. This
* is more like a "is" relationship. So for example a 'synonym' relationship could be:
* "puppy" is "pup"
* The reverse is also true once the former is added so:
* "pup" is "puppy"
* will appear in queries as well.
*
*
* string predicate = 4;
* @return The predicate.
*/
public java.lang.String getPredicate() {
java.lang.Object ref = predicate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
predicate_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The predicate (i.e. edge) linking the subject and the object
* Both subject_concept and object_concept are concepts.
* The predicate is the type of relationship.
* That predicate acts on the subject.
* There are three current types of predicates:
* 1) "hyponym"
* 2) "hypernym"
* 3) "synonym"
* 1) For example, 'hyponym' is a type of predicate which represents 'is_a_kind_of' relation so
* the following relationship:
* 'honey' (subject), 'hyponym' (predicate), 'food' (object)
* Can more easily be read as:
* 'honey' 'is a kind of' 'food'
* 2) The 'hypernym' relation is the opposite of 'hyponym' and when you add one of the
* relationships the opposite will automatically appear for you in queries.
* The 'hypernym' can be read as 'is a parent of' so:
* 'food' (subject), 'hypernym' (predicate), 'honey' (object)
* Can more easily be read as:
* 'food' is a parent of 'honey'
* 3) The 'synonym' relation defines two concepts that essential mean the same thing. This
* is more like a "is" relationship. So for example a 'synonym' relationship could be:
* "puppy" is "pup"
* The reverse is also true once the former is added so:
* "pup" is "puppy"
* will appear in queries as well.
*
*
* string predicate = 4;
* @return The bytes for predicate.
*/
public com.google.protobuf.ByteString
getPredicateBytes() {
java.lang.Object ref = predicate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
predicate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The predicate (i.e. edge) linking the subject and the object
* Both subject_concept and object_concept are concepts.
* The predicate is the type of relationship.
* That predicate acts on the subject.
* There are three current types of predicates:
* 1) "hyponym"
* 2) "hypernym"
* 3) "synonym"
* 1) For example, 'hyponym' is a type of predicate which represents 'is_a_kind_of' relation so
* the following relationship:
* 'honey' (subject), 'hyponym' (predicate), 'food' (object)
* Can more easily be read as:
* 'honey' 'is a kind of' 'food'
* 2) The 'hypernym' relation is the opposite of 'hyponym' and when you add one of the
* relationships the opposite will automatically appear for you in queries.
* The 'hypernym' can be read as 'is a parent of' so:
* 'food' (subject), 'hypernym' (predicate), 'honey' (object)
* Can more easily be read as:
* 'food' is a parent of 'honey'
* 3) The 'synonym' relation defines two concepts that essential mean the same thing. This
* is more like a "is" relationship. So for example a 'synonym' relationship could be:
* "puppy" is "pup"
* The reverse is also true once the former is added so:
* "pup" is "puppy"
* will appear in queries as well.
*
*
* string predicate = 4;
* @param value The predicate to set.
* @return This builder for chaining.
*/
public Builder setPredicate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
predicate_ = value;
onChanged();
return this;
}
/**
*
* The predicate (i.e. edge) linking the subject and the object
* Both subject_concept and object_concept are concepts.
* The predicate is the type of relationship.
* That predicate acts on the subject.
* There are three current types of predicates:
* 1) "hyponym"
* 2) "hypernym"
* 3) "synonym"
* 1) For example, 'hyponym' is a type of predicate which represents 'is_a_kind_of' relation so
* the following relationship:
* 'honey' (subject), 'hyponym' (predicate), 'food' (object)
* Can more easily be read as:
* 'honey' 'is a kind of' 'food'
* 2) The 'hypernym' relation is the opposite of 'hyponym' and when you add one of the
* relationships the opposite will automatically appear for you in queries.
* The 'hypernym' can be read as 'is a parent of' so:
* 'food' (subject), 'hypernym' (predicate), 'honey' (object)
* Can more easily be read as:
* 'food' is a parent of 'honey'
* 3) The 'synonym' relation defines two concepts that essential mean the same thing. This
* is more like a "is" relationship. So for example a 'synonym' relationship could be:
* "puppy" is "pup"
* The reverse is also true once the former is added so:
* "pup" is "puppy"
* will appear in queries as well.
*
*
* string predicate = 4;
* @return This builder for chaining.
*/
public Builder clearPredicate() {
predicate_ = getDefaultInstance().getPredicate();
onChanged();
return this;
}
/**
*
* The predicate (i.e. edge) linking the subject and the object
* Both subject_concept and object_concept are concepts.
* The predicate is the type of relationship.
* That predicate acts on the subject.
* There are three current types of predicates:
* 1) "hyponym"
* 2) "hypernym"
* 3) "synonym"
* 1) For example, 'hyponym' is a type of predicate which represents 'is_a_kind_of' relation so
* the following relationship:
* 'honey' (subject), 'hyponym' (predicate), 'food' (object)
* Can more easily be read as:
* 'honey' 'is a kind of' 'food'
* 2) The 'hypernym' relation is the opposite of 'hyponym' and when you add one of the
* relationships the opposite will automatically appear for you in queries.
* The 'hypernym' can be read as 'is a parent of' so:
* 'food' (subject), 'hypernym' (predicate), 'honey' (object)
* Can more easily be read as:
* 'food' is a parent of 'honey'
* 3) The 'synonym' relation defines two concepts that essential mean the same thing. This
* is more like a "is" relationship. So for example a 'synonym' relationship could be:
* "puppy" is "pup"
* The reverse is also true once the former is added so:
* "pup" is "puppy"
* will appear in queries as well.
*
*
* string predicate = 4;
* @param value The bytes for predicate to set.
* @return This builder for chaining.
*/
public Builder setPredicateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
predicate_ = value;
onChanged();
return this;
}
private java.lang.Object knowledgeGraphId_ = "";
/**
*
* The knowledge graph id that this edge belongs to. If using the app's global knowledge graph
* and not a specific one then this should be the empty string "".
*
*
* string knowledge_graph_id = 5;
* @return The knowledgeGraphId.
*/
public java.lang.String getKnowledgeGraphId() {
java.lang.Object ref = knowledgeGraphId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
knowledgeGraphId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The knowledge graph id that this edge belongs to. If using the app's global knowledge graph
* and not a specific one then this should be the empty string "".
*
*
* string knowledge_graph_id = 5;
* @return The bytes for knowledgeGraphId.
*/
public com.google.protobuf.ByteString
getKnowledgeGraphIdBytes() {
java.lang.Object ref = knowledgeGraphId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
knowledgeGraphId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The knowledge graph id that this edge belongs to. If using the app's global knowledge graph
* and not a specific one then this should be the empty string "".
*
*
* string knowledge_graph_id = 5;
* @param value The knowledgeGraphId to set.
* @return This builder for chaining.
*/
public Builder setKnowledgeGraphId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
knowledgeGraphId_ = value;
onChanged();
return this;
}
/**
*
* The knowledge graph id that this edge belongs to. If using the app's global knowledge graph
* and not a specific one then this should be the empty string "".
*
*
* string knowledge_graph_id = 5;
* @return This builder for chaining.
*/
public Builder clearKnowledgeGraphId() {
knowledgeGraphId_ = getDefaultInstance().getKnowledgeGraphId();
onChanged();
return this;
}
/**
*
* The knowledge graph id that this edge belongs to. If using the app's global knowledge graph
* and not a specific one then this should be the empty string "".
*
*
* string knowledge_graph_id = 5;
* @param value The bytes for knowledgeGraphId to set.
* @return This builder for chaining.
*/
public Builder setKnowledgeGraphIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
knowledgeGraphId_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.Visibility visibility_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder> visibilityBuilder_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
* @return Whether the visibility field is set.
*/
public boolean hasVisibility() {
return visibilityBuilder_ != null || visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
* @return The visibility.
*/
public com.clarifai.grpc.api.Visibility getVisibility() {
if (visibilityBuilder_ == null) {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
} else {
return visibilityBuilder_.getMessage();
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
public Builder setVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
visibility_ = value;
onChanged();
} else {
visibilityBuilder_.setMessage(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
public Builder setVisibility(
com.clarifai.grpc.api.Visibility.Builder builderForValue) {
if (visibilityBuilder_ == null) {
visibility_ = builderForValue.build();
onChanged();
} else {
visibilityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
public Builder mergeVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (visibility_ != null) {
visibility_ =
com.clarifai.grpc.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial();
} else {
visibility_ = value;
}
onChanged();
} else {
visibilityBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
public Builder clearVisibility() {
if (visibilityBuilder_ == null) {
visibility_ = null;
onChanged();
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
public com.clarifai.grpc.api.Visibility.Builder getVisibilityBuilder() {
onChanged();
return getVisibilityFieldBuilder().getBuilder();
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
if (visibilityBuilder_ != null) {
return visibilityBuilder_.getMessageOrBuilder();
} else {
return visibility_ == null ?
com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>
getVisibilityFieldBuilder() {
if (visibilityBuilder_ == null) {
visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>(
getVisibility(),
getParentForChildren(),
isClean());
visibility_ = null;
}
return visibilityBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.ConceptRelation)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ConceptRelation)
private static final com.clarifai.grpc.api.ConceptRelation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ConceptRelation();
}
public static com.clarifai.grpc.api.ConceptRelation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConceptRelation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConceptRelation(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptRelation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}