
com.google.api.services.language.v1beta1.model.Document Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* 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/google/apis-client-generator/
* (build: 2016-07-08 17:28:43 UTC)
* on 2016-10-12 at 02:16:17 UTC
* Modify at your own risk.
*/
package com.google.api.services.language.v1beta1.model;
/**
* ################################################################ #
*
* Represents the input to API methods.
*
* 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 Google Cloud Natural Language 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 Document extends com.google.api.client.json.GenericJson {
/**
* The content of the input in string format.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String content;
/**
* The Google Cloud Storage URI where the file content is located.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String gcsContentUri;
/**
* The language of the document (if not specified, the language is automatically detected). Both
* ISO and BCP-47 language codes are accepted. **Current Language Restrictions:**
*
* * Only English, Spanish, and Japanese textual content are supported, with the following
* additional restriction: `analyzeSentiment` only supports English text. 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String language;
/**
* Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String type;
/**
* The content of the input in string format.
* @return value or {@code null} for none
*/
public java.lang.String getContent() {
return content;
}
/**
* The content of the input in string format.
* @param content content or {@code null} for none
*/
public Document setContent(java.lang.String content) {
this.content = content;
return this;
}
/**
* The Google Cloud Storage URI where the file content is located.
* @return value or {@code null} for none
*/
public java.lang.String getGcsContentUri() {
return gcsContentUri;
}
/**
* The Google Cloud Storage URI where the file content is located.
* @param gcsContentUri gcsContentUri or {@code null} for none
*/
public Document setGcsContentUri(java.lang.String gcsContentUri) {
this.gcsContentUri = gcsContentUri;
return this;
}
/**
* The language of the document (if not specified, the language is automatically detected). Both
* ISO and BCP-47 language codes are accepted. **Current Language Restrictions:**
*
* * Only English, Spanish, and Japanese textual content are supported, with the following
* additional restriction: `analyzeSentiment` only supports English text. 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.
* @return value or {@code null} for none
*/
public java.lang.String getLanguage() {
return language;
}
/**
* The language of the document (if not specified, the language is automatically detected). Both
* ISO and BCP-47 language codes are accepted. **Current Language Restrictions:**
*
* * Only English, Spanish, and Japanese textual content are supported, with the following
* additional restriction: `analyzeSentiment` only supports English text. 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.
* @param language language or {@code null} for none
*/
public Document setLanguage(java.lang.String language) {
this.language = language;
return this;
}
/**
* Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
* @return value or {@code null} for none
*/
public java.lang.String getType() {
return type;
}
/**
* Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
* @param type type or {@code null} for none
*/
public Document setType(java.lang.String type) {
this.type = type;
return this;
}
@Override
public Document set(String fieldName, Object value) {
return (Document) super.set(fieldName, value);
}
@Override
public Document clone() {
return (Document) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy