The package name to use in Java. Clobbers the java_package option
set in the protobuf. This should be used only by 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.
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.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eJavaSettings\u003c/code\u003e class provides settings for Java client libraries and is part of the \u003ccode\u003eGoogle.Api.CommonProtos\u003c/code\u003e assembly, implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows for specifying custom Java package names via the \u003ccode\u003eLibraryPackage\u003c/code\u003e property, overriding the protobuf's \u003ccode\u003ejava_package\u003c/code\u003e option, which is to be used only when language-specific settings have already been set.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceClassNames\u003c/code\u003e property allows configuring custom Java class names to be used in place of the service names from the protobuf, which is also meant to be used when language specific settings are used.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains properties for managing settings (\u003ccode\u003eCommon\u003c/code\u003e), determining the message's descriptor (\u003ccode\u003eDescriptor\u003c/code\u003e), and parsing (\u003ccode\u003eParser\u003c/code\u003e), alongside methods for calculating size, cloning, comparison, hashing, merging, and string representation.\u003c/p\u003e\n"],["\u003cp\u003eThere are also a few public integer constants for field numbers, \u003ccode\u003eCommonFieldNumber\u003c/code\u003e, \u003ccode\u003eLibraryPackageFieldNumber\u003c/code\u003e, and \u003ccode\u003eServiceClassNamesFieldNumber\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class JavaSettings (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JavaSettings)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Api.JavaSettings)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Api.JavaSettings)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Api.JavaSettings) \n\n public sealed class JavaSettings : IMessage\u003cJavaSettings\u003e, IEquatable\u003cJavaSettings\u003e, IDeepCloneable\u003cJavaSettings\u003e, IBufferMessage, IMessage\n\nSettings for Java client libraries. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e JavaSettings \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[JavaSettings](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JavaSettings), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[JavaSettings](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JavaSettings), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[JavaSettings](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JavaSettings), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Api](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### JavaSettings()\n\n public JavaSettings()\n\n### JavaSettings(JavaSettings)\n\n public JavaSettings(JavaSettings other)\n\nFields\n------\n\n### CommonFieldNumber\n\n public const int CommonFieldNumber = 3\n\nField number for the \"common\" field.\n\n### LibraryPackageFieldNumber\n\n public const int LibraryPackageFieldNumber = 1\n\nField number for the \"library_package\" field.\n\n### ServiceClassNamesFieldNumber\n\n public const int ServiceClassNamesFieldNumber = 2\n\nField number for the \"service_class_names\" field.\n\nProperties\n----------\n\n### Common\n\n public CommonLanguageSettings Common { get; set; }\n\nSome settings.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### LibraryPackage\n\n public string LibraryPackage { get; set; }\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::\n\npublishing:\njava_settings:\nlibrary_package: com.google.cloud.pubsub.v1\n\n### Parser\n\n public static MessageParser\u003cJavaSettings\u003e Parser { get; }\n\n### ServiceClassNames\n\n public MapField\u003cstring, string\u003e ServiceClassNames { get; }\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::\n\npublishing:\njava_settings:\nservice_class_names:\n\n- google.pubsub.v1.Publisher: TopicAdmin\n- google.pubsub.v1.Subscriber: SubscriptionAdmin\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public JavaSettings Clone()\n\n### Equals(JavaSettings)\n\n public bool Equals(JavaSettings other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(JavaSettings)\n\n public void MergeFrom(JavaSettings other)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]