Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by protokt version 1.0.0-alpha.8. Do not modify.
// Source: google/api/client.proto
@file:Suppress("DEPRECATION")
package protokt.v1.google.api
import protokt.v1.AbstractKtDeserializer
import protokt.v1.AbstractKtMessage
import protokt.v1.Collections.copyList
import protokt.v1.Collections.copyMap
import protokt.v1.Collections.unmodifiableList
import protokt.v1.Collections.unmodifiableMap
import protokt.v1.KtBuilderDsl
import protokt.v1.KtEnum
import protokt.v1.KtEnumDeserializer
import protokt.v1.KtMessageDeserializer
import protokt.v1.KtMessageSerializer
import protokt.v1.SizeCodecs.sizeOf
import protokt.v1.UnknownFieldSet
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
import com.toasttab.protokt.rt.KtGeneratedMessage as RtKtGeneratedMessage
import protokt.v1.KtGeneratedMessage as V1KtGeneratedMessage
/**
* Required information for every language.
*/
public sealed class ClientLibraryOrganization(
override val `value`: Int,
override val name: String
) : KtEnum() {
/**
* 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 : KtEnumDeserializer {
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
) : KtEnum() {
/**
* 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 : KtEnumDeserializer {
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.
*/
@V1KtGeneratedMessage("google.api.CommonLanguageSettings")
@RtKtGeneratedMessage("google.api.CommonLanguageSettings")
public class CommonLanguageSettings private constructor(
/**
* Link to automatically generated reference documentation. Example:
* https://cloud.google.com/nodejs/docs/reference/asset/latest
*/
@Deprecated("deprecated in proto")
public val referenceDocsUri: String,
/**
* The destination where API teams want this client library to be published.
*/
public val destinations: List,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
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()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (referenceDocsUri.isNotEmpty()) {
serializer.writeTag(10u).write(referenceDocsUri)
}
if (destinations.isNotEmpty()) {
serializer.writeTag(18u).writeUInt32(destinations.sumOf { sizeOf(it) }.toUInt())
destinations.forEach { serializer.write(it) }
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): CommonLanguageSettings {
var referenceDocsUri = ""
var destinations: MutableList? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return CommonLanguageSettings(
referenceDocsUri,
unmodifiableList(destinations),
UnknownFieldSet.from(unknownFields)
)
10 -> referenceDocsUri = deserializer.readString()
16 ->
destinations =
(destinations ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readEnum(ClientLibraryDestination))
}
}
18 ->
destinations =
(destinations ?: mutableListOf()).apply {
deserializer.readRepeated(true) {
add(deserializer.readEnum(ClientLibraryDestination))
}
}
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): CommonLanguageSettings = Builder().apply(dsl).build()
}
}
/**
* Details about how and where to publish client libraries.
*/
@V1KtGeneratedMessage("google.api.ClientLibrarySettings")
@RtKtGeneratedMessage("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".
*/
public val version: String,
/**
* Launch stage of this version of the API.
*/
public val launchStage: LaunchStage,
/**
* When using transport=rest, the client request will encode enums as numbers rather than strings.
*/
public val restNumericEnums: Boolean,
/**
* Settings for legacy Java features, supported in the Service YAML.
*/
public val javaSettings: JavaSettings?,
/**
* Settings for C++ client libraries.
*/
public val cppSettings: CppSettings?,
/**
* Settings for PHP client libraries.
*/
public val phpSettings: PhpSettings?,
/**
* Settings for Python client libraries.
*/
public val pythonSettings: PythonSettings?,
/**
* Settings for Node client libraries.
*/
public val nodeSettings: NodeSettings?,
/**
* Settings for .NET client libraries.
*/
public val dotnetSettings: DotnetSettings?,
/**
* Settings for Ruby client libraries.
*/
public val rubySettings: RubySettings?,
/**
* Settings for Go client libraries.
*/
public val goSettings: GoSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
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()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (version.isNotEmpty()) {
serializer.writeTag(10u).write(version)
}
if (launchStage.value != 0) {
serializer.writeTag(16u).write(launchStage)
}
if (restNumericEnums) {
serializer.writeTag(24u).write(restNumericEnums)
}
if (javaSettings != null) {
serializer.writeTag(170u).write(javaSettings)
}
if (cppSettings != null) {
serializer.writeTag(178u).write(cppSettings)
}
if (phpSettings != null) {
serializer.writeTag(186u).write(phpSettings)
}
if (pythonSettings != null) {
serializer.writeTag(194u).write(pythonSettings)
}
if (nodeSettings != null) {
serializer.writeTag(202u).write(nodeSettings)
}
if (dotnetSettings != null) {
serializer.writeTag(210u).write(dotnetSettings)
}
if (rubySettings != null) {
serializer.writeTag(218u).write(rubySettings)
}
if (goSettings != null) {
serializer.writeTag(226u).write(goSettings)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): 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 (deserializer.readTag()) {
0 -> return ClientLibrarySettings(
version,
launchStage,
restNumericEnums,
javaSettings,
cppSettings,
phpSettings,
pythonSettings,
nodeSettings,
dotnetSettings,
rubySettings,
goSettings,
UnknownFieldSet.from(unknownFields)
)
10 -> version = deserializer.readString()
16 -> launchStage = deserializer.readEnum(LaunchStage)
24 -> restNumericEnums = deserializer.readBool()
170 -> javaSettings = deserializer.readMessage(JavaSettings)
178 -> cppSettings = deserializer.readMessage(CppSettings)
186 -> phpSettings = deserializer.readMessage(PhpSettings)
194 -> pythonSettings = deserializer.readMessage(PythonSettings)
202 -> nodeSettings = deserializer.readMessage(NodeSettings)
210 -> dotnetSettings = deserializer.readMessage(DotnetSettings)
218 -> rubySettings = deserializer.readMessage(RubySettings)
226 -> goSettings = deserializer.readMessage(GoSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.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.
*/
@V1KtGeneratedMessage("google.api.Publishing")
@RtKtGeneratedMessage("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.
*/
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
*/
public val newIssueUri: String,
/**
* Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview
*/
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".
*/
public val apiShortName: String,
/**
* GitHub label to apply to issues and pull requests opened for this API.
*/
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.
*/
public val codeownerGithubTeams: List,
/**
* A prefix used in sample code when demarking regions to be included in documentation.
*/
public val docTagPrefix: String,
/**
* For whom the client library is being published.
*/
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.
*/
public val librarySettings: List,
/**
* Optional link to proto reference documentation. Example:
* https://cloud.google.com/pubsub/lite/docs/reference/rpc
*/
public val protoReferenceDocumentationUri: String,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
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)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
methodSettings.forEach { serializer.writeTag(18u).write(it) }
if (newIssueUri.isNotEmpty()) {
serializer.writeTag(810u).write(newIssueUri)
}
if (documentationUri.isNotEmpty()) {
serializer.writeTag(818u).write(documentationUri)
}
if (apiShortName.isNotEmpty()) {
serializer.writeTag(826u).write(apiShortName)
}
if (githubLabel.isNotEmpty()) {
serializer.writeTag(834u).write(githubLabel)
}
codeownerGithubTeams.forEach { serializer.writeTag(842u).write(it) }
if (docTagPrefix.isNotEmpty()) {
serializer.writeTag(850u).write(docTagPrefix)
}
if (organization.value != 0) {
serializer.writeTag(856u).write(organization)
}
librarySettings.forEach { serializer.writeTag(874u).write(it) }
if (protoReferenceDocumentationUri.isNotEmpty()) {
serializer.writeTag(882u).write(protoReferenceDocumentationUri)
}
serializer.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.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()
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" +
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]
unknownFields = [email protected]
builder()
}.build()
@KtBuilderDsl
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 unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): Publishing =
Publishing(
unmodifiableList(methodSettings),
newIssueUri,
documentationUri,
apiShortName,
githubLabel,
unmodifiableList(codeownerGithubTeams),
docTagPrefix,
organization,
unmodifiableList(librarySettings),
protoReferenceDocumentationUri,
unknownFields
)
}
public companion object Deserializer : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): 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 unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return Publishing(
unmodifiableList(methodSettings),
newIssueUri,
documentationUri,
apiShortName,
githubLabel,
unmodifiableList(codeownerGithubTeams),
docTagPrefix,
organization,
unmodifiableList(librarySettings),
protoReferenceDocumentationUri,
UnknownFieldSet.from(unknownFields)
)
18 ->
methodSettings =
(methodSettings ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readMessage(MethodSettings))
}
}
810 -> newIssueUri = deserializer.readString()
818 -> documentationUri = deserializer.readString()
826 -> apiShortName = deserializer.readString()
834 -> githubLabel = deserializer.readString()
842 ->
codeownerGithubTeams =
(codeownerGithubTeams ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readString())
}
}
850 -> docTagPrefix = deserializer.readString()
856 -> organization = deserializer.readEnum(ClientLibraryOrganization)
874 ->
librarySettings =
(librarySettings ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readMessage(ClientLibrarySettings))
}
}
882 -> protoReferenceDocumentationUri = deserializer.readString()
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): Publishing = Builder().apply(dsl).build()
}
}
/**
* Settings for Java client libraries.
*/
@V1KtGeneratedMessage("google.api.JavaSettings")
@RtKtGeneratedMessage("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
*/
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
*/
public val serviceClassNames: Map,
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
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()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (libraryPackage.isNotEmpty()) {
serializer.writeTag(10u).write(libraryPackage)
}
serviceClassNames.entries.forEach {
serializer.writeTag(18u).write(ServiceClassNamesEntry(it.key, it.value))
}
if (common != null) {
serializer.writeTag(26u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): JavaSettings {
var libraryPackage = ""
var serviceClassNames: MutableMap? = null
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return JavaSettings(
libraryPackage,
unmodifiableMap(serviceClassNames),
common,
UnknownFieldSet.from(unknownFields)
)
10 -> libraryPackage = deserializer.readString()
18 ->
serviceClassNames =
(serviceClassNames ?: mutableMapOf()).apply {
deserializer.readRepeated(false) {
deserializer.readMessage(ServiceClassNamesEntry).let {
put(it.key, it.value)
}
}
}
26 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.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
) : AbstractKtMessage() {
override val messageSize: Int
get() = entrySize(key, value)
override fun serialize(serializer: KtMessageSerializer) {
serializer.writeTag(10u).write(key)
serializer.writeTag(18u).write(`value`)
}
public companion object Deserializer : AbstractKtDeserializer() {
public fun entrySize(
key: String,
`value`: String
): Int =
sizeOf(10u) + sizeOf(key) +
sizeOf(18u) + sizeOf(`value`)
override fun deserialize(deserializer: KtMessageDeserializer): ServiceClassNamesEntry {
var key = ""
var value = ""
while (true) {
when (deserializer.readTag()) {
0 -> return ServiceClassNamesEntry(key, value)
10 -> key = deserializer.readString()
18 -> value = deserializer.readString()
}
}
}
}
}
}
/**
* Settings for C++ client libraries.
*/
@V1KtGeneratedMessage("google.api.CppSettings")
@RtKtGeneratedMessage("google.api.CppSettings")
public class CppSettings private constructor(
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): CppSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return CppSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): CppSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Php client libraries.
*/
@V1KtGeneratedMessage("google.api.PhpSettings")
@RtKtGeneratedMessage("google.api.PhpSettings")
public class PhpSettings private constructor(
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): PhpSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return PhpSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): PhpSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Python client libraries.
*/
@V1KtGeneratedMessage("google.api.PythonSettings")
@RtKtGeneratedMessage("google.api.PythonSettings")
public class PythonSettings private constructor(
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): PythonSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return PythonSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): PythonSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Node client libraries.
*/
@V1KtGeneratedMessage("google.api.NodeSettings")
@RtKtGeneratedMessage("google.api.NodeSettings")
public class NodeSettings private constructor(
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): NodeSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return NodeSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): NodeSettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Dotnet client libraries.
*/
@V1KtGeneratedMessage("google.api.DotnetSettings")
@RtKtGeneratedMessage("google.api.DotnetSettings")
public class DotnetSettings private constructor(
/**
* Some settings.
*/
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.
*/
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"
*/
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"
*/
public val ignoredResources: List,
/**
* Namespaces which must be aliased in snippets due to a known (but non-generator-predictable)
* naming collision
*/
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.
*/
public val handwrittenSignatures: List,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
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()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
renamedServices.entries.forEach {
serializer.writeTag(18u).write(RenamedServicesEntry(it.key, it.value))
}
renamedResources.entries.forEach {
serializer.writeTag(26u).write(RenamedResourcesEntry(it.key, it.value))
}
ignoredResources.forEach { serializer.writeTag(34u).write(it) }
forcedNamespaceAliases.forEach { serializer.writeTag(42u).write(it) }
handwrittenSignatures.forEach { serializer.writeTag(50u).write(it) }
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): 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 (deserializer.readTag()) {
0 -> return DotnetSettings(
common,
unmodifiableMap(renamedServices),
unmodifiableMap(renamedResources),
unmodifiableList(ignoredResources),
unmodifiableList(forcedNamespaceAliases),
unmodifiableList(handwrittenSignatures),
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
18 ->
renamedServices =
(renamedServices ?: mutableMapOf()).apply {
deserializer.readRepeated(false) {
deserializer.readMessage(RenamedServicesEntry).let {
put(it.key, it.value)
}
}
}
26 ->
renamedResources =
(renamedResources ?: mutableMapOf()).apply {
deserializer.readRepeated(false) {
deserializer.readMessage(RenamedResourcesEntry).let {
put(it.key, it.value)
}
}
}
34 ->
ignoredResources =
(ignoredResources ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readString())
}
}
42 ->
forcedNamespaceAliases =
(forcedNamespaceAliases ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readString())
}
}
50 ->
handwrittenSignatures =
(handwrittenSignatures ?: mutableListOf()).apply {
deserializer.readRepeated(false) {
add(deserializer.readString())
}
}
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.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
) : AbstractKtMessage() {
override val messageSize: Int
get() = entrySize(key, value)
override fun serialize(serializer: KtMessageSerializer) {
serializer.writeTag(10u).write(key)
serializer.writeTag(18u).write(`value`)
}
public companion object Deserializer : AbstractKtDeserializer() {
public fun entrySize(
key: String,
`value`: String
): Int =
sizeOf(10u) + sizeOf(key) +
sizeOf(18u) + sizeOf(`value`)
override fun deserialize(deserializer: KtMessageDeserializer): RenamedServicesEntry {
var key = ""
var value = ""
while (true) {
when (deserializer.readTag()) {
0 -> return RenamedServicesEntry(key, value)
10 -> key = deserializer.readString()
18 -> value = deserializer.readString()
}
}
}
}
}
private class RenamedResourcesEntry(
public val key: String,
public val `value`: String
) : AbstractKtMessage() {
override val messageSize: Int
get() = entrySize(key, value)
override fun serialize(serializer: KtMessageSerializer) {
serializer.writeTag(10u).write(key)
serializer.writeTag(18u).write(`value`)
}
public companion object Deserializer : AbstractKtDeserializer() {
public fun entrySize(
key: String,
`value`: String
): Int =
sizeOf(10u) + sizeOf(key) +
sizeOf(18u) + sizeOf(`value`)
override fun deserialize(deserializer: KtMessageDeserializer): RenamedResourcesEntry {
var key = ""
var value = ""
while (true) {
when (deserializer.readTag()) {
0 -> return RenamedResourcesEntry(key, value)
10 -> key = deserializer.readString()
18 -> value = deserializer.readString()
}
}
}
}
}
}
/**
* Settings for Ruby client libraries.
*/
@V1KtGeneratedMessage("google.api.RubySettings")
@RtKtGeneratedMessage("google.api.RubySettings")
public class RubySettings private constructor(
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): RubySettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return RubySettings(
common,
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): RubySettings = Builder().apply(dsl).build()
}
}
/**
* Settings for Go client libraries.
*/
@V1KtGeneratedMessage("google.api.GoSettings")
@RtKtGeneratedMessage("google.api.GoSettings")
public class GoSettings private constructor(
/**
* Some settings.
*/
public val common: CommonLanguageSettings?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (common != null) {
result += sizeOf(10u) + sizeOf(common)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (common != null) {
serializer.writeTag(10u).write(common)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): GoSettings {
var common: CommonLanguageSettings? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return GoSettings(
common,
UnknownFieldSet.from(unknownFields)
)
10 -> common = deserializer.readMessage(CommonLanguageSettings)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): GoSettings = Builder().apply(dsl).build()
}
}
/**
* Describes the generator configuration for a method.
*/
@V1KtGeneratedMessage("google.api.MethodSettings")
@RtKtGeneratedMessage("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.
*/
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
*/
public val longRunning: LongRunning?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
var result = 0
if (selector.isNotEmpty()) {
result += sizeOf(10u) + sizeOf(selector)
}
if (longRunning != null) {
result += sizeOf(18u) + sizeOf(longRunning)
}
result += unknownFields.size()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (selector.isNotEmpty()) {
serializer.writeTag(10u).write(selector)
}
if (longRunning != null) {
serializer.writeTag(18u).write(longRunning)
}
serializer.writeUnknown(unknownFields)
}
override fun equals(other: Any?): Boolean =
other is MethodSettings &&
other.selector == selector &&
other.longRunning == longRunning &&
other.unknownFields == unknownFields
override fun hashCode(): Int {
var result = unknownFields.hashCode()
result = 31 * result + selector.hashCode()
result = 31 * result + longRunning.hashCode()
return result
}
override fun toString(): String =
"MethodSettings(" +
"selector=$selector, " +
"longRunning=$longRunning" +
if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)"
public fun copy(builder: Builder.() -> Unit): MethodSettings =
Builder().apply {
selector = [email protected]
longRunning = [email protected]
unknownFields = [email protected]
builder()
}.build()
@KtBuilderDsl
public class Builder {
public var selector: String = ""
public var longRunning: LongRunning? = null
public var unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
public fun build(): MethodSettings =
MethodSettings(
selector,
longRunning,
unknownFields
)
}
public companion object Deserializer : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): MethodSettings {
var selector = ""
var longRunning: LongRunning? = null
var unknownFields: UnknownFieldSet.Builder? = null
while (true) {
when (deserializer.readTag()) {
0 -> return MethodSettings(
selector,
longRunning,
UnknownFieldSet.from(unknownFields)
)
10 -> selector = deserializer.readString()
18 -> longRunning = deserializer.readMessage(LongRunning)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.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)).
*/
@V1KtGeneratedMessage("google.api.LongRunning")
@RtKtGeneratedMessage("google.api.LongRunning")
public class LongRunning private constructor(
/**
* Initial delay after which the first poll request will be made. Default value: 5 seconds.
*/
public val initialPollDelay: Duration?,
/**
* Multiplier to gradually increase delay between subsequent polls until it reaches
* max_poll_delay. Default value: 1.5.
*/
public val pollDelayMultiplier: Float,
/**
* Maximum time between two subsequent poll requests. Default value: 45 seconds.
*/
public val maxPollDelay: Duration?,
/**
* Total polling timeout. Default value: 5 minutes.
*/
public val totalPollTimeout: Duration?,
public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty()
) : AbstractKtMessage() {
override val messageSize: Int by lazy { messageSize() }
private fun messageSize(): Int {
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()
return result
}
override fun serialize(serializer: KtMessageSerializer) {
if (initialPollDelay != null) {
serializer.writeTag(10u).write(initialPollDelay)
}
if (pollDelayMultiplier != 0.0F) {
serializer.writeTag(21u).write(pollDelayMultiplier)
}
if (maxPollDelay != null) {
serializer.writeTag(26u).write(maxPollDelay)
}
if (totalPollTimeout != null) {
serializer.writeTag(34u).write(totalPollTimeout)
}
serializer.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()
@KtBuilderDsl
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 : AbstractKtDeserializer() {
@JvmStatic
override fun deserialize(deserializer: KtMessageDeserializer): 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 (deserializer.readTag()) {
0 -> return LongRunning(
initialPollDelay,
pollDelayMultiplier,
maxPollDelay,
totalPollTimeout,
UnknownFieldSet.from(unknownFields)
)
10 -> initialPollDelay = deserializer.readMessage(Duration)
21 -> pollDelayMultiplier = deserializer.readFloat()
26 -> maxPollDelay = deserializer.readMessage(Duration)
34 -> totalPollTimeout = deserializer.readMessage(Duration)
else ->
unknownFields =
(unknownFields ?: UnknownFieldSet.Builder()).also {
it.add(deserializer.readUnknown())
}
}
}
}
@JvmStatic
public operator fun invoke(dsl: Builder.() -> Unit): LongRunning = Builder().apply(dsl).build()
}
}
}