-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add proto annotation for non-ascii field mapping (#1776)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 473815595 Source-Link: googleapis/googleapis@46cfc4c Source-Link: https://github.com/googleapis/googleapis-gen/commit/955ca31d81100d81ed7e0ae0522358ac45d53cc9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTU1Y2EzMWQ4MTEwMGQ4MWVkN2UwYWUwNTIyMzU4YWM0NWQ1M2NjOSJ9
- Loading branch information
1 parent
450f8ff
commit 1a079ee
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
86 changes: 86 additions & 0 deletions
86
...gquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AnnotationsProto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
* Copyright 2020 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
// Generated by the protocol buffer compiler. DO NOT EDIT! | ||
// source: google/cloud/bigquery/storage/v1/annotations.proto | ||
|
||
package com.google.cloud.bigquery.storage.v1; | ||
|
||
public final class AnnotationsProto { | ||
private AnnotationsProto() {} | ||
|
||
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { | ||
registry.add(com.google.cloud.bigquery.storage.v1.AnnotationsProto.columnName); | ||
} | ||
|
||
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { | ||
registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); | ||
} | ||
|
||
public static final int COLUMN_NAME_FIELD_NUMBER = 454943157; | ||
/** | ||
* | ||
* | ||
* <pre> | ||
* Setting the column_name extension allows users to reference | ||
* bigquery column independently of the field name in the protocol buffer | ||
* message. | ||
* The intended use of this annotation is to reference a destination column | ||
* named using characters unavailable for protobuf field names (e.g. unicode | ||
* characters). | ||
* More details about BigQuery naming limitations can be found here: | ||
* https://cloud.google.com/bigquery/docs/schemas#column_names | ||
* This extension is currently experimental. | ||
* </pre> | ||
* | ||
* <code>extend .google.protobuf.FieldOptions { ... }</code> | ||
*/ | ||
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< | ||
com.google.protobuf.DescriptorProtos.FieldOptions, java.lang.String> | ||
columnName = | ||
com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( | ||
java.lang.String.class, null); | ||
|
||
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { | ||
return descriptor; | ||
} | ||
|
||
private static com.google.protobuf.Descriptors.FileDescriptor descriptor; | ||
|
||
static { | ||
java.lang.String[] descriptorData = { | ||
"\n2google/cloud/bigquery/storage/v1/annot" | ||
+ "ations.proto\022 google.cloud.bigquery.stor" | ||
+ "age.v1\032 google/protobuf/descriptor.proto" | ||
+ ":9\n\013column_name\022\035.google.protobuf.FieldO" | ||
+ "ptions\030\265\303\367\330\001 \001(\t\210\001\001B\311\001\n$com.google.cloud" | ||
+ ".bigquery.storage.v1B\020AnnotationsProtoP\001" | ||
+ "ZGgoogle.golang.org/genproto/googleapis/" | ||
+ "cloud/bigquery/storage/v1;storage\252\002 Goog" | ||
+ "le.Cloud.BigQuery.Storage.V1\312\002 Google\\Cl" | ||
+ "oud\\BigQuery\\Storage\\V1b\006proto3" | ||
}; | ||
descriptor = | ||
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( | ||
descriptorData, | ||
new com.google.protobuf.Descriptors.FileDescriptor[] { | ||
com.google.protobuf.DescriptorProtos.getDescriptor(), | ||
}); | ||
columnName.internalInit(descriptor.getExtensions().get(0)); | ||
com.google.protobuf.DescriptorProtos.getDescriptor(); | ||
} | ||
|
||
// @@protoc_insertion_point(outer_class_scope) | ||
} |
28 changes: 28 additions & 0 deletions
28
...loud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/annotations.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
|
||
package google.cloud.bigquery.storage.v1; | ||
|
||
import "google/protobuf/descriptor.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1"; | ||
option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage"; | ||
option java_package = "com.google.cloud.bigquery.storage.v1"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "AnnotationsProto"; | ||
option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1"; | ||
|
||
extend google.protobuf.FieldOptions { | ||
// Setting the column_name extension allows users to reference | ||
// bigquery column independently of the field name in the protocol buffer | ||
// message. | ||
// | ||
// The intended use of this annotation is to reference a destination column | ||
// named using characters unavailable for protobuf field names (e.g. unicode | ||
// characters). | ||
// | ||
// More details about BigQuery naming limitations can be found here: | ||
// https://cloud.google.com/bigquery/docs/schemas#column_names | ||
// | ||
// This extension is currently experimental. | ||
optional string column_name = 454943157; | ||
} |