com.google.cloud.vertexai.api.Citation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-vertexai-v1 Show documentation
Show all versions of proto-google-cloud-vertexai-v1 Show documentation
Proto library for google-cloud-vertexai
/*
* Copyright 2024 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/vertexai/v1/content.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.vertexai.api;
/**
*
*
*
* Source attributions for content.
*
*
* Protobuf type {@code google.cloud.vertexai.v1.Citation}
*/
public final class Citation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Citation)
CitationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Citation.newBuilder() to construct.
private Citation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Citation() {
uri_ = "";
title_ = "";
license_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Citation();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.vertexai.api.ContentProto
.internal_static_google_cloud_vertexai_v1_Citation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.vertexai.api.ContentProto
.internal_static_google_cloud_vertexai_v1_Citation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.vertexai.api.Citation.class,
com.google.cloud.vertexai.api.Citation.Builder.class);
}
private int bitField0_;
public static final int START_INDEX_FIELD_NUMBER = 1;
private int startIndex_ = 0;
/**
*
*
*
* Output only. Start index into the content.
*
*
* int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The startIndex.
*/
@java.lang.Override
public int getStartIndex() {
return startIndex_;
}
public static final int END_INDEX_FIELD_NUMBER = 2;
private int endIndex_ = 0;
/**
*
*
*
* Output only. End index into the content.
*
*
* int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The endIndex.
*/
@java.lang.Override
public int getEndIndex() {
return endIndex_;
}
public static final int URI_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object uri_ = "";
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The uri.
*/
@java.lang.Override
public java.lang.String getUri() {
java.lang.Object ref = uri_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uri_ = s;
return s;
}
}
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for uri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TITLE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
}
}
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LICENSE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object license_ = "";
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The license.
*/
@java.lang.Override
public java.lang.String getLicense() {
java.lang.Object ref = license_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
license_ = s;
return s;
}
}
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for license.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLicenseBytes() {
java.lang.Object ref = license_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
license_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PUBLICATION_DATE_FIELD_NUMBER = 6;
private com.google.type.Date publicationDate_;
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the publicationDate field is set.
*/
@java.lang.Override
public boolean hasPublicationDate() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The publicationDate.
*/
@java.lang.Override
public com.google.type.Date getPublicationDate() {
return publicationDate_ == null ? com.google.type.Date.getDefaultInstance() : publicationDate_;
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.type.DateOrBuilder getPublicationDateOrBuilder() {
return publicationDate_ == null ? com.google.type.Date.getDefaultInstance() : publicationDate_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (startIndex_ != 0) {
output.writeInt32(1, startIndex_);
}
if (endIndex_ != 0) {
output.writeInt32(2, endIndex_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(license_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, license_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getPublicationDate());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (startIndex_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, startIndex_);
}
if (endIndex_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, endIndex_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(license_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, license_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPublicationDate());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.vertexai.api.Citation)) {
return super.equals(obj);
}
com.google.cloud.vertexai.api.Citation other = (com.google.cloud.vertexai.api.Citation) obj;
if (getStartIndex() != other.getStartIndex()) return false;
if (getEndIndex() != other.getEndIndex()) return false;
if (!getUri().equals(other.getUri())) return false;
if (!getTitle().equals(other.getTitle())) return false;
if (!getLicense().equals(other.getLicense())) return false;
if (hasPublicationDate() != other.hasPublicationDate()) return false;
if (hasPublicationDate()) {
if (!getPublicationDate().equals(other.getPublicationDate())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + START_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getStartIndex();
hash = (37 * hash) + END_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getEndIndex();
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + LICENSE_FIELD_NUMBER;
hash = (53 * hash) + getLicense().hashCode();
if (hasPublicationDate()) {
hash = (37 * hash) + PUBLICATION_DATE_FIELD_NUMBER;
hash = (53 * hash) + getPublicationDate().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.vertexai.api.Citation parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.vertexai.api.Citation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.vertexai.api.Citation parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.vertexai.api.Citation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.vertexai.api.Citation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Source attributions for content.
*
*
* Protobuf type {@code google.cloud.vertexai.v1.Citation}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Citation)
com.google.cloud.vertexai.api.CitationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.vertexai.api.ContentProto
.internal_static_google_cloud_vertexai_v1_Citation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.vertexai.api.ContentProto
.internal_static_google_cloud_vertexai_v1_Citation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.vertexai.api.Citation.class,
com.google.cloud.vertexai.api.Citation.Builder.class);
}
// Construct using com.google.cloud.vertexai.api.Citation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPublicationDateFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
startIndex_ = 0;
endIndex_ = 0;
uri_ = "";
title_ = "";
license_ = "";
publicationDate_ = null;
if (publicationDateBuilder_ != null) {
publicationDateBuilder_.dispose();
publicationDateBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.vertexai.api.ContentProto
.internal_static_google_cloud_vertexai_v1_Citation_descriptor;
}
@java.lang.Override
public com.google.cloud.vertexai.api.Citation getDefaultInstanceForType() {
return com.google.cloud.vertexai.api.Citation.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.vertexai.api.Citation build() {
com.google.cloud.vertexai.api.Citation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.vertexai.api.Citation buildPartial() {
com.google.cloud.vertexai.api.Citation result =
new com.google.cloud.vertexai.api.Citation(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.vertexai.api.Citation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.startIndex_ = startIndex_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.endIndex_ = endIndex_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.uri_ = uri_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.license_ = license_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.publicationDate_ =
publicationDateBuilder_ == null ? publicationDate_ : publicationDateBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.google.cloud.vertexai.api.Citation) {
return mergeFrom((com.google.cloud.vertexai.api.Citation) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.vertexai.api.Citation other) {
if (other == com.google.cloud.vertexai.api.Citation.getDefaultInstance()) return this;
if (other.getStartIndex() != 0) {
setStartIndex(other.getStartIndex());
}
if (other.getEndIndex() != 0) {
setEndIndex(other.getEndIndex());
}
if (!other.getUri().isEmpty()) {
uri_ = other.uri_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getLicense().isEmpty()) {
license_ = other.license_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasPublicationDate()) {
mergePublicationDate(other.getPublicationDate());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
startIndex_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
endIndex_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
uri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
license_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
input.readMessage(getPublicationDateFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int startIndex_;
/**
*
*
*
* Output only. Start index into the content.
*
*
* int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The startIndex.
*/
@java.lang.Override
public int getStartIndex() {
return startIndex_;
}
/**
*
*
*
* Output only. Start index into the content.
*
*
* int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The startIndex to set.
* @return This builder for chaining.
*/
public Builder setStartIndex(int value) {
startIndex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. Start index into the content.
*
*
* int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearStartIndex() {
bitField0_ = (bitField0_ & ~0x00000001);
startIndex_ = 0;
onChanged();
return this;
}
private int endIndex_;
/**
*
*
*
* Output only. End index into the content.
*
*
* int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The endIndex.
*/
@java.lang.Override
public int getEndIndex() {
return endIndex_;
}
/**
*
*
*
* Output only. End index into the content.
*
*
* int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The endIndex to set.
* @return This builder for chaining.
*/
public Builder setEndIndex(int value) {
endIndex_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. End index into the content.
*
*
* int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearEndIndex() {
bitField0_ = (bitField0_ & ~0x00000002);
endIndex_ = 0;
onChanged();
return this;
}
private java.lang.Object uri_ = "";
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The uri.
*/
public java.lang.String getUri() {
java.lang.Object ref = uri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for uri.
*/
public com.google.protobuf.ByteString getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The uri to set.
* @return This builder for chaining.
*/
public Builder setUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uri_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Output only. Url reference of the attribution.
*
*
* string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for uri to set.
* @return This builder for chaining.
*/
public Builder setUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uri_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object title_ = "";
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for title.
*/
public com.google.protobuf.ByteString getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Output only. Title of the attribution.
*
*
* string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object license_ = "";
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The license.
*/
public java.lang.String getLicense() {
java.lang.Object ref = license_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
license_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for license.
*/
public com.google.protobuf.ByteString getLicenseBytes() {
java.lang.Object ref = license_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
license_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The license to set.
* @return This builder for chaining.
*/
public Builder setLicense(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
license_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearLicense() {
license_ = getDefaultInstance().getLicense();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Output only. License of the attribution.
*
*
* string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for license to set.
* @return This builder for chaining.
*/
public Builder setLicenseBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
license_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.type.Date publicationDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>
publicationDateBuilder_;
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the publicationDate field is set.
*/
public boolean hasPublicationDate() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The publicationDate.
*/
public com.google.type.Date getPublicationDate() {
if (publicationDateBuilder_ == null) {
return publicationDate_ == null
? com.google.type.Date.getDefaultInstance()
: publicationDate_;
} else {
return publicationDateBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setPublicationDate(com.google.type.Date value) {
if (publicationDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
publicationDate_ = value;
} else {
publicationDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setPublicationDate(com.google.type.Date.Builder builderForValue) {
if (publicationDateBuilder_ == null) {
publicationDate_ = builderForValue.build();
} else {
publicationDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergePublicationDate(com.google.type.Date value) {
if (publicationDateBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& publicationDate_ != null
&& publicationDate_ != com.google.type.Date.getDefaultInstance()) {
getPublicationDateBuilder().mergeFrom(value);
} else {
publicationDate_ = value;
}
} else {
publicationDateBuilder_.mergeFrom(value);
}
if (publicationDate_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearPublicationDate() {
bitField0_ = (bitField0_ & ~0x00000020);
publicationDate_ = null;
if (publicationDateBuilder_ != null) {
publicationDateBuilder_.dispose();
publicationDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.type.Date.Builder getPublicationDateBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getPublicationDateFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.type.DateOrBuilder getPublicationDateOrBuilder() {
if (publicationDateBuilder_ != null) {
return publicationDateBuilder_.getMessageOrBuilder();
} else {
return publicationDate_ == null
? com.google.type.Date.getDefaultInstance()
: publicationDate_;
}
}
/**
*
*
*
* Output only. Publication date of the attribution.
*
*
* .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>
getPublicationDateFieldBuilder() {
if (publicationDateBuilder_ == null) {
publicationDateBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>(
getPublicationDate(), getParentForChildren(), isClean());
publicationDate_ = null;
}
return publicationDateBuilder_;
}
@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:google.cloud.vertexai.v1.Citation)
}
// @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Citation)
private static final com.google.cloud.vertexai.api.Citation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Citation();
}
public static com.google.cloud.vertexai.api.Citation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Citation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.google.cloud.vertexai.api.Citation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}