Reference documentation and code samples for the Google API Common Protos Client class JavaSettings.
Settings for Java client libraries.
Generated from protobuf messagegoogle.api.JavaSettings
Namespace
Google \ Api
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ library_package
string
The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be usedonlyby APIs who have already set the language_settings.java.package_name" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1
Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin
The package name to use in Java. Clobbers the java_package option
set in the protobuf. This should be usedonlyby APIs
who have already set the language_settings.java.package_name" field
in gapic.yaml. API teams should use the protobuf java_package option
where possible.
Example of a YAML configuration::
publishing:
java_settings:
library_package: com.google.cloud.pubsub.v1
Returns
Type
Description
string
setLibraryPackage
The package name to use in Java. Clobbers the java_package option
set in the protobuf. This should be usedonlyby APIs
who have already set the language_settings.java.package_name" field
in gapic.yaml. API teams should use the protobuf java_package option
where possible.
Example of a YAML configuration::
publishing:
java_settings:
library_package: com.google.cloud.pubsub.v1
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getServiceClassNames
Configure the Java class name to use instead of the service's for its
corresponding generated GAPIC client. Keys are fully-qualified
service names as they appear in the protobuf (including the full
the language_settings.java.interface_names" field in gapic.yaml. API
teams should otherwise use the service name as it appears in the
protobuf.
Example of a YAML configuration::
publishing:
java_settings:
service_class_names:
Configure the Java class name to use instead of the service's for its
corresponding generated GAPIC client. Keys are fully-qualified
service names as they appear in the protobuf (including the full
the language_settings.java.interface_names" field in gapic.yaml. API
teams should otherwise use the service name as it appears in the
protobuf.
Example of a YAML configuration::
publishing:
java_settings:
service_class_names:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google API Common Protos Client - Class JavaSettings (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.JavaSettings)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.JavaSettings)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.JavaSettings)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.JavaSettings)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.JavaSettings)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.JavaSettings) \nReference documentation and code samples for the Google API Common Protos Client class JavaSettings.\n\nSettings for Java client libraries.\n\nGenerated from protobuf message `google.api.JavaSettings`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getLibraryPackage\n\nThe package name to use in Java. Clobbers the java_package option\nset in the protobuf. This should be used **only** by APIs\nwho have already set the language_settings.java.package_name\" field\nin gapic.yaml. API teams should use the protobuf java_package option\nwhere possible.\n\nExample of a YAML configuration::\npublishing:\njava_settings:\nlibrary_package: com.google.cloud.pubsub.v1\n\n### setLibraryPackage\n\nThe package name to use in Java. Clobbers the java_package option\nset in the protobuf. This should be used **only** by APIs\nwho have already set the language_settings.java.package_name\" field\nin gapic.yaml. API teams should use the protobuf java_package option\nwhere possible.\n\nExample of a YAML configuration::\npublishing:\njava_settings:\nlibrary_package: com.google.cloud.pubsub.v1\n\n### getServiceClassNames\n\nConfigure the Java class name to use instead of the service's for its\ncorresponding generated GAPIC client. Keys are fully-qualified\nservice names as they appear in the protobuf (including the full\nthe language_settings.java.interface_names\" field in gapic.yaml. API\nteams should otherwise use the service name as it appears in the\nprotobuf.\n\nExample of a YAML configuration::\npublishing:\njava_settings:\nservice_class_names:\n\n- google.pubsub.v1.Publisher: TopicAdmin\n- google.pubsub.v1.Subscriber: SubscriptionAdmin\n\n### setServiceClassNames\n\nConfigure the Java class name to use instead of the service's for its\ncorresponding generated GAPIC client. Keys are fully-qualified\nservice names as they appear in the protobuf (including the full\nthe language_settings.java.interface_names\" field in gapic.yaml. API\nteams should otherwise use the service name as it appears in the\nprotobuf.\n\nExample of a YAML configuration::\npublishing:\njava_settings:\nservice_class_names:\n\n- google.pubsub.v1.Publisher: TopicAdmin\n- google.pubsub.v1.Subscriber: SubscriptionAdmin\n\n### getCommon\n\nSome settings.\n\n### hasCommon\n\n### clearCommon\n\n### setCommon\n\nSome settings."]]