/** * * * <pre> * The content of the input in string format. * </pre> * * <code>string content = 2;</code> */ public Builder setContentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sourceCase_ = 2; source_ = value; onChanged(); return this; }
/** * * * <pre> * The content of the input in string format. * </pre> * * <code>string content = 2;</code> */ public Builder setContent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } sourceCase_ = 2; source_ = value; onChanged(); return this; } /**
/** * * * <pre> * The Google Cloud Storage URI where the file content is located. * This URI must be of the form: gs://bucket_name/object_name. For more * details, see https://cloud.google.com/storage/docs/reference-uris. * NOTE: Cloud Storage object versioning is not supported. * </pre> * * <code>string gcs_content_uri = 3;</code> */ public Builder setGcsContentUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sourceCase_ = 3; source_ = value; onChanged(); return this; }
/** * * * <pre> * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * </pre> * * <code>.google.cloud.language.v1.Document.Type type = 1;</code> */ public Builder setType(com.google.cloud.language.v1.Document.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * The content of the input in string format. * </pre> * * <code>string content = 2;</code> */ public Builder clearContent() { if (sourceCase_ == 2) { sourceCase_ = 0; source_ = null; onChanged(); } return this; } /**
/** * * * <pre> * The content of the input in string format. * </pre> * * <code>string content = 2;</code> */ public Builder setContentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sourceCase_ = 2; source_ = value; onChanged(); return this; }
/** * * * <pre> * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * </pre> * * <code>.google.cloud.language.v1.Document.Type type = 1;</code> */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * </pre> * * <code>.google.cloud.language.v1.Document.Type type = 1;</code> */ public Builder clearType() { type_ = 0; onChanged(); return this; }
public Builder clearSource() { sourceCase_ = 0; source_ = null; onChanged(); return this; }
/** * * * <pre> * The language of the document (if not specified, the language is * automatically detected). Both ISO and BCP-47 language codes are * accepted.<br> * [Language Support](/natural-language/docs/languages) * lists currently supported languages for each API method. * If the language (either specified by the caller or automatically detected) * is not supported by the called API method, an `INVALID_ARGUMENT` error * is returned. * </pre> * * <code>string language = 4;</code> */ public Builder setLanguageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); language_ = value; onChanged(); return this; }
/** * * * <pre> * The language of the document (if not specified, the language is * automatically detected). Both ISO and BCP-47 language codes are * accepted.<br> * [Language Support](/natural-language/docs/languages) * lists currently supported languages for each API method. * If the language (either specified by the caller or automatically detected) * is not supported by the called API method, an `INVALID_ARGUMENT` error * is returned. * </pre> * * <code>string language = 4;</code> */ public Builder setLanguage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } language_ = value; onChanged(); return this; } /**
/** * * * <pre> * The Google Cloud Storage URI where the file content is located. * This URI must be of the form: gs://bucket_name/object_name. For more * details, see https://cloud.google.com/storage/docs/reference-uris. * NOTE: Cloud Storage object versioning is not supported. * </pre> * * <code>string gcs_content_uri = 3;</code> */ public Builder setGcsContentUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } sourceCase_ = 3; source_ = value; onChanged(); return this; } /**
/** * * * <pre> * The Google Cloud Storage URI where the file content is located. * This URI must be of the form: gs://bucket_name/object_name. For more * details, see https://cloud.google.com/storage/docs/reference-uris. * NOTE: Cloud Storage object versioning is not supported. * </pre> * * <code>string gcs_content_uri = 3;</code> */ public Builder clearGcsContentUri() { if (sourceCase_ == 3) { sourceCase_ = 0; source_ = null; onChanged(); } return this; } /**
/** * * * <pre> * The language of the document (if not specified, the language is * automatically detected). Both ISO and BCP-47 language codes are * accepted.<br> * [Language Support](/natural-language/docs/languages) * lists currently supported languages for each API method. * If the language (either specified by the caller or automatically detected) * is not supported by the called API method, an `INVALID_ARGUMENT` error * is returned. * </pre> * * <code>string language = 4;</code> */ public Builder clearLanguage() { language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /**
/** * * * <pre> * The content of the input in string format. * </pre> * * <code>string content = 2;</code> */ public Builder clearContent() { if (sourceCase_ == 2) { sourceCase_ = 0; source_ = null; onChanged(); } return this; } /**
/** * * * <pre> * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * </pre> * * <code>.google.cloud.language.v1.Document.Type type = 1;</code> */ public Builder setType(com.google.cloud.language.v1.Document.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * </pre> * * <code>.google.cloud.language.v1.Document.Type type = 1;</code> */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * </pre> * * <code>.google.cloud.language.v1.Document.Type type = 1;</code> */ public Builder clearType() { type_ = 0; onChanged(); return this; }
public Builder clearSource() { sourceCase_ = 0; source_ = null; onChanged(); return this; }