commonMain.protokt.v1.google.api.client.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-common-protos-lite Show documentation
Show all versions of proto-google-common-protos-lite Show documentation
Protobuf compiler and runtime for Kotlin
The newest version!
// Generated by protokt version 1.0.0-beta.2. Do not modify.
// Source: google/api/client.proto
@file:Suppress("DEPRECATION")
package protokt.v1.google.api
import protokt.v1.AbstractDeserializer
import protokt.v1.AbstractMessage
import protokt.v1.BuilderDsl
import protokt.v1.Collections.copyList
import protokt.v1.Collections.copyMap
import protokt.v1.Collections.unmodifiableList
import protokt.v1.Collections.unmodifiableMap
import protokt.v1.Enum
import protokt.v1.EnumReader
import protokt.v1.GeneratedMessage
import protokt.v1.GeneratedProperty
import protokt.v1.Reader
import protokt.v1.SizeCodecs.sizeOf
import protokt.v1.UnknownFieldSet
import protokt.v1.Writer
import protokt.v1.google.protobuf.Duration
import kotlin.Any
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Float
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.MutableList
import kotlin.collections.MutableMap
import kotlin.jvm.JvmStatic
/**
* Required information for every language.
*/
public sealed class ClientLibraryOrganization(
override val `value`: Int,
override val name: String
) : Enum() {
/**
* Link to automatically generated reference documentation. Example:
* https://cloud.google.com/nodejs/docs/reference/asset/latest
*/
public object CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED : ClientLibraryOrganization(
0,
"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"
)
/**
* The destination where API teams want this client library to be published.
*/
public object CLOUD : ClientLibraryOrganization(1, "CLOUD")
public object ADS : ClientLibraryOrganization(2, "ADS")
public object PHOTOS : ClientLibraryOrganization(3, "PHOTOS")
public object STREET_VIEW : ClientLibraryOrganization(4, "STREET_VIEW")
public object SHOPPING : ClientLibraryOrganization(5, "SHOPPING")
public object GEO : ClientLibraryOrganization(6, "GEO")
public object GENERATIVE_AI : ClientLibraryOrganization(7, "GENERATIVE_AI")
public class UNRECOGNIZED(
`value`: Int
) : ClientLibraryOrganization(value, "UNRECOGNIZED")
public companion object Deserializer : EnumReader {
override fun from(`value`: Int): ClientLibraryOrganization =
when (value) {
0 -> CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED
1 -> CLOUD
2 -> ADS
3 -> PHOTOS
4 -> STREET_VIEW
5 -> SHOPPING
6 -> GEO
7 -> GENERATIVE_AI
else -> UNRECOGNIZED(value)
}
}
}
/**
* Details about how and where to publish client libraries.
*/
public sealed class ClientLibraryDestination(
override val `value`: Int,
override val name: String
) : Enum() {
/**
* Version of the API to apply these settings to. This is the full protobuf package for the API,
* ending in the version element. Examples: "google.cloud.speech.v1" and
* "google.spanner.admin.database.v1".
*/
public object CLIENT_LIBRARY_DESTINATION_UNSPECIFIED : ClientLibraryDestination(
0,
"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"
)
/**
* Launch stage of this version of the API.
*/
public object GITHUB : ClientLibraryDestination(10, "GITHUB")
/**
* When using transport=rest, the client request will encode enums as numbers rather than strings.
*/
public object PACKAGE_MANAGER : ClientLibraryDestination(20, "PACKAGE_MANAGER")
public class UNRECOGNIZED(
`value`: Int
) : ClientLibraryDestination(value, "UNRECOGNIZED")
public companion object Deserializer : EnumReader {
override fun from(`value`: Int): ClientLibraryDestination =
when (value) {
0 -> CLIENT_LIBRARY_DESTINATION_UNSPECIFIED
10 -> GITHUB
20 -> PACKAGE_MANAGER
else -> UNRECOGNIZED(value)
}
}
}
/**
* Required information for every language.
*/
@GeneratedMessage("google.api.CommonLanguageSettings")
public class CommonLanguageSettings private constructor(
/**
* Link to automatically generated reference documentation. Example:
* https://cloud.google.com/nodejs/docs/reference/asset/latest
*/
@GeneratedProperty(1)
@Deprecated("deprecated in proto")
public val referenceDocsUri: String,
/**
* The destination where API teams want this client library to be published.
*/
@GeneratedProperty(2)
public val destinations: List,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (referenceDocsUri.isNotEmpty()) {
result += sizeOf(10u) + sizeOf(referenceDocsUri)
}
if (destinations.isNotEmpty()) {
result += sizeOf(18u) + destinations.sumOf { sizeOf(it) }.let { it + sizeOf(it.toUInt()) }
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (referenceDocsUri.isNotEmpty()) {
writer.writeTag(10u).write(referenceDocsUri)
}
if (destinations.isNotEmpty()) {
writer.writeTag(18u).writeUInt32(destinations.sumOf { sizeOf(it) }.toUInt())
destinations.forEach { writer.write(it) }
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is CommonLanguageSettings &&
other.referenceDocsUri == referenceDocsUri &&
other.destinations == destinations &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + referenceDocsUri.hashCode()
result = 31 * result + destinations.hashCode()
return result
}
override fun toString(): String =
"CommonLanguageSettings(" +
"referenceDocsUri=$referenceDocsUri, " +
"destinations=$destinations" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): CommonLanguageSettings =
Builder().apply {
referenceDocsUri = [email protected]
destinations = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
@Deprecated("deprecated in proto")
public var referenceDocsUri: String = ""
public var destinations: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): CommonLanguageSettings =
CommonLanguageSettings(
referenceDocsUri,
unmodifiableList(destinations),
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): CommonLanguageSettings {
var referenceDocsUri = ""
var destinations: MutableList? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return CommonLanguageSettings(
referenceDocsUri,
unmodifiableList(destinations),
UnknownFieldSet.from(unknownFields)
)
10u -> referenceDocsUri = reader.readString()
16u ->
destinations =
(destinations ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readEnum(ClientLibraryDestination))
}
}
18u ->
destinations =
(destinations ?: mutableListOf()).apply {
reader.readRepeated(true) {
add(reader.readEnum(ClientLibraryDestination))
}
}
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): CommonLanguageSettings = Builder().apply(dsl).build()
}
}
/**
* Details about how and where to publish client libraries.
*/
@GeneratedMessage("google.api.ClientLibrarySettings")
public class ClientLibrarySettings private constructor(
/**
* Version of the API to apply these settings to. This is the full protobuf package for the API,
* ending in the version element. Examples: "google.cloud.speech.v1" and
* "google.spanner.admin.database.v1".
*/
@GeneratedProperty(1)
public val version: String,
/**
* Launch stage of this version of the API.
*/
@GeneratedProperty(2)
public val launchStage: LaunchStage,
/**
* When using transport=rest, the client request will encode enums as numbers rather than strings.
*/
@GeneratedProperty(3)
public val restNumericEnums: Boolean,
/**
* Settings for legacy Java features, supported in the Service YAML.
*/
@GeneratedProperty(21)
public val javaSettings: JavaSettings?,
/**
* Settings for C++ client libraries.
*/
@GeneratedProperty(22)
public val cppSettings: CppSettings?,
/**
* Settings for PHP client libraries.
*/
@GeneratedProperty(23)
public val phpSettings: PhpSettings?,
/**
* Settings for Python client libraries.
*/
@GeneratedProperty(24)
public val pythonSettings: PythonSettings?,
/**
* Settings for Node client libraries.
*/
@GeneratedProperty(25)
public val nodeSettings: NodeSettings?,
/**
* Settings for .NET client libraries.
*/
@GeneratedProperty(26)
public val dotnetSettings: DotnetSettings?,
/**
* Settings for Ruby client libraries.
*/
@GeneratedProperty(27)
public val rubySettings: RubySettings?,
/**
* Settings for Go client libraries.
*/
@GeneratedProperty(28)
public val goSettings: GoSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (version.isNotEmpty()) {
result += sizeOf(10u) + sizeOf(version)
}
if (launchStage.value != 0) {
result += sizeOf(16u) + sizeOf(launchStage)
}
if (restNumericEnums) {
result += sizeOf(24u) + 1
}
if (javaSettings != null) {
result += sizeOf(170u) + sizeOf(javaSettings)
}
if (cppSettings != null) {
result += sizeOf(178u) + sizeOf(cppSettings)
}
if (phpSettings != null) {
result += sizeOf(186u) + sizeOf(phpSettings)
}
if (pythonSettings != null) {
result += sizeOf(194u) + sizeOf(pythonSettings)
}
if (nodeSettings != null) {
result += sizeOf(202u) + sizeOf(nodeSettings)
}
if (dotnetSettings != null) {
result += sizeOf(210u) + sizeOf(dotnetSettings)
}
if (rubySettings != null) {
result += sizeOf(218u) + sizeOf(rubySettings)
}
if (goSettings != null) {
result += sizeOf(226u) + sizeOf(goSettings)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (version.isNotEmpty()) {
writer.writeTag(10u).write(version)
}
if (launchStage.value != 0) {
writer.writeTag(16u).write(launchStage)
}
if (restNumericEnums) {
writer.writeTag(24u).write(restNumericEnums)
}
if (javaSettings != null) {
writer.writeTag(170u).write(javaSettings)
}
if (cppSettings != null) {
writer.writeTag(178u).write(cppSettings)
}
if (phpSettings != null) {
writer.writeTag(186u).write(phpSettings)
}
if (pythonSettings != null) {
writer.writeTag(194u).write(pythonSettings)
}
if (nodeSettings != null) {
writer.writeTag(202u).write(nodeSettings)
}
if (dotnetSettings != null) {
writer.writeTag(210u).write(dotnetSettings)
}
if (rubySettings != null) {
writer.writeTag(218u).write(rubySettings)
}
if (goSettings != null) {
writer.writeTag(226u).write(goSettings)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is ClientLibrarySettings &&
other.version == version &&
other.launchStage == launchStage &&
other.restNumericEnums == restNumericEnums &&
other.javaSettings == javaSettings &&
other.cppSettings == cppSettings &&
other.phpSettings == phpSettings &&
other.pythonSettings == pythonSettings &&
other.nodeSettings == nodeSettings &&
other.dotnetSettings == dotnetSettings &&
other.rubySettings == rubySettings &&
other.goSettings == goSettings &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + version.hashCode()
result = 31 * result + launchStage.hashCode()
result = 31 * result + restNumericEnums.hashCode()
result = 31 * result + javaSettings.hashCode()
result = 31 * result + cppSettings.hashCode()
result = 31 * result + phpSettings.hashCode()
result = 31 * result + pythonSettings.hashCode()
result = 31 * result + nodeSettings.hashCode()
result = 31 * result + dotnetSettings.hashCode()
result = 31 * result + rubySettings.hashCode()
result = 31 * result + goSettings.hashCode()
return result
}
override fun toString(): String =
"ClientLibrarySettings(" +
"version=$version, " +
"launchStage=$launchStage, " +
"restNumericEnums=$restNumericEnums, " +
"javaSettings=$javaSettings, " +
"cppSettings=$cppSettings, " +
"phpSettings=$phpSettings, " +
"pythonSettings=$pythonSettings, " +
"nodeSettings=$nodeSettings, " +
"dotnetSettings=$dotnetSettings, " +
"rubySettings=$rubySettings, " +
"goSettings=$goSettings" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): ClientLibrarySettings =
Builder().apply {
version = [email protected]
launchStage = [email protected]
restNumericEnums = [email protected]
javaSettings = [email protected]
cppSettings = [email protected]
phpSettings = [email protected]
pythonSettings = [email protected]
nodeSettings = [email protected]
dotnetSettings = [email protected]
rubySettings = [email protected]
goSettings = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var version: String = ""
public var launchStage: LaunchStage = LaunchStage.from(0)
public var restNumericEnums: Boolean = false
public var javaSettings: JavaSettings? = null
public var cppSettings: CppSettings? = null
public var phpSettings: PhpSettings? = null
public var pythonSettings: PythonSettings? = null
public var nodeSettings: NodeSettings? = null
public var dotnetSettings: DotnetSettings? = null
public var rubySettings: RubySettings? = null
public var goSettings: GoSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): ClientLibrarySettings =
ClientLibrarySettings(
version,
launchStage,
restNumericEnums,
javaSettings,
cppSettings,
phpSettings,
pythonSettings,
nodeSettings,
dotnetSettings,
rubySettings,
goSettings,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): ClientLibrarySettings {
var version = ""
var launchStage = LaunchStage.from(0)
var restNumericEnums = false
var javaSettings: JavaSettings? = null
var cppSettings: CppSettings? = null
var phpSettings: PhpSettings? = null
var pythonSettings: PythonSettings? = null
var nodeSettings: NodeSettings? = null
var dotnetSettings: DotnetSettings? = null
var rubySettings: RubySettings? = null
var goSettings: GoSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return ClientLibrarySettings(
version,
launchStage,
restNumericEnums,
javaSettings,
cppSettings,
phpSettings,
pythonSettings,
nodeSettings,
dotnetSettings,
rubySettings,
goSettings,
UnknownFieldSet.from(unknownFields)
)
10u -> version = reader.readString()
16u -> launchStage = reader.readEnum(LaunchStage)
24u -> restNumericEnums = reader.readBool()
170u -> javaSettings = reader.readMessage(JavaSettings)
178u -> cppSettings = reader.readMessage(CppSettings)
186u -> phpSettings = reader.readMessage(PhpSettings)
194u -> pythonSettings = reader.readMessage(PythonSettings)
202u -> nodeSettings = reader.readMessage(NodeSettings)
210u -> dotnetSettings = reader.readMessage(DotnetSettings)
218u -> rubySettings = reader.readMessage(RubySettings)
226u -> goSettings = reader.readMessage(GoSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): ClientLibrarySettings = Builder().apply(dsl).build()
}
}
/**
* This message configures the settings for publishing [Google Cloud Client
* libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service
* config.
*/
@GeneratedMessage("google.api.Publishing")
public class Publishing private constructor(
/**
* A list of API method settings, e.g. the behavior for methods that use the long-running
* operation pattern.
*/
@GeneratedProperty(2)
public val methodSettings: List,
/**
* Link to a *public* URI where users can report issues. Example:
* https://issuetracker.google.com/issues/new?component=190865&template=1161103
*/
@GeneratedProperty(101)
public val newIssueUri: String,
/**
* Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview
*/
@GeneratedProperty(102)
public val documentationUri: String,
/**
* Used as a tracking tag when collecting data about the APIs developer relations artifacts like
* docs, packages delivered to package managers, etc. Example: "speech".
*/
@GeneratedProperty(103)
public val apiShortName: String,
/**
* GitHub label to apply to issues and pull requests opened for this API.
*/
@GeneratedProperty(104)
public val githubLabel: String,
/**
* GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for
* the client libraries for this API.
*/
@GeneratedProperty(105)
public val codeownerGithubTeams: List,
/**
* A prefix used in sample code when demarking regions to be included in documentation.
*/
@GeneratedProperty(106)
public val docTagPrefix: String,
/**
* For whom the client library is being published.
*/
@GeneratedProperty(107)
public val organization: ClientLibraryOrganization,
/**
* Client library settings. If the same version string appears multiple times in this list, then
* the last one wins. Settings from earlier settings with the same version string are discarded.
*/
@GeneratedProperty(109)
public val librarySettings: List,
/**
* Optional link to proto reference documentation. Example:
* https://cloud.google.com/pubsub/lite/docs/reference/rpc
*/
@GeneratedProperty(110)
public val protoReferenceDocumentationUri: String,
/**
* Optional link to REST reference documentation. Example:
* https://cloud.google.com/pubsub/lite/docs/reference/rest
*/
@GeneratedProperty(111)
public val restReferenceDocumentationUri: String,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (methodSettings.isNotEmpty()) {
result += (sizeOf(18u) * methodSettings.size) + methodSettings.sumOf { sizeOf(it) }
}
if (newIssueUri.isNotEmpty()) {
result += sizeOf(810u) + sizeOf(newIssueUri)
}
if (documentationUri.isNotEmpty()) {
result += sizeOf(818u) + sizeOf(documentationUri)
}
if (apiShortName.isNotEmpty()) {
result += sizeOf(826u) + sizeOf(apiShortName)
}
if (githubLabel.isNotEmpty()) {
result += sizeOf(834u) + sizeOf(githubLabel)
}
if (codeownerGithubTeams.isNotEmpty()) {
result += (sizeOf(842u) * codeownerGithubTeams.size) +
codeownerGithubTeams.sumOf { sizeOf(it) }
}
if (docTagPrefix.isNotEmpty()) {
result += sizeOf(850u) + sizeOf(docTagPrefix)
}
if (organization.value != 0) {
result += sizeOf(856u) + sizeOf(organization)
}
if (librarySettings.isNotEmpty()) {
result += (sizeOf(874u) * librarySettings.size) + librarySettings.sumOf { sizeOf(it) }
}
if (protoReferenceDocumentationUri.isNotEmpty()) {
result += sizeOf(882u) + sizeOf(protoReferenceDocumentationUri)
}
if (restReferenceDocumentationUri.isNotEmpty()) {
result += sizeOf(890u) + sizeOf(restReferenceDocumentationUri)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
methodSettings.forEach { writer.writeTag(18u).write(it) }
if (newIssueUri.isNotEmpty()) {
writer.writeTag(810u).write(newIssueUri)
}
if (documentationUri.isNotEmpty()) {
writer.writeTag(818u).write(documentationUri)
}
if (apiShortName.isNotEmpty()) {
writer.writeTag(826u).write(apiShortName)
}
if (githubLabel.isNotEmpty()) {
writer.writeTag(834u).write(githubLabel)
}
codeownerGithubTeams.forEach { writer.writeTag(842u).write(it) }
if (docTagPrefix.isNotEmpty()) {
writer.writeTag(850u).write(docTagPrefix)
}
if (organization.value != 0) {
writer.writeTag(856u).write(organization)
}
librarySettings.forEach { writer.writeTag(874u).write(it) }
if (protoReferenceDocumentationUri.isNotEmpty()) {
writer.writeTag(882u).write(protoReferenceDocumentationUri)
}
if (restReferenceDocumentationUri.isNotEmpty()) {
writer.writeTag(890u).write(restReferenceDocumentationUri)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is Publishing &&
other.methodSettings == methodSettings &&
other.newIssueUri == newIssueUri &&
other.documentationUri == documentationUri &&
other.apiShortName == apiShortName &&
other.githubLabel == githubLabel &&
other.codeownerGithubTeams == codeownerGithubTeams &&
other.docTagPrefix == docTagPrefix &&
other.organization == organization &&
other.librarySettings == librarySettings &&
other.protoReferenceDocumentationUri == protoReferenceDocumentationUri &&
other.restReferenceDocumentationUri == restReferenceDocumentationUri &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + methodSettings.hashCode()
result = 31 * result + newIssueUri.hashCode()
result = 31 * result + documentationUri.hashCode()
result = 31 * result + apiShortName.hashCode()
result = 31 * result + githubLabel.hashCode()
result = 31 * result + codeownerGithubTeams.hashCode()
result = 31 * result + docTagPrefix.hashCode()
result = 31 * result + organization.hashCode()
result = 31 * result + librarySettings.hashCode()
result = 31 * result + protoReferenceDocumentationUri.hashCode()
result = 31 * result + restReferenceDocumentationUri.hashCode()
return result
}
override fun toString(): String =
"Publishing(" +
"methodSettings=$methodSettings, " +
"newIssueUri=$newIssueUri, " +
"documentationUri=$documentationUri, " +
"apiShortName=$apiShortName, " +
"githubLabel=$githubLabel, " +
"codeownerGithubTeams=$codeownerGithubTeams, " +
"docTagPrefix=$docTagPrefix, " +
"organization=$organization, " +
"librarySettings=$librarySettings, " +
"protoReferenceDocumentationUri=$protoReferenceDocumentationUri, " +
"restReferenceDocumentationUri=$restReferenceDocumentationUri" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): Publishing =
Builder().apply {
methodSettings = [email protected]
newIssueUri = [email protected]
documentationUri = [email protected]
apiShortName = [email protected]
githubLabel = [email protected]
codeownerGithubTeams = [email protected]
docTagPrefix = [email protected]
organization = [email protected]
librarySettings = [email protected]
protoReferenceDocumentationUri = [email protected]
restReferenceDocumentationUri = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var methodSettings: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var newIssueUri: String = ""
public var documentationUri: String = ""
public var apiShortName: String = ""
public var githubLabel: String = ""
public var codeownerGithubTeams: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var docTagPrefix: String = ""
public var organization: ClientLibraryOrganization = ClientLibraryOrganization.from(0)
public var librarySettings: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var protoReferenceDocumentationUri: String = ""
public var restReferenceDocumentationUri: String = ""
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): Publishing =
Publishing(
unmodifiableList(methodSettings),
newIssueUri,
documentationUri,
apiShortName,
githubLabel,
unmodifiableList(codeownerGithubTeams),
docTagPrefix,
organization,
unmodifiableList(librarySettings),
protoReferenceDocumentationUri,
restReferenceDocumentationUri,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): Publishing {
var methodSettings: MutableList? = null
var newIssueUri = ""
var documentationUri = ""
var apiShortName = ""
var githubLabel = ""
var codeownerGithubTeams: MutableList? = null
var docTagPrefix = ""
var organization = ClientLibraryOrganization.from(0)
var librarySettings: MutableList? = null
var protoReferenceDocumentationUri = ""
var restReferenceDocumentationUri = ""
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return Publishing(
unmodifiableList(methodSettings),
newIssueUri,
documentationUri,
apiShortName,
githubLabel,
unmodifiableList(codeownerGithubTeams),
docTagPrefix,
organization,
unmodifiableList(librarySettings),
protoReferenceDocumentationUri,
restReferenceDocumentationUri,
UnknownFieldSet.from(unknownFields)
)
18u ->
methodSettings =
(methodSettings ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readMessage(MethodSettings))
}
}
810u -> newIssueUri = reader.readString()
818u -> documentationUri = reader.readString()
826u -> apiShortName = reader.readString()
834u -> githubLabel = reader.readString()
842u ->
codeownerGithubTeams =
(codeownerGithubTeams ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readString())
}
}
850u -> docTagPrefix = reader.readString()
856u -> organization = reader.readEnum(ClientLibraryOrganization)
874u ->
librarySettings =
(librarySettings ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readMessage(ClientLibrarySettings))
}
}
882u -> protoReferenceDocumentationUri = reader.readString()
890u -> restReferenceDocumentationUri = reader.readString()
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): Publishing = Builder().apply(dsl).build()
}
}
/**
* Settings for Java client libraries.
*/
@GeneratedMessage("google.api.JavaSettings")
public class JavaSettings private constructor(
/**
* 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.
*
* Example of a YAML configuration::
*
* publishing: java_settings: library_package: com.google.cloud.pubsub.v1
*/
@GeneratedProperty(1)
public val libraryPackage: String,
/**
* 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
*/
@GeneratedProperty(2)
public val serviceClassNames: Map,
/**
* Some settings.
*/
@GeneratedProperty(3)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (libraryPackage.isNotEmpty()) {
result += sizeOf(10u) + sizeOf(libraryPackage)
}
if (serviceClassNames.isNotEmpty()) {
result +=
sizeOf(serviceClassNames, 18u) { k, v ->
ServiceClassNamesEntry.entrySize(k, v)
}
}
if (common != null) {
result += sizeOf(26u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (libraryPackage.isNotEmpty()) {
writer.writeTag(10u).write(libraryPackage)
}
serviceClassNames.entries.forEach {
writer.writeTag(18u).write(ServiceClassNamesEntry(it.key, it.value))
}
if (common != null) {
writer.writeTag(26u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is JavaSettings &&
other.libraryPackage == libraryPackage &&
other.serviceClassNames == serviceClassNames &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + libraryPackage.hashCode()
result = 31 * result + serviceClassNames.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"JavaSettings(" +
"libraryPackage=$libraryPackage, " +
"serviceClassNames=$serviceClassNames, " +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): JavaSettings =
Builder().apply {
libraryPackage = [email protected]
serviceClassNames = [email protected]
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var libraryPackage: String = ""
public var serviceClassNames: Map = emptyMap()
set(newValue) {
field = copyMap(newValue)
}
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): JavaSettings =
JavaSettings(
libraryPackage,
unmodifiableMap(serviceClassNames),
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): JavaSettings {
var libraryPackage = ""
var serviceClassNames: MutableMap? = null
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return JavaSettings(
libraryPackage,
unmodifiableMap(serviceClassNames),
common,
UnknownFieldSet.from(unknownFields)
)
10u -> libraryPackage = reader.readString()
18u ->
serviceClassNames =
(serviceClassNames ?: mutableMapOf()).apply {
reader.readRepeated(false) {
reader.readMessage(ServiceClassNamesEntry).let {
put(it.key, it.value)
}
}
}
26u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): JavaSettings = Builder().apply(dsl).build()
}
private class ServiceClassNamesEntry(
public val key: String,
public val `value`: String
) : AbstractMessage() {
override fun messageSize(): Int = entrySize(key, value)
override fun serialize(writer: Writer) {
writer.writeTag(10u).write(key)
writer.writeTag(18u).write(`value`)
}
public companion object Deserializer : AbstractDeserializer() {
public fun entrySize(
key: String,
`value`: String
): Int =
sizeOf(10u) + sizeOf(key) +
sizeOf(18u) + sizeOf(`value`)
override fun deserialize(reader: Reader): ServiceClassNamesEntry {
var key = ""
var value = ""
while (true) {
when (reader.readTag()) {
0u -> return ServiceClassNamesEntry(key, value)
10u -> key = reader.readString()
18u -> value = reader.readString()
}
}
}
}
}
}
/**
* Settings for C++ client libraries.
*/
@GeneratedMessage("google.api.CppSettings")
public class CppSettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is CppSettings &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"CppSettings(" +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): CppSettings =
Builder().apply {
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): CppSettings =
CppSettings(
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): CppSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return CppSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): CppSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Php client libraries.
*/
@GeneratedMessage("google.api.PhpSettings")
public class PhpSettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is PhpSettings &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"PhpSettings(" +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): PhpSettings =
Builder().apply {
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): PhpSettings =
PhpSettings(
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): PhpSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return PhpSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): PhpSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Python client libraries.
*/
@GeneratedMessage("google.api.PythonSettings")
public class PythonSettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is PythonSettings &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"PythonSettings(" +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): PythonSettings =
Builder().apply {
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): PythonSettings =
PythonSettings(
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): PythonSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return PythonSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): PythonSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Node client libraries.
*/
@GeneratedMessage("google.api.NodeSettings")
public class NodeSettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is NodeSettings &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"NodeSettings(" +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): NodeSettings =
Builder().apply {
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): NodeSettings =
NodeSettings(
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): NodeSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return NodeSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): NodeSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Dotnet client libraries.
*/
@GeneratedMessage("google.api.DotnetSettings")
public class DotnetSettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
/**
* Map from original service names to renamed versions. This is used when the default generated
* types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to
* SubscriberServiceApi.
*/
@GeneratedProperty(2)
public val renamedServices: Map,
/**
* Map from full resource types to the effective short name for the resource. This is used when
* otherwise resource named from different services would cause naming collisions. Example entry:
* "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
*/
@GeneratedProperty(3)
public val renamedResources: Map,
/**
* List of full resource types to ignore during generation. This is typically used for
* API-specific Location resources, which should be handled by the generator as if they were actually
* the common Location resources. Example entry: "documentai.googleapis.com/Location"
*/
@GeneratedProperty(4)
public val ignoredResources: List,
/**
* Namespaces which must be aliased in snippets due to a known (but non-generator-predictable)
* naming collision
*/
@GeneratedProperty(5)
public val forcedNamespaceAliases: List,
/**
* Method signatures (in the form "service.method(signature)") which are provided separately, so
* shouldn't be generated. Snippets *calling* these methods are still generated, however.
*/
@GeneratedProperty(6)
public val handwrittenSignatures: List,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
if (renamedServices.isNotEmpty()) {
result +=
sizeOf(renamedServices, 18u) { k, v ->
RenamedServicesEntry.entrySize(k, v)
}
}
if (renamedResources.isNotEmpty()) {
result +=
sizeOf(renamedResources, 26u) { k, v ->
RenamedResourcesEntry.entrySize(k, v)
}
}
if (ignoredResources.isNotEmpty()) {
result += (sizeOf(34u) * ignoredResources.size) + ignoredResources.sumOf { sizeOf(it) }
}
if (forcedNamespaceAliases.isNotEmpty()) {
result += (sizeOf(42u) * forcedNamespaceAliases.size) +
forcedNamespaceAliases.sumOf { sizeOf(it) }
}
if (handwrittenSignatures.isNotEmpty()) {
result += (sizeOf(50u) * handwrittenSignatures.size) +
handwrittenSignatures.sumOf { sizeOf(it) }
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
renamedServices.entries.forEach {
writer.writeTag(18u).write(RenamedServicesEntry(it.key, it.value))
}
renamedResources.entries.forEach {
writer.writeTag(26u).write(RenamedResourcesEntry(it.key, it.value))
}
ignoredResources.forEach { writer.writeTag(34u).write(it) }
forcedNamespaceAliases.forEach { writer.writeTag(42u).write(it) }
handwrittenSignatures.forEach { writer.writeTag(50u).write(it) }
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is DotnetSettings &&
other.common == common &&
other.renamedServices == renamedServices &&
other.renamedResources == renamedResources &&
other.ignoredResources == ignoredResources &&
other.forcedNamespaceAliases == forcedNamespaceAliases &&
other.handwrittenSignatures == handwrittenSignatures &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
result = 31 * result + renamedServices.hashCode()
result = 31 * result + renamedResources.hashCode()
result = 31 * result + ignoredResources.hashCode()
result = 31 * result + forcedNamespaceAliases.hashCode()
result = 31 * result + handwrittenSignatures.hashCode()
return result
}
override fun toString(): String =
"DotnetSettings(" +
"common=$common, " +
"renamedServices=$renamedServices, " +
"renamedResources=$renamedResources, " +
"ignoredResources=$ignoredResources, " +
"forcedNamespaceAliases=$forcedNamespaceAliases, " +
"handwrittenSignatures=$handwrittenSignatures" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): DotnetSettings =
Builder().apply {
common = [email protected]
renamedServices = [email protected]
renamedResources = [email protected]
ignoredResources = [email protected]
forcedNamespaceAliases = [email protected]
handwrittenSignatures = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var renamedServices: Map = emptyMap()
set(newValue) {
field = copyMap(newValue)
}
public var renamedResources: Map = emptyMap()
set(newValue) {
field = copyMap(newValue)
}
public var ignoredResources: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var forcedNamespaceAliases: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var handwrittenSignatures: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): DotnetSettings =
DotnetSettings(
common,
unmodifiableMap(renamedServices),
unmodifiableMap(renamedResources),
unmodifiableList(ignoredResources),
unmodifiableList(forcedNamespaceAliases),
unmodifiableList(handwrittenSignatures),
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): DotnetSettings {
var common: CommonLanguageSettings? = null
var renamedServices: MutableMap? = null
var renamedResources: MutableMap? = null
var ignoredResources: MutableList? = null
var forcedNamespaceAliases: MutableList? = null
var handwrittenSignatures: MutableList? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return DotnetSettings(
common,
unmodifiableMap(renamedServices),
unmodifiableMap(renamedResources),
unmodifiableList(ignoredResources),
unmodifiableList(forcedNamespaceAliases),
unmodifiableList(handwrittenSignatures),
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
18u ->
renamedServices =
(renamedServices ?: mutableMapOf()).apply {
reader.readRepeated(false) {
reader.readMessage(RenamedServicesEntry).let {
put(it.key, it.value)
}
}
}
26u ->
renamedResources =
(renamedResources ?: mutableMapOf()).apply {
reader.readRepeated(false) {
reader.readMessage(RenamedResourcesEntry).let {
put(it.key, it.value)
}
}
}
34u ->
ignoredResources =
(ignoredResources ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readString())
}
}
42u ->
forcedNamespaceAliases =
(forcedNamespaceAliases ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readString())
}
}
50u ->
handwrittenSignatures =
(handwrittenSignatures ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readString())
}
}
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): DotnetSettings = Builder().apply(dsl).build()
}
private class RenamedServicesEntry(
public val key: String,
public val `value`: String
) : AbstractMessage() {
override fun messageSize(): Int = entrySize(key, value)
override fun serialize(writer: Writer) {
writer.writeTag(10u).write(key)
writer.writeTag(18u).write(`value`)
}
public companion object Deserializer : AbstractDeserializer() {
public fun entrySize(
key: String,
`value`: String
): Int =
sizeOf(10u) + sizeOf(key) +
sizeOf(18u) + sizeOf(`value`)
override fun deserialize(reader: Reader): RenamedServicesEntry {
var key = ""
var value = ""
while (true) {
when (reader.readTag()) {
0u -> return RenamedServicesEntry(key, value)
10u -> key = reader.readString()
18u -> value = reader.readString()
}
}
}
}
}
private class RenamedResourcesEntry(
public val key: String,
public val `value`: String
) : AbstractMessage() {
override fun messageSize(): Int = entrySize(key, value)
override fun serialize(writer: Writer) {
writer.writeTag(10u).write(key)
writer.writeTag(18u).write(`value`)
}
public companion object Deserializer : AbstractDeserializer() {
public fun entrySize(
key: String,
`value`: String
): Int =
sizeOf(10u) + sizeOf(key) +
sizeOf(18u) + sizeOf(`value`)
override fun deserialize(reader: Reader): RenamedResourcesEntry {
var key = ""
var value = ""
while (true) {
when (reader.readTag()) {
0u -> return RenamedResourcesEntry(key, value)
10u -> key = reader.readString()
18u -> value = reader.readString()
}
}
}
}
}
}
/**
* Settings for Ruby client libraries.
*/
@GeneratedMessage("google.api.RubySettings")
public class RubySettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is RubySettings &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"RubySettings(" +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): RubySettings =
Builder().apply {
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): RubySettings =
RubySettings(
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): RubySettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return RubySettings(
common,
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): RubySettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Go client libraries.
*/
@GeneratedMessage("google.api.GoSettings")
public class GoSettings private constructor(
/**
* Some settings.
*/
@GeneratedProperty(1)
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (common != null) {
writer.writeTag(10u).write(common)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is GoSettings &&
other.common == common &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + common.hashCode()
return result
}
override fun toString(): String =
"GoSettings(" +
"common=$common" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): GoSettings =
Builder().apply {
common = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var common: CommonLanguageSettings? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): GoSettings =
GoSettings(
common,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): GoSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return GoSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10u -> common = reader.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): GoSettings = Builder().apply(dsl).build()
}
}
/**
* Describes the generator configuration for a method.
*/
@GeneratedMessage("google.api.MethodSettings")
public class MethodSettings private constructor(
/**
* The fully qualified name of the method, for which the options below apply. This is used to find
* the method to apply the options.
*/
@GeneratedProperty(1)
public val selector: String,
/**
* Describes settings to use for long-running operations when generating API methods for RPCs.
* Complements RPCs that use the annotations in google/longrunning/operations.proto.
*
* Example of a YAML configuration::
*
* publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize
* long_running: initial_poll_delay: seconds: 60 # 1 minute
* poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes
* total_poll_timeout: seconds: 54000 # 90 minutes
*/
@GeneratedProperty(2)
public val longRunning: LongRunning?,
/**
* List of top-level fields of the request message, that should be automatically populated by the
* client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.
*
*
* Example of a YAML configuration:
*
* publishing: method_settings: - selector:
* google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id
*/
@GeneratedProperty(3)
public val autoPopulatedFields: List,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (selector.isNotEmpty()) {
result += sizeOf(10u) + sizeOf(selector)
}
if (longRunning != null) {
result += sizeOf(18u) + sizeOf(longRunning)
}
if (autoPopulatedFields.isNotEmpty()) {
result += (sizeOf(26u) * autoPopulatedFields.size) + autoPopulatedFields.sumOf { sizeOf(it) }
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (selector.isNotEmpty()) {
writer.writeTag(10u).write(selector)
}
if (longRunning != null) {
writer.writeTag(18u).write(longRunning)
}
autoPopulatedFields.forEach { writer.writeTag(26u).write(it) }
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is MethodSettings &&
other.selector == selector &&
other.longRunning == longRunning &&
other.autoPopulatedFields == autoPopulatedFields &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + selector.hashCode()
result = 31 * result + longRunning.hashCode()
result = 31 * result + autoPopulatedFields.hashCode()
return result
}
override fun toString(): String =
"MethodSettings(" +
"selector=$selector, " +
"longRunning=$longRunning, " +
"autoPopulatedFields=$autoPopulatedFields" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): MethodSettings =
Builder().apply {
selector = [email protected]
longRunning = [email protected]
autoPopulatedFields = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var selector: String = ""
public var longRunning: LongRunning? = null
public var autoPopulatedFields: List = emptyList()
set(newValue) {
field = copyList(newValue)
}
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): MethodSettings =
MethodSettings(
selector,
longRunning,
unmodifiableList(autoPopulatedFields),
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): MethodSettings {
var selector = ""
var longRunning: LongRunning? = null
var autoPopulatedFields: MutableList? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return MethodSettings(
selector,
longRunning,
unmodifiableList(autoPopulatedFields),
UnknownFieldSet.from(unknownFields)
)
10u -> selector = reader.readString()
18u -> longRunning = reader.readMessage(LongRunning)
26u ->
autoPopulatedFields =
(autoPopulatedFields ?: mutableListOf()).apply {
reader.readRepeated(false) {
add(reader.readString())
}
}
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): MethodSettings = Builder().apply(dsl).build()
}
/**
* Describes settings to use when generating API methods that use the long-running operation
* pattern. All default values below are from those used in the client library generators (e.g.
* [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
*/
@GeneratedMessage("google.api.MethodSettings.LongRunning")
public class LongRunning private constructor(
/**
* Initial delay after which the first poll request will be made. Default value: 5 seconds.
*/
@GeneratedProperty(1)
public val initialPollDelay: Duration?,
/**
* Multiplier to gradually increase delay between subsequent polls until it reaches
* max_poll_delay. Default value: 1.5.
*/
@GeneratedProperty(2)
public val pollDelayMultiplier: Float,
/**
* Maximum time between two subsequent poll requests. Default value: 45 seconds.
*/
@GeneratedProperty(3)
public val maxPollDelay: Duration?,
/**
* Total polling timeout. Default value: 5 minutes.
*/
@GeneratedProperty(4)
public val totalPollTimeout: Duration?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractMessage() {
private val `$messageSize`: Int by lazy {
var result = 0
if (initialPollDelay != null) {
result += sizeOf(10u) + sizeOf(initialPollDelay)
}
if (pollDelayMultiplier != 0.0f) {
result += sizeOf(21u) + 4
}
if (maxPollDelay != null) {
result += sizeOf(26u) + sizeOf(maxPollDelay)
}
if (totalPollTimeout != null) {
result += sizeOf(34u) + sizeOf(totalPollTimeout)
}
result += unknownFields.size()
result
}
override fun messageSize(): Int = `$messageSize`
override fun serialize(writer: Writer) {
if (initialPollDelay != null) {
writer.writeTag(10u).write(initialPollDelay)
}
if (pollDelayMultiplier != 0.0f) {
writer.writeTag(21u).write(pollDelayMultiplier)
}
if (maxPollDelay != null) {
writer.writeTag(26u).write(maxPollDelay)
}
if (totalPollTimeout != null) {
writer.writeTag(34u).write(totalPollTimeout)
}
writer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is LongRunning &&
other.initialPollDelay == initialPollDelay &&
other.pollDelayMultiplier == pollDelayMultiplier &&
other.maxPollDelay == maxPollDelay &&
other.totalPollTimeout == totalPollTimeout &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + initialPollDelay.hashCode()
result = 31 * result + pollDelayMultiplier.hashCode()
result = 31 * result + maxPollDelay.hashCode()
result = 31 * result + totalPollTimeout.hashCode()
return result
}
override fun toString(): String =
"LongRunning(" +
"initialPollDelay=$initialPollDelay, " +
"pollDelayMultiplier=$pollDelayMultiplier, " +
"maxPollDelay=$maxPollDelay, " +
"totalPollTimeout=$totalPollTimeout" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): LongRunning =
Builder().apply {
initialPollDelay = [email protected]
pollDelayMultiplier = [email protected]
maxPollDelay = [email protected]
totalPollTimeout = [email protected]
unknownFields = [email protected]
builder()
}.build()
@BuilderDsl
public class Builder {
public var initialPollDelay: Duration? = null
public var pollDelayMultiplier: Float = 0.0f
public var maxPollDelay: Duration? = null
public var totalPollTimeout: Duration? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): LongRunning =
LongRunning(
initialPollDelay,
pollDelayMultiplier,
maxPollDelay,
totalPollTimeout,
unknownFields
)
}
public companion object Deserializer : AbstractDeserializer() {
@JvmStatic
override fun deserialize(reader: Reader): LongRunning {
var initialPollDelay: Duration? = null
var pollDelayMultiplier = 0.0f
var maxPollDelay: Duration? = null
var totalPollTimeout: Duration? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (reader.readTag()) {
0u -> return LongRunning(
initialPollDelay,
pollDelayMultiplier,
maxPollDelay,
totalPollTimeout,
UnknownFieldSet.from(unknownFields)
)
10u -> initialPollDelay = reader.readMessage(Duration)
21u -> pollDelayMultiplier = reader.readFloat()
26u -> maxPollDelay = reader.readMessage(Duration)
34u -> totalPollTimeout = reader.readMessage(Duration)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(reader.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): LongRunning = Builder().apply(dsl).build()
}
}
}