|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 3 | + * in compliance with the License. You may obtain a copy of the License at |
| 4 | + * |
| 5 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 8 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 9 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 10 | + * the License. |
| 11 | + */ |
| 12 | +/* |
| 13 | + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ |
| 14 | + * Modify at your own risk. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.google.api.services.bigtableadmin.v2.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Represents a protobuf schema. |
| 21 | + * |
| 22 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 23 | + * transmitted over HTTP when working with the Cloud Bigtable Admin API. For a detailed explanation |
| 24 | + * see: |
| 25 | + * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> |
| 26 | + * </p> |
| 27 | + * |
| 28 | + * @author Google, Inc. |
| 29 | + */ |
| 30 | +@SuppressWarnings("javadoc") |
| 31 | +public final class ProtoSchema extends com.google.api.client.json.GenericJson { |
| 32 | + |
| 33 | + /** |
| 34 | + * Required. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com |
| 35 | + * /protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), which could include |
| 36 | + * multiple proto files. To generate it, [install](https://grpc.io/docs/protoc-installation/) and |
| 37 | + * run `protoc` with `--include_imports` and `--descriptor_set_out`. For example, to generate for |
| 38 | + * moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ |
| 39 | + * --include_imports \ --descriptor_set_out=descriptors.pb \ moon/shot/app.proto ``` For more |
| 40 | + * details, see protobuffer [self description](https://developers.google.com/protocol- |
| 41 | + * buffers/docs/techniques#self-description). |
| 42 | + * The value may be {@code null}. |
| 43 | + */ |
| 44 | + @com.google.api.client.util.Key |
| 45 | + private java.lang.String protoDescriptors; |
| 46 | + |
| 47 | + /** |
| 48 | + * Required. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com |
| 49 | + * /protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), which could include |
| 50 | + * multiple proto files. To generate it, [install](https://grpc.io/docs/protoc-installation/) and |
| 51 | + * run `protoc` with `--include_imports` and `--descriptor_set_out`. For example, to generate for |
| 52 | + * moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ |
| 53 | + * --include_imports \ --descriptor_set_out=descriptors.pb \ moon/shot/app.proto ``` For more |
| 54 | + * details, see protobuffer [self description](https://developers.google.com/protocol- |
| 55 | + * buffers/docs/techniques#self-description). |
| 56 | + * @see #decodeProtoDescriptors() |
| 57 | + * @return value or {@code null} for none |
| 58 | + */ |
| 59 | + public java.lang.String getProtoDescriptors() { |
| 60 | + return protoDescriptors; |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Required. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com |
| 65 | + * /protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), which could include |
| 66 | + * multiple proto files. To generate it, [install](https://grpc.io/docs/protoc-installation/) and |
| 67 | + * run `protoc` with `--include_imports` and `--descriptor_set_out`. For example, to generate for |
| 68 | + * moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ |
| 69 | + * --include_imports \ --descriptor_set_out=descriptors.pb \ moon/shot/app.proto ``` For more |
| 70 | + * details, see protobuffer [self description](https://developers.google.com/protocol- |
| 71 | + * buffers/docs/techniques#self-description). |
| 72 | + * @see #getProtoDescriptors() |
| 73 | + * @return Base64 decoded value or {@code null} for none |
| 74 | + * |
| 75 | + * @since 1.14 |
| 76 | + */ |
| 77 | + public byte[] decodeProtoDescriptors() { |
| 78 | + return com.google.api.client.util.Base64.decodeBase64(protoDescriptors); |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * Required. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com |
| 83 | + * /protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), which could include |
| 84 | + * multiple proto files. To generate it, [install](https://grpc.io/docs/protoc-installation/) and |
| 85 | + * run `protoc` with `--include_imports` and `--descriptor_set_out`. For example, to generate for |
| 86 | + * moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ |
| 87 | + * --include_imports \ --descriptor_set_out=descriptors.pb \ moon/shot/app.proto ``` For more |
| 88 | + * details, see protobuffer [self description](https://developers.google.com/protocol- |
| 89 | + * buffers/docs/techniques#self-description). |
| 90 | + * @see #encodeProtoDescriptors() |
| 91 | + * @param protoDescriptors protoDescriptors or {@code null} for none |
| 92 | + */ |
| 93 | + public ProtoSchema setProtoDescriptors(java.lang.String protoDescriptors) { |
| 94 | + this.protoDescriptors = protoDescriptors; |
| 95 | + return this; |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Required. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com |
| 100 | + * /protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), which could include |
| 101 | + * multiple proto files. To generate it, [install](https://grpc.io/docs/protoc-installation/) and |
| 102 | + * run `protoc` with `--include_imports` and `--descriptor_set_out`. For example, to generate for |
| 103 | + * moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ |
| 104 | + * --include_imports \ --descriptor_set_out=descriptors.pb \ moon/shot/app.proto ``` For more |
| 105 | + * details, see protobuffer [self description](https://developers.google.com/protocol- |
| 106 | + * buffers/docs/techniques#self-description). |
| 107 | + * @see #setProtoDescriptors() |
| 108 | + * |
| 109 | + * <p> |
| 110 | + * The value is encoded Base64 or {@code null} for none. |
| 111 | + * </p> |
| 112 | + * |
| 113 | + * @since 1.14 |
| 114 | + */ |
| 115 | + public ProtoSchema encodeProtoDescriptors(byte[] protoDescriptors) { |
| 116 | + this.protoDescriptors = com.google.api.client.util.Base64.encodeBase64URLSafeString(protoDescriptors); |
| 117 | + return this; |
| 118 | + } |
| 119 | + |
| 120 | + @Override |
| 121 | + public ProtoSchema set(String fieldName, Object value) { |
| 122 | + return (ProtoSchema) super.set(fieldName, value); |
| 123 | + } |
| 124 | + |
| 125 | + @Override |
| 126 | + public ProtoSchema clone() { |
| 127 | + return (ProtoSchema) super.clone(); |
| 128 | + } |
| 129 | + |
| 130 | +} |
0 commit comments