diff --git a/google-api-grpc/grpc-google-cloud-datacatalog-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-datacatalog-v1beta1/pom.xml new file mode 100644 index 000000000000..5ae4757f8905 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-datacatalog-v1beta1/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + grpc-google-cloud-datacatalog-v1beta1 + 0.0.1-alpha-SNAPSHOT + grpc-google-cloud-datacatalog-v1beta1 + GRPC library for grpc-google-cloud-datacatalog-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.52.1-SNAPSHOT + + + + io.grpc + grpc-stub + compile + + + io.grpc + grpc-protobuf + compile + + + com.google.api.grpc + proto-google-cloud-datacatalog-v1beta1 + compile + + + diff --git a/google-api-grpc/grpc-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/DataCatalogGrpc.java b/google-api-grpc/grpc-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/DataCatalogGrpc.java new file mode 100644 index 000000000000..f9e4eaff49be --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/DataCatalogGrpc.java @@ -0,0 +1,350 @@ +package com.google.cloud.datacatalog; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Cloud Data Catalog is a service that allows clients to discover,
+ * manage, and understand their Google Cloud data resources.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/datacatalog/v1beta1/datacatalog.proto") +public final class DataCatalogGrpc { + + private DataCatalogGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datacatalog.v1beta1.DataCatalog"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getLookupEntryMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.LookupEntryRequest, com.google.cloud.datacatalog.Entry> + METHOD_LOOKUP_ENTRY = getLookupEntryMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.LookupEntryRequest, com.google.cloud.datacatalog.Entry> + getLookupEntryMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.LookupEntryRequest, com.google.cloud.datacatalog.Entry> + getLookupEntryMethod() { + return getLookupEntryMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.LookupEntryRequest, com.google.cloud.datacatalog.Entry> + getLookupEntryMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.LookupEntryRequest, com.google.cloud.datacatalog.Entry> + getLookupEntryMethod; + if ((getLookupEntryMethod = DataCatalogGrpc.getLookupEntryMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getLookupEntryMethod = DataCatalogGrpc.getLookupEntryMethod) == null) { + DataCatalogGrpc.getLookupEntryMethod = + getLookupEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datacatalog.v1beta1.DataCatalog", "LookupEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.LookupEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.Entry.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("LookupEntry")) + .build(); + } + } + } + return getLookupEntryMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataCatalogStub newStub(io.grpc.Channel channel) { + return new DataCatalogStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataCatalogBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new DataCatalogBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataCatalogFutureStub newFutureStub(io.grpc.Channel channel) { + return new DataCatalogFutureStub(channel); + } + + /** + * + * + *
+   * Cloud Data Catalog is a service that allows clients to discover,
+   * manage, and understand their Google Cloud data resources.
+   * 
+ */ + public abstract static class DataCatalogImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Cloud Data Catalog Entry.
+     * 
+ */ + public void lookupEntry( + com.google.cloud.datacatalog.LookupEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLookupEntryMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getLookupEntryMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.LookupEntryRequest, + com.google.cloud.datacatalog.Entry>(this, METHODID_LOOKUP_ENTRY))) + .build(); + } + } + + /** + * + * + *
+   * Cloud Data Catalog is a service that allows clients to discover,
+   * manage, and understand their Google Cloud data resources.
+   * 
+ */ + public static final class DataCatalogStub extends io.grpc.stub.AbstractStub { + private DataCatalogStub(io.grpc.Channel channel) { + super(channel); + } + + private DataCatalogStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataCatalogStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogStub(channel, callOptions); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Cloud Data Catalog Entry.
+     * 
+ */ + public void lookupEntry( + com.google.cloud.datacatalog.LookupEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLookupEntryMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Cloud Data Catalog is a service that allows clients to discover,
+   * manage, and understand their Google Cloud data resources.
+   * 
+ */ + public static final class DataCatalogBlockingStub + extends io.grpc.stub.AbstractStub { + private DataCatalogBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private DataCatalogBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataCatalogBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Cloud Data Catalog Entry.
+     * 
+ */ + public com.google.cloud.datacatalog.Entry lookupEntry( + com.google.cloud.datacatalog.LookupEntryRequest request) { + return blockingUnaryCall( + getChannel(), getLookupEntryMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Cloud Data Catalog is a service that allows clients to discover,
+   * manage, and understand their Google Cloud data resources.
+   * 
+ */ + public static final class DataCatalogFutureStub + extends io.grpc.stub.AbstractStub { + private DataCatalogFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private DataCatalogFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataCatalogFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Cloud Data Catalog Entry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + lookupEntry(com.google.cloud.datacatalog.LookupEntryRequest request) { + return futureUnaryCall( + getChannel().newCall(getLookupEntryMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_LOOKUP_ENTRY = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DataCatalogImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DataCatalogImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LOOKUP_ENTRY: + serviceImpl.lookupEntry( + (com.google.cloud.datacatalog.LookupEntryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class DataCatalogBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataCatalogBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datacatalog.Datacatalog.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataCatalog"); + } + } + + private static final class DataCatalogFileDescriptorSupplier + extends DataCatalogBaseDescriptorSupplier { + DataCatalogFileDescriptorSupplier() {} + } + + private static final class DataCatalogMethodDescriptorSupplier + extends DataCatalogBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataCatalogMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataCatalogGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataCatalogFileDescriptorSupplier()) + .addMethod(getLookupEntryMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index 60fa6250ded4..d5cd1f85f9b3 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -229,6 +229,16 @@ grpc-google-cloud-containeranalysis-v1beta1 0.52.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-datacatalog-v1beta1 + 0.0.1-alpha-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-datacatalog-v1beta1 + 0.0.1-alpha-SNAPSHOT + com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 @@ -777,6 +787,7 @@ grpc-google-cloud-bigtable-v2 grpc-google-cloud-container-v1 grpc-google-cloud-containeranalysis-v1beta1 + grpc-google-cloud-datacatalog-v1beta1 grpc-google-cloud-datalabeling-v1beta1 grpc-google-cloud-dataproc-v1 grpc-google-cloud-dataproc-v1beta2 @@ -840,6 +851,7 @@ proto-google-cloud-bigtable-v2 proto-google-cloud-container-v1 proto-google-cloud-containeranalysis-v1beta1 + proto-google-cloud-datacatalog-v1beta1 proto-google-cloud-datalabeling-v1beta1 proto-google-cloud-dataproc-v1 proto-google-cloud-dataproc-v1beta2 diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/pom.xml new file mode 100644 index 000000000000..c237c9c80ba8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + proto-google-cloud-datacatalog-v1beta1 + 0.0.1-alpha-SNAPSHOT + proto-google-cloud-datacatalog-v1beta1 + PROTO library for proto-google-cloud-datacatalog-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.52.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + compile + + + com.google.api + api-common + compile + + + com.google.api.grpc + proto-google-common-protos + compile + + + com.google.api.grpc + proto-google-iam-v1 + compile + + + diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/BigQueryTableSpec.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/BigQueryTableSpec.java new file mode 100644 index 000000000000..1c601dd41943 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/BigQueryTableSpec.java @@ -0,0 +1,844 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Describes a BigQuery table.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.BigQueryTableSpec} + */ +public final class BigQueryTableSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + BigQueryTableSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryTableSpec.newBuilder() to construct. + private BigQueryTableSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryTableSpec() { + tableSourceType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryTableSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + tableSourceType_ = rawValue; + break; + } + case 18: + { + com.google.cloud.datacatalog.ViewSpec.Builder subBuilder = null; + if (viewSpec_ != null) { + subBuilder = viewSpec_.toBuilder(); + } + viewSpec_ = + input.readMessage( + com.google.cloud.datacatalog.ViewSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(viewSpec_); + viewSpec_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.BigQueryTableSpec.class, + com.google.cloud.datacatalog.BigQueryTableSpec.Builder.class); + } + + public static final int TABLE_SOURCE_TYPE_FIELD_NUMBER = 1; + private int tableSourceType_; + /** + * + * + *
+   * The table source type.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public int getTableSourceTypeValue() { + return tableSourceType_; + } + /** + * + * + *
+   * The table source type.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public com.google.cloud.datacatalog.TableSourceType getTableSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.TableSourceType result = + com.google.cloud.datacatalog.TableSourceType.valueOf(tableSourceType_); + return result == null ? com.google.cloud.datacatalog.TableSourceType.UNRECOGNIZED : result; + } + + public static final int VIEW_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.ViewSpec viewSpec_; + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * table_source_type is BIGQUERY_VIEW.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public boolean hasViewSpec() { + return viewSpec_ != null; + } + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * table_source_type is BIGQUERY_VIEW.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.ViewSpec getViewSpec() { + return viewSpec_ == null + ? com.google.cloud.datacatalog.ViewSpec.getDefaultInstance() + : viewSpec_; + } + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * table_source_type is BIGQUERY_VIEW.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.ViewSpecOrBuilder getViewSpecOrBuilder() { + return getViewSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tableSourceType_ + != com.google.cloud.datacatalog.TableSourceType.TABLE_SOURCE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, tableSourceType_); + } + if (viewSpec_ != null) { + output.writeMessage(2, getViewSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tableSourceType_ + != com.google.cloud.datacatalog.TableSourceType.TABLE_SOURCE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, tableSourceType_); + } + if (viewSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getViewSpec()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.BigQueryTableSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.BigQueryTableSpec other = + (com.google.cloud.datacatalog.BigQueryTableSpec) obj; + + if (tableSourceType_ != other.tableSourceType_) return false; + if (hasViewSpec() != other.hasViewSpec()) return false; + if (hasViewSpec()) { + if (!getViewSpec().equals(other.getViewSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_SOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + tableSourceType_; + if (hasViewSpec()) { + hash = (37 * hash) + VIEW_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getViewSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.BigQueryTableSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a BigQuery table.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.BigQueryTableSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.BigQueryTableSpec.class, + com.google.cloud.datacatalog.BigQueryTableSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.BigQueryTableSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + tableSourceType_ = 0; + + if (viewSpecBuilder_ == null) { + viewSpec_ = null; + } else { + viewSpec_ = null; + viewSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.BigQueryTableSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.BigQueryTableSpec build() { + com.google.cloud.datacatalog.BigQueryTableSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.BigQueryTableSpec buildPartial() { + com.google.cloud.datacatalog.BigQueryTableSpec result = + new com.google.cloud.datacatalog.BigQueryTableSpec(this); + result.tableSourceType_ = tableSourceType_; + if (viewSpecBuilder_ == null) { + result.viewSpec_ = viewSpec_; + } else { + result.viewSpec_ = viewSpecBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.BigQueryTableSpec) { + return mergeFrom((com.google.cloud.datacatalog.BigQueryTableSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.BigQueryTableSpec other) { + if (other == com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance()) return this; + if (other.tableSourceType_ != 0) { + setTableSourceTypeValue(other.getTableSourceTypeValue()); + } + if (other.hasViewSpec()) { + mergeViewSpec(other.getViewSpec()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.BigQueryTableSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.BigQueryTableSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int tableSourceType_ = 0; + /** + * + * + *
+     * The table source type.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public int getTableSourceTypeValue() { + return tableSourceType_; + } + /** + * + * + *
+     * The table source type.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public Builder setTableSourceTypeValue(int value) { + tableSourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The table source type.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public com.google.cloud.datacatalog.TableSourceType getTableSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.TableSourceType result = + com.google.cloud.datacatalog.TableSourceType.valueOf(tableSourceType_); + return result == null ? com.google.cloud.datacatalog.TableSourceType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The table source type.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public Builder setTableSourceType(com.google.cloud.datacatalog.TableSourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + tableSourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The table source type.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + public Builder clearTableSourceType() { + + tableSourceType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.ViewSpec viewSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.ViewSpec, + com.google.cloud.datacatalog.ViewSpec.Builder, + com.google.cloud.datacatalog.ViewSpecOrBuilder> + viewSpecBuilder_; + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public boolean hasViewSpec() { + return viewSpecBuilder_ != null || viewSpec_ != null; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.ViewSpec getViewSpec() { + if (viewSpecBuilder_ == null) { + return viewSpec_ == null + ? com.google.cloud.datacatalog.ViewSpec.getDefaultInstance() + : viewSpec_; + } else { + return viewSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public Builder setViewSpec(com.google.cloud.datacatalog.ViewSpec value) { + if (viewSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewSpec_ = value; + onChanged(); + } else { + viewSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public Builder setViewSpec(com.google.cloud.datacatalog.ViewSpec.Builder builderForValue) { + if (viewSpecBuilder_ == null) { + viewSpec_ = builderForValue.build(); + onChanged(); + } else { + viewSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public Builder mergeViewSpec(com.google.cloud.datacatalog.ViewSpec value) { + if (viewSpecBuilder_ == null) { + if (viewSpec_ != null) { + viewSpec_ = + com.google.cloud.datacatalog.ViewSpec.newBuilder(viewSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + viewSpec_ = value; + } + onChanged(); + } else { + viewSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public Builder clearViewSpec() { + if (viewSpecBuilder_ == null) { + viewSpec_ = null; + onChanged(); + } else { + viewSpec_ = null; + viewSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.ViewSpec.Builder getViewSpecBuilder() { + + onChanged(); + return getViewSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.ViewSpecOrBuilder getViewSpecOrBuilder() { + if (viewSpecBuilder_ != null) { + return viewSpecBuilder_.getMessageOrBuilder(); + } else { + return viewSpec_ == null + ? com.google.cloud.datacatalog.ViewSpec.getDefaultInstance() + : viewSpec_; + } + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * table_source_type is BIGQUERY_VIEW.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.ViewSpec, + com.google.cloud.datacatalog.ViewSpec.Builder, + com.google.cloud.datacatalog.ViewSpecOrBuilder> + getViewSpecFieldBuilder() { + if (viewSpecBuilder_ == null) { + viewSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.ViewSpec, + com.google.cloud.datacatalog.ViewSpec.Builder, + com.google.cloud.datacatalog.ViewSpecOrBuilder>( + getViewSpec(), getParentForChildren(), isClean()); + viewSpec_ = null; + } + return viewSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + private static final com.google.cloud.datacatalog.BigQueryTableSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.BigQueryTableSpec(); + } + + public static com.google.cloud.datacatalog.BigQueryTableSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryTableSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryTableSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.BigQueryTableSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/BigQueryTableSpecOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/BigQueryTableSpecOrBuilder.java new file mode 100644 index 000000000000..138908912115 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/BigQueryTableSpecOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package com.google.cloud.datacatalog; + +public interface BigQueryTableSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The table source type.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + int getTableSourceTypeValue(); + /** + * + * + *
+   * The table source type.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.TableSourceType table_source_type = 1; + */ + com.google.cloud.datacatalog.TableSourceType getTableSourceType(); + + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * table_source_type is BIGQUERY_VIEW.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + boolean hasViewSpec(); + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * table_source_type is BIGQUERY_VIEW.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + com.google.cloud.datacatalog.ViewSpec getViewSpec(); + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * table_source_type is BIGQUERY_VIEW.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.ViewSpec view_spec = 2; + */ + com.google.cloud.datacatalog.ViewSpecOrBuilder getViewSpecOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ColumnSchema.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ColumnSchema.java new file mode 100644 index 000000000000..78d1991d07dd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ColumnSchema.java @@ -0,0 +1,1586 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/schema.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Representation of a column within a schema. Columns could be nested inside
+ * other columns.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.ColumnSchema} + */ +public final class ColumnSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.ColumnSchema) + ColumnSchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColumnSchema.newBuilder() to construct. + private ColumnSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ColumnSchema() { + column_ = ""; + type_ = ""; + description_ = ""; + mode_ = ""; + subcolumns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ColumnSchema( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mode_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + column_ = s; + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + subcolumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + subcolumns_.add( + input.readMessage( + com.google.cloud.datacatalog.ColumnSchema.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000010) != 0)) { + subcolumns_ = java.util.Collections.unmodifiableList(subcolumns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.ColumnSchema.class, + com.google.cloud.datacatalog.ColumnSchema.Builder.class); + } + + private int bitField0_; + public static final int COLUMN_FIELD_NUMBER = 6; + private volatile java.lang.Object column_; + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6; + */ + public java.lang.String getColumn() { + java.lang.Object ref = column_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + column_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6; + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = column_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + column_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1; + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Description of the column.
+   * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of the column.
+   * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODE_FIELD_NUMBER = 3; + private volatile java.lang.Object mode_; + /** + * + * + *
+   * A column's mode indicates whether the values in this column are
+   * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+   * supported, default mode is 'NULLABLE'.
+   * 
+ * + * string mode = 3; + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + * + * + *
+   * A column's mode indicates whether the values in this column are
+   * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+   * supported, default mode is 'NULLABLE'.
+   * 
+ * + * string mode = 3; + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCOLUMNS_FIELD_NUMBER = 7; + private java.util.List subcolumns_; + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public java.util.List getSubcolumnsList() { + return subcolumns_; + } + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public java.util.List + getSubcolumnsOrBuilderList() { + return subcolumns_; + } + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public int getSubcolumnsCount() { + return subcolumns_.size(); + } + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchema getSubcolumns(int index) { + return subcolumns_.get(index); + } + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchemaOrBuilder getSubcolumnsOrBuilder(int index) { + return subcolumns_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getModeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mode_); + } + if (!getColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, column_); + } + for (int i = 0; i < subcolumns_.size(); i++) { + output.writeMessage(7, subcolumns_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getModeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mode_); + } + if (!getColumnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, column_); + } + for (int i = 0; i < subcolumns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, subcolumns_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.ColumnSchema)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.ColumnSchema other = + (com.google.cloud.datacatalog.ColumnSchema) obj; + + if (!getColumn().equals(other.getColumn())) return false; + if (!getType().equals(other.getType())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSubcolumnsList().equals(other.getSubcolumnsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumn().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + if (getSubcolumnsCount() > 0) { + hash = (37 * hash) + SUBCOLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getSubcolumnsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.ColumnSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.ColumnSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Representation of a column within a schema. Columns could be nested inside
+   * other columns.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.ColumnSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.ColumnSchema) + com.google.cloud.datacatalog.ColumnSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.ColumnSchema.class, + com.google.cloud.datacatalog.ColumnSchema.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.ColumnSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSubcolumnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + column_ = ""; + + type_ = ""; + + description_ = ""; + + mode_ = ""; + + if (subcolumnsBuilder_ == null) { + subcolumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + subcolumnsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.ColumnSchema getDefaultInstanceForType() { + return com.google.cloud.datacatalog.ColumnSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.ColumnSchema build() { + com.google.cloud.datacatalog.ColumnSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.ColumnSchema buildPartial() { + com.google.cloud.datacatalog.ColumnSchema result = + new com.google.cloud.datacatalog.ColumnSchema(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.column_ = column_; + result.type_ = type_; + result.description_ = description_; + result.mode_ = mode_; + if (subcolumnsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + subcolumns_ = java.util.Collections.unmodifiableList(subcolumns_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.subcolumns_ = subcolumns_; + } else { + result.subcolumns_ = subcolumnsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.ColumnSchema) { + return mergeFrom((com.google.cloud.datacatalog.ColumnSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.ColumnSchema other) { + if (other == com.google.cloud.datacatalog.ColumnSchema.getDefaultInstance()) return this; + if (!other.getColumn().isEmpty()) { + column_ = other.column_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + onChanged(); + } + if (subcolumnsBuilder_ == null) { + if (!other.subcolumns_.isEmpty()) { + if (subcolumns_.isEmpty()) { + subcolumns_ = other.subcolumns_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSubcolumnsIsMutable(); + subcolumns_.addAll(other.subcolumns_); + } + onChanged(); + } + } else { + if (!other.subcolumns_.isEmpty()) { + if (subcolumnsBuilder_.isEmpty()) { + subcolumnsBuilder_.dispose(); + subcolumnsBuilder_ = null; + subcolumns_ = other.subcolumns_; + bitField0_ = (bitField0_ & ~0x00000010); + subcolumnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubcolumnsFieldBuilder() + : null; + } else { + subcolumnsBuilder_.addAllMessages(other.subcolumns_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.ColumnSchema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.ColumnSchema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object column_ = ""; + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6; + */ + public java.lang.String getColumn() { + java.lang.Object ref = column_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + column_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6; + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = column_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + column_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6; + */ + public Builder setColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + column_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6; + */ + public Builder clearColumn() { + + column_ = getDefaultInstance().getColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6; + */ + public Builder setColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + column_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1; + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1; + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1; + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1; + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the column.
+     * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of the column.
+     * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of the column.
+     * 
+ * + * string description = 2; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the column.
+     * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the column.
+     * 
+ * + * string description = 2; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + /** + * + * + *
+     * A column's mode indicates whether the values in this column are
+     * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+     * supported, default mode is 'NULLABLE'.
+     * 
+ * + * string mode = 3; + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A column's mode indicates whether the values in this column are
+     * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+     * supported, default mode is 'NULLABLE'.
+     * 
+ * + * string mode = 3; + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A column's mode indicates whether the values in this column are
+     * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+     * supported, default mode is 'NULLABLE'.
+     * 
+ * + * string mode = 3; + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A column's mode indicates whether the values in this column are
+     * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+     * supported, default mode is 'NULLABLE'.
+     * 
+ * + * string mode = 3; + */ + public Builder clearMode() { + + mode_ = getDefaultInstance().getMode(); + onChanged(); + return this; + } + /** + * + * + *
+     * A column's mode indicates whether the values in this column are
+     * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+     * supported, default mode is 'NULLABLE'.
+     * 
+ * + * string mode = 3; + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mode_ = value; + onChanged(); + return this; + } + + private java.util.List subcolumns_ = + java.util.Collections.emptyList(); + + private void ensureSubcolumnsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + subcolumns_ = + new java.util.ArrayList(subcolumns_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.ColumnSchema, + com.google.cloud.datacatalog.ColumnSchema.Builder, + com.google.cloud.datacatalog.ColumnSchemaOrBuilder> + subcolumnsBuilder_; + + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public java.util.List getSubcolumnsList() { + if (subcolumnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subcolumns_); + } else { + return subcolumnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public int getSubcolumnsCount() { + if (subcolumnsBuilder_ == null) { + return subcolumns_.size(); + } else { + return subcolumnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchema getSubcolumns(int index) { + if (subcolumnsBuilder_ == null) { + return subcolumns_.get(index); + } else { + return subcolumnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder setSubcolumns(int index, com.google.cloud.datacatalog.ColumnSchema value) { + if (subcolumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubcolumnsIsMutable(); + subcolumns_.set(index, value); + onChanged(); + } else { + subcolumnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder setSubcolumns( + int index, com.google.cloud.datacatalog.ColumnSchema.Builder builderForValue) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.set(index, builderForValue.build()); + onChanged(); + } else { + subcolumnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder addSubcolumns(com.google.cloud.datacatalog.ColumnSchema value) { + if (subcolumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubcolumnsIsMutable(); + subcolumns_.add(value); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder addSubcolumns(int index, com.google.cloud.datacatalog.ColumnSchema value) { + if (subcolumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubcolumnsIsMutable(); + subcolumns_.add(index, value); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder addSubcolumns( + com.google.cloud.datacatalog.ColumnSchema.Builder builderForValue) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.add(builderForValue.build()); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder addSubcolumns( + int index, com.google.cloud.datacatalog.ColumnSchema.Builder builderForValue) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.add(index, builderForValue.build()); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder addAllSubcolumns( + java.lang.Iterable values) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subcolumns_); + onChanged(); + } else { + subcolumnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder clearSubcolumns() { + if (subcolumnsBuilder_ == null) { + subcolumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + subcolumnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public Builder removeSubcolumns(int index) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.remove(index); + onChanged(); + } else { + subcolumnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchema.Builder getSubcolumnsBuilder(int index) { + return getSubcolumnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchemaOrBuilder getSubcolumnsOrBuilder(int index) { + if (subcolumnsBuilder_ == null) { + return subcolumns_.get(index); + } else { + return subcolumnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public java.util.List + getSubcolumnsOrBuilderList() { + if (subcolumnsBuilder_ != null) { + return subcolumnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subcolumns_); + } + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchema.Builder addSubcolumnsBuilder() { + return getSubcolumnsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public com.google.cloud.datacatalog.ColumnSchema.Builder addSubcolumnsBuilder(int index) { + return getSubcolumnsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Schema of sub-columns.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + public java.util.List + getSubcolumnsBuilderList() { + return getSubcolumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.ColumnSchema, + com.google.cloud.datacatalog.ColumnSchema.Builder, + com.google.cloud.datacatalog.ColumnSchemaOrBuilder> + getSubcolumnsFieldBuilder() { + if (subcolumnsBuilder_ == null) { + subcolumnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.ColumnSchema, + com.google.cloud.datacatalog.ColumnSchema.Builder, + com.google.cloud.datacatalog.ColumnSchemaOrBuilder>( + subcolumns_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + subcolumns_ = null; + } + return subcolumnsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.ColumnSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.ColumnSchema) + private static final com.google.cloud.datacatalog.ColumnSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.ColumnSchema(); + } + + public static com.google.cloud.datacatalog.ColumnSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColumnSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColumnSchema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.ColumnSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ColumnSchemaOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ColumnSchemaOrBuilder.java new file mode 100644 index 000000000000..9d6f2419c7cb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ColumnSchemaOrBuilder.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/schema.proto + +package com.google.cloud.datacatalog; + +public interface ColumnSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.ColumnSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6; + */ + java.lang.String getColumn(); + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6; + */ + com.google.protobuf.ByteString getColumnBytes(); + + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1; + */ + java.lang.String getType(); + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1; + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Description of the column.
+   * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the column.
+   * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * A column's mode indicates whether the values in this column are
+   * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+   * supported, default mode is 'NULLABLE'.
+   * 
+ * + * string mode = 3; + */ + java.lang.String getMode(); + /** + * + * + *
+   * A column's mode indicates whether the values in this column are
+   * required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are
+   * supported, default mode is 'NULLABLE'.
+   * 
+ * + * string mode = 3; + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + java.util.List getSubcolumnsList(); + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + com.google.cloud.datacatalog.ColumnSchema getSubcolumns(int index); + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + int getSubcolumnsCount(); + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + java.util.List + getSubcolumnsOrBuilderList(); + /** + * + * + *
+   * Schema of sub-columns.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema subcolumns = 7; + */ + com.google.cloud.datacatalog.ColumnSchemaOrBuilder getSubcolumnsOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Datacatalog.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Datacatalog.java new file mode 100644 index 000000000000..bf854fab279d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Datacatalog.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package com.google.cloud.datacatalog; + +public final class Datacatalog { + private Datacatalog() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_Entry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_Entry_fieldAccessorTable; + + 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/datacatalog/v1beta1/datac" + + "atalog.proto\022 google.cloud.datacatalog.v" + + "1beta1\032\034google/api/annotations.proto\032-go" + + "ogle/cloud/datacatalog/v1beta1/schema.pr" + + "oto\0321google/cloud/datacatalog/v1beta1/ta" + + "ble_spec.proto\0321google/cloud/datacatalog" + + "/v1beta1/timestamps.proto\"V\n\022LookupEntry" + + "Request\022\031\n\017linked_resource\030\001 \001(\tH\000\022\026\n\014sq" + + "l_resource\030\003 \001(\tH\000B\r\n\013target_name\"\205\003\n\005En" + + "try\022\014\n\004name\030\001 \001(\t\022\027\n\017linked_resource\030\t \001" + + "(\t\0229\n\004type\030\002 \001(\0162+.google.cloud.datacata" + + "log.v1beta1.EntryType\022R\n\023bigquery_table_" + + "spec\030\014 \001(\01323.google.cloud.datacatalog.v1" + + "beta1.BigQueryTableSpecH\000\022\024\n\014display_nam" + + "e\030\003 \001(\t\022\023\n\013description\030\004 \001(\t\0228\n\006schema\030\005" + + " \001(\0132(.google.cloud.datacatalog.v1beta1." + + "Schema\022T\n\030source_system_timestamps\030\007 \001(\013" + + "22.google.cloud.datacatalog.v1beta1.Syst" + + "emTimestampsB\013\n\ttype_spec*C\n\tEntryType\022\032" + + "\n\026ENTRY_TYPE_UNSPECIFIED\020\000\022\t\n\005TABLE\020\002\022\017\n" + + "\013DATA_STREAM\020\0032\235\001\n\013DataCatalog\022\215\001\n\013Looku" + + "pEntry\0224.google.cloud.datacatalog.v1beta" + + "1.LookupEntryRequest\032\'.google.cloud.data" + + "catalog.v1beta1.Entry\"\037\202\323\344\223\002\031\022\027/v1beta1/" + + "entries:lookupBp\n\034com.google.cloud.datac" + + "atalogP\001ZKgoogle.golang.org/genproto/goo" + + "gleapis/cloud/datacatalog/v1beta1;dataca" + + "talog\370\001\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.cloud.datacatalog.SchemaOuterClass.getDescriptor(), + com.google.cloud.datacatalog.TableSpec.getDescriptor(), + com.google.cloud.datacatalog.Timestamps.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_descriptor, + new java.lang.String[] { + "LinkedResource", "SqlResource", "TargetName", + }); + internal_static_google_cloud_datacatalog_v1beta1_Entry_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1beta1_Entry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_Entry_descriptor, + new java.lang.String[] { + "Name", + "LinkedResource", + "Type", + "BigqueryTableSpec", + "DisplayName", + "Description", + "Schema", + "SourceSystemTimestamps", + "TypeSpec", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.cloud.datacatalog.SchemaOuterClass.getDescriptor(); + com.google.cloud.datacatalog.TableSpec.getDescriptor(); + com.google.cloud.datacatalog.Timestamps.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Entry.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Entry.java new file mode 100644 index 000000000000..f341ca77ee41 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Entry.java @@ -0,0 +1,2200 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Entry Metadata.
+ * A Data Catalog Entry resource represents another resource in Google
+ * Cloud Platform, such as a BigQuery Dataset or a Pub/Sub Topic. Clients can
+ * use the `linked_resource` field in the Entry resource to refer to the
+ * original resource id of the source system.
+ * An Entry resource contains resource details, such as its schema.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.Entry} + */ +public final class Entry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.Entry) + EntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entry.newBuilder() to construct. + private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entry() { + name_ = ""; + linkedResource_ = ""; + type_ = 0; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Entry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 42: + { + com.google.cloud.datacatalog.Schema.Builder subBuilder = null; + if (schema_ != null) { + subBuilder = schema_.toBuilder(); + } + schema_ = + input.readMessage( + com.google.cloud.datacatalog.Schema.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(schema_); + schema_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.datacatalog.SystemTimestamps.Builder subBuilder = null; + if (sourceSystemTimestamps_ != null) { + subBuilder = sourceSystemTimestamps_.toBuilder(); + } + sourceSystemTimestamps_ = + input.readMessage( + com.google.cloud.datacatalog.SystemTimestamps.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceSystemTimestamps_); + sourceSystemTimestamps_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + linkedResource_ = s; + break; + } + case 98: + { + com.google.cloud.datacatalog.BigQueryTableSpec.Builder subBuilder = null; + if (typeSpecCase_ == 12) { + subBuilder = + ((com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_).toBuilder(); + } + typeSpec_ = + input.readMessage( + com.google.cloud.datacatalog.BigQueryTableSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_); + typeSpec_ = subBuilder.buildPartial(); + } + typeSpecCase_ = 12; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.Entry.class, + com.google.cloud.datacatalog.Entry.Builder.class); + } + + private int typeSpecCase_ = 0; + private java.lang.Object typeSpec_; + + public enum TypeSpecCase implements com.google.protobuf.Internal.EnumLite { + BIGQUERY_TABLE_SPEC(12), + TYPESPEC_NOT_SET(0); + private final int value; + + private TypeSpecCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static TypeSpecCase valueOf(int value) { + return forNumber(value); + } + + public static TypeSpecCase forNumber(int value) { + switch (value) { + case 12: + return BIGQUERY_TABLE_SPEC; + case 0: + return TYPESPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeSpecCase getTypeSpecCase() { + return TypeSpecCase.forNumber(typeSpecCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The Data Catalog resource name of the entry in URL format. For
+   * example,
+   * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Data Catalog resource name of the entry in URL format. For
+   * example,
+   * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINKED_RESOURCE_FIELD_NUMBER = 9; + private volatile java.lang.Object linkedResource_; + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Data Catalog supports resources from select Google Cloud Platform systems.
+   * `linked_resource` is the full name of the Google Cloud Platform resource.
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * 
+ * + * string linked_resource = 9; + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = linkedResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedResource_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Data Catalog supports resources from select Google Cloud Platform systems.
+   * `linked_resource` is the full name of the Google Cloud Platform resource.
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * 
+ * + * string linked_resource = 9; + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = linkedResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Type of entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type of entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public com.google.cloud.datacatalog.EntryType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.EntryType result = + com.google.cloud.datacatalog.EntryType.valueOf(type_); + return result == null ? com.google.cloud.datacatalog.EntryType.UNRECOGNIZED : result; + } + + public static final int BIGQUERY_TABLE_SPEC_FIELD_NUMBER = 12; + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type TABLE.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public boolean hasBigqueryTableSpec() { + return typeSpecCase_ == 12; + } + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type TABLE.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.BigQueryTableSpec getBigqueryTableSpec() { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type TABLE.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder getBigqueryTableSpecOrBuilder() { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display information such as title and description.
+   * A short name to identify the entry, for example,
+   * "Analytics Data - Jan 2011".
+   * 
+ * + * string display_name = 3; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display information such as title and description.
+   * A short name to identify the entry, for example,
+   * "Analytics Data - Jan 2011".
+   * 
+ * + * string display_name = 3; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents.
+   * 
+ * + * string description = 4; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents.
+   * 
+ * + * string description = 4; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 5; + private com.google.cloud.datacatalog.Schema schema_; + /** + * + * + *
+   * Schema of the entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public boolean hasSchema() { + return schema_ != null; + } + /** + * + * + *
+   * Schema of the entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.Schema getSchema() { + return schema_ == null ? com.google.cloud.datacatalog.Schema.getDefaultInstance() : schema_; + } + /** + * + * + *
+   * Schema of the entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.SchemaOrBuilder getSchemaOrBuilder() { + return getSchema(); + } + + public static final int SOURCE_SYSTEM_TIMESTAMPS_FIELD_NUMBER = 7; + private com.google.cloud.datacatalog.SystemTimestamps sourceSystemTimestamps_; + /** + * + * + *
+   * Timestamps about the underlying Google Cloud Platform resource -- not about
+   * this Data Catalog Entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public boolean hasSourceSystemTimestamps() { + return sourceSystemTimestamps_ != null; + } + /** + * + * + *
+   * Timestamps about the underlying Google Cloud Platform resource -- not about
+   * this Data Catalog Entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.SystemTimestamps getSourceSystemTimestamps() { + return sourceSystemTimestamps_ == null + ? com.google.cloud.datacatalog.SystemTimestamps.getDefaultInstance() + : sourceSystemTimestamps_; + } + /** + * + * + *
+   * Timestamps about the underlying Google Cloud Platform resource -- not about
+   * this Data Catalog Entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.SystemTimestampsOrBuilder + getSourceSystemTimestampsOrBuilder() { + return getSourceSystemTimestamps(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != com.google.cloud.datacatalog.EntryType.ENTRY_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (schema_ != null) { + output.writeMessage(5, getSchema()); + } + if (sourceSystemTimestamps_ != null) { + output.writeMessage(7, getSourceSystemTimestamps()); + } + if (!getLinkedResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, linkedResource_); + } + if (typeSpecCase_ == 12) { + output.writeMessage(12, (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ != com.google.cloud.datacatalog.EntryType.ENTRY_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (schema_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSchema()); + } + if (sourceSystemTimestamps_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSourceSystemTimestamps()); + } + if (!getLinkedResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, linkedResource_); + } + if (typeSpecCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.Entry)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.Entry other = (com.google.cloud.datacatalog.Entry) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLinkedResource().equals(other.getLinkedResource())) return false; + if (type_ != other.type_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (hasSourceSystemTimestamps() != other.hasSourceSystemTimestamps()) return false; + if (hasSourceSystemTimestamps()) { + if (!getSourceSystemTimestamps().equals(other.getSourceSystemTimestamps())) return false; + } + if (!getTypeSpecCase().equals(other.getTypeSpecCase())) return false; + switch (typeSpecCase_) { + case 12: + if (!getBigqueryTableSpec().equals(other.getBigqueryTableSpec())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LINKED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getLinkedResource().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + if (hasSourceSystemTimestamps()) { + hash = (37 * hash) + SOURCE_SYSTEM_TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getSourceSystemTimestamps().hashCode(); + } + switch (typeSpecCase_) { + case 12: + hash = (37 * hash) + BIGQUERY_TABLE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryTableSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.Entry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.Entry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Entry parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.Entry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Entry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.Entry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Entry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.Entry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Entry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.Entry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Entry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.Entry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.Entry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Entry Metadata.
+   * A Data Catalog Entry resource represents another resource in Google
+   * Cloud Platform, such as a BigQuery Dataset or a Pub/Sub Topic. Clients can
+   * use the `linked_resource` field in the Entry resource to refer to the
+   * original resource id of the source system.
+   * An Entry resource contains resource details, such as its schema.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.Entry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.Entry) + com.google.cloud.datacatalog.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.Entry.class, + com.google.cloud.datacatalog.Entry.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.Entry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + linkedResource_ = ""; + + type_ = 0; + + displayName_ = ""; + + description_ = ""; + + if (schemaBuilder_ == null) { + schema_ = null; + } else { + schema_ = null; + schemaBuilder_ = null; + } + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestamps_ = null; + } else { + sourceSystemTimestamps_ = null; + sourceSystemTimestampsBuilder_ = null; + } + typeSpecCase_ = 0; + typeSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_Entry_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.Entry getDefaultInstanceForType() { + return com.google.cloud.datacatalog.Entry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.Entry build() { + com.google.cloud.datacatalog.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.Entry buildPartial() { + com.google.cloud.datacatalog.Entry result = new com.google.cloud.datacatalog.Entry(this); + result.name_ = name_; + result.linkedResource_ = linkedResource_; + result.type_ = type_; + if (typeSpecCase_ == 12) { + if (bigqueryTableSpecBuilder_ == null) { + result.typeSpec_ = typeSpec_; + } else { + result.typeSpec_ = bigqueryTableSpecBuilder_.build(); + } + } + result.displayName_ = displayName_; + result.description_ = description_; + if (schemaBuilder_ == null) { + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + if (sourceSystemTimestampsBuilder_ == null) { + result.sourceSystemTimestamps_ = sourceSystemTimestamps_; + } else { + result.sourceSystemTimestamps_ = sourceSystemTimestampsBuilder_.build(); + } + result.typeSpecCase_ = typeSpecCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.Entry) { + return mergeFrom((com.google.cloud.datacatalog.Entry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.Entry other) { + if (other == com.google.cloud.datacatalog.Entry.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLinkedResource().isEmpty()) { + linkedResource_ = other.linkedResource_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (other.hasSourceSystemTimestamps()) { + mergeSourceSystemTimestamps(other.getSourceSystemTimestamps()); + } + switch (other.getTypeSpecCase()) { + case BIGQUERY_TABLE_SPEC: + { + mergeBigqueryTableSpec(other.getBigqueryTableSpec()); + break; + } + case TYPESPEC_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.Entry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.Entry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int typeSpecCase_ = 0; + private java.lang.Object typeSpec_; + + public TypeSpecCase getTypeSpecCase() { + return TypeSpecCase.forNumber(typeSpecCase_); + } + + public Builder clearTypeSpec() { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The Data Catalog resource name of the entry in URL format. For
+     * example,
+     * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the entry in URL format. For
+     * example,
+     * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the entry in URL format. For
+     * example,
+     * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the entry in URL format. For
+     * example,
+     * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the entry in URL format. For
+     * example,
+     * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object linkedResource_ = ""; + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Data Catalog supports resources from select Google Cloud Platform systems.
+     * `linked_resource` is the full name of the Google Cloud Platform resource.
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * 
+ * + * string linked_resource = 9; + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = linkedResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Data Catalog supports resources from select Google Cloud Platform systems.
+     * `linked_resource` is the full name of the Google Cloud Platform resource.
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * 
+ * + * string linked_resource = 9; + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = linkedResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Data Catalog supports resources from select Google Cloud Platform systems.
+     * `linked_resource` is the full name of the Google Cloud Platform resource.
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * 
+ * + * string linked_resource = 9; + */ + public Builder setLinkedResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + linkedResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Data Catalog supports resources from select Google Cloud Platform systems.
+     * `linked_resource` is the full name of the Google Cloud Platform resource.
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * 
+ * + * string linked_resource = 9; + */ + public Builder clearLinkedResource() { + + linkedResource_ = getDefaultInstance().getLinkedResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Data Catalog supports resources from select Google Cloud Platform systems.
+     * `linked_resource` is the full name of the Google Cloud Platform resource.
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * 
+ * + * string linked_resource = 9; + */ + public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + linkedResource_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Type of entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public com.google.cloud.datacatalog.EntryType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.EntryType result = + com.google.cloud.datacatalog.EntryType.valueOf(type_); + return result == null ? com.google.cloud.datacatalog.EntryType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Type of entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public Builder setType(com.google.cloud.datacatalog.EntryType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.BigQueryTableSpec, + com.google.cloud.datacatalog.BigQueryTableSpec.Builder, + com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder> + bigqueryTableSpecBuilder_; + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public boolean hasBigqueryTableSpec() { + return typeSpecCase_ == 12; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.BigQueryTableSpec getBigqueryTableSpec() { + if (bigqueryTableSpecBuilder_ == null) { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } else { + if (typeSpecCase_ == 12) { + return bigqueryTableSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder setBigqueryTableSpec(com.google.cloud.datacatalog.BigQueryTableSpec value) { + if (bigqueryTableSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSpec_ = value; + onChanged(); + } else { + bigqueryTableSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 12; + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder setBigqueryTableSpec( + com.google.cloud.datacatalog.BigQueryTableSpec.Builder builderForValue) { + if (bigqueryTableSpecBuilder_ == null) { + typeSpec_ = builderForValue.build(); + onChanged(); + } else { + bigqueryTableSpecBuilder_.setMessage(builderForValue.build()); + } + typeSpecCase_ = 12; + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder mergeBigqueryTableSpec(com.google.cloud.datacatalog.BigQueryTableSpec value) { + if (bigqueryTableSpecBuilder_ == null) { + if (typeSpecCase_ == 12 + && typeSpec_ != com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance()) { + typeSpec_ = + com.google.cloud.datacatalog.BigQueryTableSpec.newBuilder( + (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + typeSpec_ = value; + } + onChanged(); + } else { + if (typeSpecCase_ == 12) { + bigqueryTableSpecBuilder_.mergeFrom(value); + } + bigqueryTableSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 12; + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder clearBigqueryTableSpec() { + if (bigqueryTableSpecBuilder_ == null) { + if (typeSpecCase_ == 12) { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + } + } else { + if (typeSpecCase_ == 12) { + typeSpecCase_ = 0; + typeSpec_ = null; + } + bigqueryTableSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.BigQueryTableSpec.Builder getBigqueryTableSpecBuilder() { + return getBigqueryTableSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder getBigqueryTableSpecOrBuilder() { + if ((typeSpecCase_ == 12) && (bigqueryTableSpecBuilder_ != null)) { + return bigqueryTableSpecBuilder_.getMessageOrBuilder(); + } else { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type TABLE.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.BigQueryTableSpec, + com.google.cloud.datacatalog.BigQueryTableSpec.Builder, + com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder> + getBigqueryTableSpecFieldBuilder() { + if (bigqueryTableSpecBuilder_ == null) { + if (!(typeSpecCase_ == 12)) { + typeSpec_ = com.google.cloud.datacatalog.BigQueryTableSpec.getDefaultInstance(); + } + bigqueryTableSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.BigQueryTableSpec, + com.google.cloud.datacatalog.BigQueryTableSpec.Builder, + com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder>( + (com.google.cloud.datacatalog.BigQueryTableSpec) typeSpec_, + getParentForChildren(), + isClean()); + typeSpec_ = null; + } + typeSpecCase_ = 12; + onChanged(); + ; + return bigqueryTableSpecBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display information such as title and description.
+     * A short name to identify the entry, for example,
+     * "Analytics Data - Jan 2011".
+     * 
+ * + * string display_name = 3; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display information such as title and description.
+     * A short name to identify the entry, for example,
+     * "Analytics Data - Jan 2011".
+     * 
+ * + * string display_name = 3; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display information such as title and description.
+     * A short name to identify the entry, for example,
+     * "Analytics Data - Jan 2011".
+     * 
+ * + * string display_name = 3; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display information such as title and description.
+     * A short name to identify the entry, for example,
+     * "Analytics Data - Jan 2011".
+     * 
+ * + * string display_name = 3; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display information such as title and description.
+     * A short name to identify the entry, for example,
+     * "Analytics Data - Jan 2011".
+     * 
+ * + * string display_name = 3; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents.
+     * 
+ * + * string description = 4; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents.
+     * 
+ * + * string description = 4; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents.
+     * 
+ * + * string description = 4; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents.
+     * 
+ * + * string description = 4; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents.
+     * 
+ * + * string description = 4; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.Schema schema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.Schema, + com.google.cloud.datacatalog.Schema.Builder, + com.google.cloud.datacatalog.SchemaOrBuilder> + schemaBuilder_; + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public boolean hasSchema() { + return schemaBuilder_ != null || schema_ != null; + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null ? com.google.cloud.datacatalog.Schema.getDefaultInstance() : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public Builder setSchema(com.google.cloud.datacatalog.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + schemaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public Builder setSchema(com.google.cloud.datacatalog.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public Builder mergeSchema(com.google.cloud.datacatalog.Schema value) { + if (schemaBuilder_ == null) { + if (schema_ != null) { + schema_ = + com.google.cloud.datacatalog.Schema.newBuilder(schema_) + .mergeFrom(value) + .buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + schemaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = null; + onChanged(); + } else { + schema_ = null; + schemaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.Schema.Builder getSchemaBuilder() { + + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null ? com.google.cloud.datacatalog.Schema.getDefaultInstance() : schema_; + } + } + /** + * + * + *
+     * Schema of the entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.Schema, + com.google.cloud.datacatalog.Schema.Builder, + com.google.cloud.datacatalog.SchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.Schema, + com.google.cloud.datacatalog.Schema.Builder, + com.google.cloud.datacatalog.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private com.google.cloud.datacatalog.SystemTimestamps sourceSystemTimestamps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.SystemTimestamps, + com.google.cloud.datacatalog.SystemTimestamps.Builder, + com.google.cloud.datacatalog.SystemTimestampsOrBuilder> + sourceSystemTimestampsBuilder_; + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public boolean hasSourceSystemTimestamps() { + return sourceSystemTimestampsBuilder_ != null || sourceSystemTimestamps_ != null; + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.SystemTimestamps getSourceSystemTimestamps() { + if (sourceSystemTimestampsBuilder_ == null) { + return sourceSystemTimestamps_ == null + ? com.google.cloud.datacatalog.SystemTimestamps.getDefaultInstance() + : sourceSystemTimestamps_; + } else { + return sourceSystemTimestampsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder setSourceSystemTimestamps(com.google.cloud.datacatalog.SystemTimestamps value) { + if (sourceSystemTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceSystemTimestamps_ = value; + onChanged(); + } else { + sourceSystemTimestampsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder setSourceSystemTimestamps( + com.google.cloud.datacatalog.SystemTimestamps.Builder builderForValue) { + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestamps_ = builderForValue.build(); + onChanged(); + } else { + sourceSystemTimestampsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder mergeSourceSystemTimestamps( + com.google.cloud.datacatalog.SystemTimestamps value) { + if (sourceSystemTimestampsBuilder_ == null) { + if (sourceSystemTimestamps_ != null) { + sourceSystemTimestamps_ = + com.google.cloud.datacatalog.SystemTimestamps.newBuilder(sourceSystemTimestamps_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceSystemTimestamps_ = value; + } + onChanged(); + } else { + sourceSystemTimestampsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder clearSourceSystemTimestamps() { + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestamps_ = null; + onChanged(); + } else { + sourceSystemTimestamps_ = null; + sourceSystemTimestampsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.SystemTimestamps.Builder + getSourceSystemTimestampsBuilder() { + + onChanged(); + return getSourceSystemTimestampsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.SystemTimestampsOrBuilder + getSourceSystemTimestampsOrBuilder() { + if (sourceSystemTimestampsBuilder_ != null) { + return sourceSystemTimestampsBuilder_.getMessageOrBuilder(); + } else { + return sourceSystemTimestamps_ == null + ? com.google.cloud.datacatalog.SystemTimestamps.getDefaultInstance() + : sourceSystemTimestamps_; + } + } + /** + * + * + *
+     * Timestamps about the underlying Google Cloud Platform resource -- not about
+     * this Data Catalog Entry.
+     * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.SystemTimestamps, + com.google.cloud.datacatalog.SystemTimestamps.Builder, + com.google.cloud.datacatalog.SystemTimestampsOrBuilder> + getSourceSystemTimestampsFieldBuilder() { + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestampsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.SystemTimestamps, + com.google.cloud.datacatalog.SystemTimestamps.Builder, + com.google.cloud.datacatalog.SystemTimestampsOrBuilder>( + getSourceSystemTimestamps(), getParentForChildren(), isClean()); + sourceSystemTimestamps_ = null; + } + return sourceSystemTimestampsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.Entry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.Entry) + private static final com.google.cloud.datacatalog.Entry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.Entry(); + } + + public static com.google.cloud.datacatalog.Entry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entry(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.Entry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryName.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryName.java new file mode 100644 index 000000000000..8bf5bc3868f5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2018 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 + * + * http://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. + */ + +package com.google.cloud.datacatalog; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class EntryName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String entryGroup; + private final String entry; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public String getEntry() { + return entry; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private EntryName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + entryGroup = Preconditions.checkNotNull(builder.getEntryGroup()); + entry = Preconditions.checkNotNull(builder.getEntry()); + } + + public static EntryName of(String project, String location, String entryGroup, String entry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .setEntry(entry) + .build(); + } + + public static String format(String project, String location, String entryGroup, String entry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .setEntry(entry) + .build() + .toString(); + } + + public static EntryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "EntryName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("entry_group"), + matchMap.get("entry")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (EntryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("entryGroup", entryGroup); + fieldMapBuilder.put("entry", entry); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "entry_group", entryGroup, "entry", entry); + } + + /** Builder for EntryName. */ + public static class Builder { + + private String project; + private String location; + private String entryGroup; + private String entry; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public String getEntry() { + return entry; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEntryGroup(String entryGroup) { + this.entryGroup = entryGroup; + return this; + } + + public Builder setEntry(String entry) { + this.entry = entry; + return this; + } + + private Builder() {} + + private Builder(EntryName entryName) { + project = entryName.project; + location = entryName.location; + entryGroup = entryName.entryGroup; + entry = entryName.entry; + } + + public EntryName build() { + return new EntryName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof EntryName) { + EntryName that = (EntryName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.entryGroup.equals(that.entryGroup)) + && (this.entry.equals(that.entry)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= entryGroup.hashCode(); + h *= 1000003; + h ^= entry.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryOrBuilder.java new file mode 100644 index 000000000000..936947478dad --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryOrBuilder.java @@ -0,0 +1,236 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package com.google.cloud.datacatalog; + +public interface EntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The Data Catalog resource name of the entry in URL format. For
+   * example,
+   * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The Data Catalog resource name of the entry in URL format. For
+   * example,
+   * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Data Catalog supports resources from select Google Cloud Platform systems.
+   * `linked_resource` is the full name of the Google Cloud Platform resource.
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * 
+ * + * string linked_resource = 9; + */ + java.lang.String getLinkedResource(); + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Data Catalog supports resources from select Google Cloud Platform systems.
+   * `linked_resource` is the full name of the Google Cloud Platform resource.
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * 
+ * + * string linked_resource = 9; + */ + com.google.protobuf.ByteString getLinkedResourceBytes(); + + /** + * + * + *
+   * Type of entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + int getTypeValue(); + /** + * + * + *
+   * Type of entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.EntryType type = 2; + */ + com.google.cloud.datacatalog.EntryType getType(); + + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type TABLE.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + boolean hasBigqueryTableSpec(); + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type TABLE.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + com.google.cloud.datacatalog.BigQueryTableSpec getBigqueryTableSpec(); + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type TABLE.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.BigQueryTableSpec bigquery_table_spec = 12; + */ + com.google.cloud.datacatalog.BigQueryTableSpecOrBuilder getBigqueryTableSpecOrBuilder(); + + /** + * + * + *
+   * Display information such as title and description.
+   * A short name to identify the entry, for example,
+   * "Analytics Data - Jan 2011".
+   * 
+ * + * string display_name = 3; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display information such as title and description.
+   * A short name to identify the entry, for example,
+   * "Analytics Data - Jan 2011".
+   * 
+ * + * string display_name = 3; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents.
+   * 
+ * + * string description = 4; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents.
+   * 
+ * + * string description = 4; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Schema of the entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + boolean hasSchema(); + /** + * + * + *
+   * Schema of the entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + com.google.cloud.datacatalog.Schema getSchema(); + /** + * + * + *
+   * Schema of the entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.Schema schema = 5; + */ + com.google.cloud.datacatalog.SchemaOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * Timestamps about the underlying Google Cloud Platform resource -- not about
+   * this Data Catalog Entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + boolean hasSourceSystemTimestamps(); + /** + * + * + *
+   * Timestamps about the underlying Google Cloud Platform resource -- not about
+   * this Data Catalog Entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + com.google.cloud.datacatalog.SystemTimestamps getSourceSystemTimestamps(); + /** + * + * + *
+   * Timestamps about the underlying Google Cloud Platform resource -- not about
+   * this Data Catalog Entry.
+   * 
+ * + * .google.cloud.datacatalog.v1beta1.SystemTimestamps source_system_timestamps = 7; + */ + com.google.cloud.datacatalog.SystemTimestampsOrBuilder getSourceSystemTimestampsOrBuilder(); + + public com.google.cloud.datacatalog.Entry.TypeSpecCase getTypeSpecCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryType.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryType.java new file mode 100644 index 000000000000..7bec11c5e25f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/EntryType.java @@ -0,0 +1,151 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Entry resources in Cloud Data Catalog can be of different types e.g. BigQuery
+ * Table entry is of type 'TABLE'. This enum describes all the possible types
+ * Cloud Data Catalog contains.
+ * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.v1beta1.EntryType} + */ +public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unknown type
+   * 
+ * + * ENTRY_TYPE_UNSPECIFIED = 0; + */ + ENTRY_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * The type of entry that has a GoogleSQL schema, including logical views.
+   * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + * + * + *
+   * An entry type which is used for streaming entries. Example - Pub/Sub.
+   * 
+ * + * DATA_STREAM = 3; + */ + DATA_STREAM(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unknown type
+   * 
+ * + * ENTRY_TYPE_UNSPECIFIED = 0; + */ + public static final int ENTRY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The type of entry that has a GoogleSQL schema, including logical views.
+   * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + * + * + *
+   * An entry type which is used for streaming entries. Example - Pub/Sub.
+   * 
+ * + * DATA_STREAM = 3; + */ + public static final int DATA_STREAM_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static EntryType valueOf(int value) { + return forNumber(value); + } + + public static EntryType forNumber(int value) { + switch (value) { + case 0: + return ENTRY_TYPE_UNSPECIFIED; + case 2: + return TABLE; + case 3: + return DATA_STREAM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EntryType findValueByNumber(int number) { + return EntryType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datacatalog.Datacatalog.getDescriptor().getEnumTypes().get(0); + } + + private static final EntryType[] VALUES = values(); + + public static EntryType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EntryType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1beta1.EntryType) +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LocationName.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LocationName.java new file mode 100644 index 000000000000..84f7713fa01c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LocationName.java @@ -0,0 +1,180 @@ +/* + * Copyright 2018 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 + * + * http://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. + */ + +package com.google.cloud.datacatalog; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LocationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location); + } + + /** Builder for LocationName. */ + public static class Builder { + + private String project; + private String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder() {} + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) && (this.location.equals(that.location)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LookupEntryRequest.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LookupEntryRequest.java new file mode 100644 index 000000000000..6455f457e9fa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LookupEntryRequest.java @@ -0,0 +1,953 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Request message for
+ * [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.LookupEntryRequest} + */ +public final class LookupEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.LookupEntryRequest) + LookupEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LookupEntryRequest.newBuilder() to construct. + private LookupEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LookupEntryRequest() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LookupEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + targetNameCase_ = 1; + targetName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + targetNameCase_ = 3; + targetName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.LookupEntryRequest.class, + com.google.cloud.datacatalog.LookupEntryRequest.Builder.class); + } + + private int targetNameCase_ = 0; + private java.lang.Object targetName_; + + public enum TargetNameCase implements com.google.protobuf.Internal.EnumLite { + LINKED_RESOURCE(1), + SQL_RESOURCE(3), + TARGETNAME_NOT_SET(0); + private final int value; + + private TargetNameCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static TargetNameCase valueOf(int value) { + return forNumber(value); + } + + public static TargetNameCase forNumber(int value) { + switch (value) { + case 1: + return LINKED_RESOURCE; + case 3: + return SQL_RESOURCE; + case 0: + return TARGETNAME_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetNameCase getTargetNameCase() { + return TargetNameCase.forNumber(targetNameCase_); + } + + public static final int LINKED_RESOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Full names are case-sensitive.
+   * Examples:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+   * 
+ * + * string linked_resource = 1; + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 1) { + targetName_ = s; + } + return s; + } + } + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Full names are case-sensitive.
+   * Examples:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+   * 
+ * + * string linked_resource = 1; + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 1) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SQL_RESOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   * 1. cloud_pubsub.project_id.topic_id
+   * 2. bigquery.project_id.dataset_id.table_id
+   * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+   * 
+ * + * string sql_resource = 3; + */ + public java.lang.String getSqlResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 3) { + targetName_ = s; + } + return s; + } + } + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   * 1. cloud_pubsub.project_id.topic_id
+   * 2. bigquery.project_id.dataset_id.table_id
+   * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+   * 
+ * + * string sql_resource = 3; + */ + public com.google.protobuf.ByteString getSqlResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 3) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (targetNameCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetName_); + } + if (targetNameCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetNameCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetName_); + } + if (targetNameCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.LookupEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.LookupEntryRequest other = + (com.google.cloud.datacatalog.LookupEntryRequest) obj; + + if (!getTargetNameCase().equals(other.getTargetNameCase())) return false; + switch (targetNameCase_) { + case 1: + if (!getLinkedResource().equals(other.getLinkedResource())) return false; + break; + case 3: + if (!getSqlResource().equals(other.getSqlResource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (targetNameCase_) { + case 1: + hash = (37 * hash) + LINKED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getLinkedResource().hashCode(); + break; + case 3: + hash = (37 * hash) + SQL_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSqlResource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.LookupEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.LookupEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.LookupEntryRequest) + com.google.cloud.datacatalog.LookupEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.LookupEntryRequest.class, + com.google.cloud.datacatalog.LookupEntryRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.LookupEntryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + targetNameCase_ = 0; + targetName_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.Datacatalog + .internal_static_google_cloud_datacatalog_v1beta1_LookupEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.LookupEntryRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.LookupEntryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.LookupEntryRequest build() { + com.google.cloud.datacatalog.LookupEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.LookupEntryRequest buildPartial() { + com.google.cloud.datacatalog.LookupEntryRequest result = + new com.google.cloud.datacatalog.LookupEntryRequest(this); + if (targetNameCase_ == 1) { + result.targetName_ = targetName_; + } + if (targetNameCase_ == 3) { + result.targetName_ = targetName_; + } + result.targetNameCase_ = targetNameCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.LookupEntryRequest) { + return mergeFrom((com.google.cloud.datacatalog.LookupEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.LookupEntryRequest other) { + if (other == com.google.cloud.datacatalog.LookupEntryRequest.getDefaultInstance()) + return this; + switch (other.getTargetNameCase()) { + case LINKED_RESOURCE: + { + targetNameCase_ = 1; + targetName_ = other.targetName_; + onChanged(); + break; + } + case SQL_RESOURCE: + { + targetNameCase_ = 3; + targetName_ = other.targetName_; + onChanged(); + break; + } + case TARGETNAME_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.LookupEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.LookupEntryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int targetNameCase_ = 0; + private java.lang.Object targetName_; + + public TargetNameCase getTargetNameCase() { + return TargetNameCase.forNumber(targetNameCase_); + } + + public Builder clearTargetName() { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Full names are case-sensitive.
+     * Examples:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+     * 
+ * + * string linked_resource = 1; + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 1) { + targetName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Full names are case-sensitive.
+     * Examples:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+     * 
+ * + * string linked_resource = 1; + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 1) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Full names are case-sensitive.
+     * Examples:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+     * 
+ * + * string linked_resource = 1; + */ + public Builder setLinkedResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetNameCase_ = 1; + targetName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Full names are case-sensitive.
+     * Examples:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+     * 
+ * + * string linked_resource = 1; + */ + public Builder clearLinkedResource() { + if (targetNameCase_ == 1) { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * Full names are case-sensitive.
+     * Examples:
+     * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+     * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+     * 
+ * + * string linked_resource = 1; + */ + public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetNameCase_ = 1; + targetName_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     * 1. cloud_pubsub.project_id.topic_id
+     * 2. bigquery.project_id.dataset_id.table_id
+     * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+     * 
+ * + * string sql_resource = 3; + */ + public java.lang.String getSqlResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 3) { + targetName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     * 1. cloud_pubsub.project_id.topic_id
+     * 2. bigquery.project_id.dataset_id.table_id
+     * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+     * 
+ * + * string sql_resource = 3; + */ + public com.google.protobuf.ByteString getSqlResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 3) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     * 1. cloud_pubsub.project_id.topic_id
+     * 2. bigquery.project_id.dataset_id.table_id
+     * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+     * 
+ * + * string sql_resource = 3; + */ + public Builder setSqlResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetNameCase_ = 3; + targetName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     * 1. cloud_pubsub.project_id.topic_id
+     * 2. bigquery.project_id.dataset_id.table_id
+     * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+     * 
+ * + * string sql_resource = 3; + */ + public Builder clearSqlResource() { + if (targetNameCase_ == 3) { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     * 1. cloud_pubsub.project_id.topic_id
+     * 2. bigquery.project_id.dataset_id.table_id
+     * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+     * 
+ * + * string sql_resource = 3; + */ + public Builder setSqlResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetNameCase_ = 3; + targetName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.LookupEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.LookupEntryRequest) + private static final com.google.cloud.datacatalog.LookupEntryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.LookupEntryRequest(); + } + + public static com.google.cloud.datacatalog.LookupEntryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LookupEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.LookupEntryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LookupEntryRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LookupEntryRequestOrBuilder.java new file mode 100644 index 000000000000..82e8c490fa47 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/LookupEntryRequestOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package com.google.cloud.datacatalog; + +public interface LookupEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.LookupEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Full names are case-sensitive.
+   * Examples:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+   * 
+ * + * string linked_resource = 1; + */ + java.lang.String getLinkedResource(); + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * Full names are case-sensitive.
+   * Examples:
+   * "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId".
+   * "//pubsub.googleapis.com/projects/projectId/topics/topicId"
+   * 
+ * + * string linked_resource = 1; + */ + com.google.protobuf.ByteString getLinkedResourceBytes(); + + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   * 1. cloud_pubsub.project_id.topic_id
+   * 2. bigquery.project_id.dataset_id.table_id
+   * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+   * 
+ * + * string sql_resource = 3; + */ + java.lang.String getSqlResource(); + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   * 1. cloud_pubsub.project_id.topic_id
+   * 2. bigquery.project_id.dataset_id.table_id
+   * 3. datacatalog.project_id.location_id.entry_group_id.entry_id
+   * 
+ * + * string sql_resource = 3; + */ + com.google.protobuf.ByteString getSqlResourceBytes(); + + public com.google.cloud.datacatalog.LookupEntryRequest.TargetNameCase getTargetNameCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Schema.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Schema.java new file mode 100644 index 000000000000..e4f6467050df --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Schema.java @@ -0,0 +1,941 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/schema.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema).
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.Schema} + */ +public final class Schema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.Schema) + SchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use Schema.newBuilder() to construct. + private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Schema() { + columns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Schema( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + columns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + columns_.add( + input.readMessage( + com.google.cloud.datacatalog.ColumnSchema.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.Schema.class, + com.google.cloud.datacatalog.Schema.Builder.class); + } + + public static final int COLUMNS_FIELD_NUMBER = 2; + private java.util.List columns_; + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public java.util.List getColumnsList() { + return columns_; + } + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public java.util.List + getColumnsOrBuilderList() { + return columns_; + } + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public int getColumnsCount() { + return columns_.size(); + } + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchema getColumns(int index) { + return columns_.get(index); + } + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchemaOrBuilder getColumnsOrBuilder(int index) { + return columns_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < columns_.size(); i++) { + output.writeMessage(2, columns_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < columns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, columns_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.Schema)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.Schema other = (com.google.cloud.datacatalog.Schema) obj; + + if (!getColumnsList().equals(other.getColumnsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColumnsCount() > 0) { + hash = (37 * hash) + COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getColumnsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.Schema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.Schema parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Schema parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.Schema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Schema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.Schema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Schema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.Schema parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Schema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.Schema parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.Schema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.Schema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.Schema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema).
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.Schema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.Schema) + com.google.cloud.datacatalog.SchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.Schema.class, + com.google.cloud.datacatalog.Schema.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.Schema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getColumnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + columnsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1beta1_Schema_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.Schema getDefaultInstanceForType() { + return com.google.cloud.datacatalog.Schema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.Schema build() { + com.google.cloud.datacatalog.Schema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.Schema buildPartial() { + com.google.cloud.datacatalog.Schema result = new com.google.cloud.datacatalog.Schema(this); + int from_bitField0_ = bitField0_; + if (columnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.columns_ = columns_; + } else { + result.columns_ = columnsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.Schema) { + return mergeFrom((com.google.cloud.datacatalog.Schema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.Schema other) { + if (other == com.google.cloud.datacatalog.Schema.getDefaultInstance()) return this; + if (columnsBuilder_ == null) { + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); + } + onChanged(); + } + } else { + if (!other.columns_.isEmpty()) { + if (columnsBuilder_.isEmpty()) { + columnsBuilder_.dispose(); + columnsBuilder_ = null; + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + columnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getColumnsFieldBuilder() + : null; + } else { + columnsBuilder_.addAllMessages(other.columns_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.Schema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.Schema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List columns_ = + java.util.Collections.emptyList(); + + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + columns_ = new java.util.ArrayList(columns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.ColumnSchema, + com.google.cloud.datacatalog.ColumnSchema.Builder, + com.google.cloud.datacatalog.ColumnSchemaOrBuilder> + columnsBuilder_; + + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public java.util.List getColumnsList() { + if (columnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(columns_); + } else { + return columnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public int getColumnsCount() { + if (columnsBuilder_ == null) { + return columns_.size(); + } else { + return columnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchema getColumns(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder setColumns(int index, com.google.cloud.datacatalog.ColumnSchema value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.set(index, value); + onChanged(); + } else { + columnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder setColumns( + int index, com.google.cloud.datacatalog.ColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.set(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder addColumns(com.google.cloud.datacatalog.ColumnSchema value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(value); + onChanged(); + } else { + columnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder addColumns(int index, com.google.cloud.datacatalog.ColumnSchema value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(index, value); + onChanged(); + } else { + columnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder addColumns(com.google.cloud.datacatalog.ColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder addColumns( + int index, com.google.cloud.datacatalog.ColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder addAllColumns( + java.lang.Iterable values) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columns_); + onChanged(); + } else { + columnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder clearColumns() { + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + columnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public Builder removeColumns(int index) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.remove(index); + onChanged(); + } else { + columnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchema.Builder getColumnsBuilder(int index) { + return getColumnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchemaOrBuilder getColumnsOrBuilder(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public java.util.List + getColumnsOrBuilderList() { + if (columnsBuilder_ != null) { + return columnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columns_); + } + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchema.Builder addColumnsBuilder() { + return getColumnsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public com.google.cloud.datacatalog.ColumnSchema.Builder addColumnsBuilder(int index) { + return getColumnsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + public java.util.List + getColumnsBuilderList() { + return getColumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.ColumnSchema, + com.google.cloud.datacatalog.ColumnSchema.Builder, + com.google.cloud.datacatalog.ColumnSchemaOrBuilder> + getColumnsFieldBuilder() { + if (columnsBuilder_ == null) { + columnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.ColumnSchema, + com.google.cloud.datacatalog.ColumnSchema.Builder, + com.google.cloud.datacatalog.ColumnSchemaOrBuilder>( + columns_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + columns_ = null; + } + return columnsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.Schema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.Schema) + private static final com.google.cloud.datacatalog.Schema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.Schema(); + } + + public static com.google.cloud.datacatalog.Schema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Schema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.Schema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SchemaOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SchemaOrBuilder.java new file mode 100644 index 000000000000..c8deded2855c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SchemaOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/schema.proto + +package com.google.cloud.datacatalog; + +public interface SchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.Schema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + java.util.List getColumnsList(); + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + com.google.cloud.datacatalog.ColumnSchema getColumns(int index); + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + int getColumnsCount(); + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + java.util.List + getColumnsOrBuilderList(); + /** + * + * + *
+   * Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1beta1.ColumnSchema columns = 2; + */ + com.google.cloud.datacatalog.ColumnSchemaOrBuilder getColumnsOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SchemaOuterClass.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SchemaOuterClass.java new file mode 100644 index 000000000000..3a56bbbb7957 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SchemaOuterClass.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/schema.proto + +package com.google.cloud.datacatalog; + +public final class SchemaOuterClass { + private SchemaOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_Schema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_Schema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/datacatalog/v1beta1/schem" + + "a.proto\022 google.cloud.datacatalog.v1beta" + + "1\"I\n\006Schema\022?\n\007columns\030\002 \003(\0132..google.cl" + + "oud.datacatalog.v1beta1.ColumnSchema\"\223\001\n" + + "\014ColumnSchema\022\016\n\006column\030\006 \001(\t\022\014\n\004type\030\001 " + + "\001(\t\022\023\n\013description\030\002 \001(\t\022\014\n\004mode\030\003 \001(\t\022B" + + "\n\nsubcolumns\030\007 \003(\0132..google.cloud.dataca" + + "talog.v1beta1.ColumnSchemaBp\n\034com.google" + + ".cloud.datacatalogP\001ZKgoogle.golang.org/" + + "genproto/googleapis/cloud/datacatalog/v1" + + "beta1;datacatalog\370\001\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}, assigner); + internal_static_google_cloud_datacatalog_v1beta1_Schema_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1beta1_Schema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_Schema_descriptor, + new java.lang.String[] { + "Columns", + }); + internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_ColumnSchema_descriptor, + new java.lang.String[] { + "Column", "Type", "Description", "Mode", "Subcolumns", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SystemTimestamps.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SystemTimestamps.java new file mode 100644 index 000000000000..f0338ed22131 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SystemTimestamps.java @@ -0,0 +1,1229 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/timestamps.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Timestamps about this resource according to a particular system.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.SystemTimestamps} + */ +public final class SystemTimestamps extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.SystemTimestamps) + SystemTimestampsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SystemTimestamps.newBuilder() to construct. + private SystemTimestamps(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SystemTimestamps() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SystemTimestamps( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.Timestamps + .internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.Timestamps + .internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.SystemTimestamps.class, + com.google.cloud.datacatalog.SystemTimestamps.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The last-modified time of the resource within the given
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The last-modified time of the resource within the given
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The last-modified time of the resource within the given
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + if (expireTime_ != null) { + output.writeMessage(3, getExpireTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpireTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.SystemTimestamps)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.SystemTimestamps other = + (com.google.cloud.datacatalog.SystemTimestamps) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.SystemTimestamps parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.SystemTimestamps prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Timestamps about this resource according to a particular system.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.SystemTimestamps} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.SystemTimestamps) + com.google.cloud.datacatalog.SystemTimestampsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.Timestamps + .internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.Timestamps + .internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.SystemTimestamps.class, + com.google.cloud.datacatalog.SystemTimestamps.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.SystemTimestamps.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.Timestamps + .internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.SystemTimestamps getDefaultInstanceForType() { + return com.google.cloud.datacatalog.SystemTimestamps.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.SystemTimestamps build() { + com.google.cloud.datacatalog.SystemTimestamps result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.SystemTimestamps buildPartial() { + com.google.cloud.datacatalog.SystemTimestamps result = + new com.google.cloud.datacatalog.SystemTimestamps(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.SystemTimestamps) { + return mergeFrom((com.google.cloud.datacatalog.SystemTimestamps) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.SystemTimestamps other) { + if (other == com.google.cloud.datacatalog.SystemTimestamps.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.SystemTimestamps parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.SystemTimestamps) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The last-modified time of the resource within the given
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.SystemTimestamps) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.SystemTimestamps) + private static final com.google.cloud.datacatalog.SystemTimestamps DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.SystemTimestamps(); + } + + public static com.google.cloud.datacatalog.SystemTimestamps getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SystemTimestamps parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SystemTimestamps(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.SystemTimestamps getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SystemTimestampsOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SystemTimestampsOrBuilder.java new file mode 100644 index 000000000000..adc123f38a5a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/SystemTimestampsOrBuilder.java @@ -0,0 +1,106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/timestamps.proto + +package com.google.cloud.datacatalog; + +public interface SystemTimestampsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.SystemTimestamps) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The last-modified time of the resource within the given
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The last-modified time of the resource within the given
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The last-modified time of the resource within the given
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/TableSourceType.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/TableSourceType.java new file mode 100644 index 000000000000..e99f3489ecae --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/TableSourceType.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Table source type.
+ * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.v1beta1.TableSourceType} + */ +public enum TableSourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + */ + TABLE_SOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Table view.
+   * 
+ * + * BIGQUERY_VIEW = 2; + */ + BIGQUERY_VIEW(2), + /** + * + * + *
+   * BigQuery native table.
+   * 
+ * + * BIGQUERY_TABLE = 5; + */ + BIGQUERY_TABLE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int TABLE_SOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Table view.
+   * 
+ * + * BIGQUERY_VIEW = 2; + */ + public static final int BIGQUERY_VIEW_VALUE = 2; + /** + * + * + *
+   * BigQuery native table.
+   * 
+ * + * BIGQUERY_TABLE = 5; + */ + public static final int BIGQUERY_TABLE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static TableSourceType valueOf(int value) { + return forNumber(value); + } + + public static TableSourceType forNumber(int value) { + switch (value) { + case 0: + return TABLE_SOURCE_TYPE_UNSPECIFIED; + case 2: + return BIGQUERY_VIEW; + case 5: + return BIGQUERY_TABLE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TableSourceType findValueByNumber(int number) { + return TableSourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datacatalog.TableSpec.getDescriptor().getEnumTypes().get(0); + } + + private static final TableSourceType[] VALUES = values(); + + public static TableSourceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TableSourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1beta1.TableSourceType) +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/TableSpec.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/TableSpec.java new file mode 100644 index 000000000000..cfc0c9ecf21b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/TableSpec.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package com.google.cloud.datacatalog; + +public final class TableSpec { + private TableSpec() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/datacatalog/v1beta1/table" + + "_spec.proto\022 google.cloud.datacatalog.v1" + + "beta1\"\240\001\n\021BigQueryTableSpec\022L\n\021table_sou" + + "rce_type\030\001 \001(\01621.google.cloud.datacatalo" + + "g.v1beta1.TableSourceType\022=\n\tview_spec\030\002" + + " \001(\0132*.google.cloud.datacatalog.v1beta1." + + "ViewSpec\"\036\n\010ViewSpec\022\022\n\nview_query\030\001 \001(\t" + + "*[\n\017TableSourceType\022!\n\035TABLE_SOURCE_TYPE" + + "_UNSPECIFIED\020\000\022\021\n\rBIGQUERY_VIEW\020\002\022\022\n\016BIG" + + "QUERY_TABLE\020\005Bp\n\034com.google.cloud.dataca" + + "talogP\001ZKgoogle.golang.org/genproto/goog" + + "leapis/cloud/datacatalog/v1beta1;datacat" + + "alog\370\001\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}, assigner); + internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_BigQueryTableSpec_descriptor, + new java.lang.String[] { + "TableSourceType", "ViewSpec", + }); + internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_descriptor, + new java.lang.String[] { + "ViewQuery", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Timestamps.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Timestamps.java new file mode 100644 index 000000000000..5a24b90395df --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/Timestamps.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/timestamps.proto + +package com.google.cloud.datacatalog; + +public final class Timestamps { + private Timestamps() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/datacatalog/v1beta1/times" + + "tamps.proto\022 google.cloud.datacatalog.v1" + + "beta1\032\037google/protobuf/timestamp.proto\"\245" + + "\001\n\020SystemTimestamps\022/\n\013create_time\030\001 \001(\013" + + "2\032.google.protobuf.Timestamp\022/\n\013update_t" + + "ime\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n" + + "\013expire_time\030\003 \001(\0132\032.google.protobuf.Tim" + + "estampBp\n\034com.google.cloud.datacatalogP\001" + + "ZKgoogle.golang.org/genproto/googleapis/" + + "cloud/datacatalog/v1beta1;datacatalog\370\001\001" + + "b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1beta1_SystemTimestamps_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "ExpireTime", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ViewSpec.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ViewSpec.java new file mode 100644 index 000000000000..36056e83a528 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ViewSpec.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package com.google.cloud.datacatalog; + +/** + * + * + *
+ * Table view specification.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.ViewSpec} + */ +public final class ViewSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.ViewSpec) + ViewSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ViewSpec.newBuilder() to construct. + private ViewSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ViewSpec() { + viewQuery_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ViewSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + viewQuery_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.ViewSpec.class, + com.google.cloud.datacatalog.ViewSpec.Builder.class); + } + + public static final int VIEW_QUERY_FIELD_NUMBER = 1; + private volatile java.lang.Object viewQuery_; + /** + * + * + *
+   * The query that defines the table view.
+   * 
+ * + * string view_query = 1; + */ + public java.lang.String getViewQuery() { + java.lang.Object ref = viewQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + viewQuery_ = s; + return s; + } + } + /** + * + * + *
+   * The query that defines the table view.
+   * 
+ * + * string view_query = 1; + */ + public com.google.protobuf.ByteString getViewQueryBytes() { + java.lang.Object ref = viewQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + viewQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getViewQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, viewQuery_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getViewQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, viewQuery_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.ViewSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.ViewSpec other = (com.google.cloud.datacatalog.ViewSpec) obj; + + if (!getViewQuery().equals(other.getViewQuery())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VIEW_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getViewQuery().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ViewSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.ViewSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.ViewSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.ViewSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Table view specification.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1beta1.ViewSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.ViewSpec) + com.google.cloud.datacatalog.ViewSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.ViewSpec.class, + com.google.cloud.datacatalog.ViewSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.ViewSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + viewQuery_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.TableSpec + .internal_static_google_cloud_datacatalog_v1beta1_ViewSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.ViewSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.ViewSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.ViewSpec build() { + com.google.cloud.datacatalog.ViewSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.ViewSpec buildPartial() { + com.google.cloud.datacatalog.ViewSpec result = + new com.google.cloud.datacatalog.ViewSpec(this); + result.viewQuery_ = viewQuery_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.ViewSpec) { + return mergeFrom((com.google.cloud.datacatalog.ViewSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.ViewSpec other) { + if (other == com.google.cloud.datacatalog.ViewSpec.getDefaultInstance()) return this; + if (!other.getViewQuery().isEmpty()) { + viewQuery_ = other.viewQuery_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.ViewSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.ViewSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object viewQuery_ = ""; + /** + * + * + *
+     * The query that defines the table view.
+     * 
+ * + * string view_query = 1; + */ + public java.lang.String getViewQuery() { + java.lang.Object ref = viewQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + viewQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The query that defines the table view.
+     * 
+ * + * string view_query = 1; + */ + public com.google.protobuf.ByteString getViewQueryBytes() { + java.lang.Object ref = viewQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + viewQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The query that defines the table view.
+     * 
+ * + * string view_query = 1; + */ + public Builder setViewQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + viewQuery_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The query that defines the table view.
+     * 
+ * + * string view_query = 1; + */ + public Builder clearViewQuery() { + + viewQuery_ = getDefaultInstance().getViewQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * The query that defines the table view.
+     * 
+ * + * string view_query = 1; + */ + public Builder setViewQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + viewQuery_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1beta1.ViewSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.ViewSpec) + private static final com.google.cloud.datacatalog.ViewSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.ViewSpec(); + } + + public static com.google.cloud.datacatalog.ViewSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ViewSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ViewSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.ViewSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ViewSpecOrBuilder.java b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ViewSpecOrBuilder.java new file mode 100644 index 000000000000..f8098add2663 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/ViewSpecOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package com.google.cloud.datacatalog; + +public interface ViewSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.ViewSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The query that defines the table view.
+   * 
+ * + * string view_query = 1; + */ + java.lang.String getViewQuery(); + /** + * + * + *
+   * The query that defines the table view.
+   * 
+ * + * string view_query = 1; + */ + com.google.protobuf.ByteString getViewQueryBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/datacatalog.proto b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/datacatalog.proto new file mode 100644 index 000000000000..22528a13ed22 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/datacatalog.proto @@ -0,0 +1,129 @@ +// Copyright 2019 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datacatalog/v1beta1/schema.proto"; +import "google/cloud/datacatalog/v1beta1/table_spec.proto"; +import "google/cloud/datacatalog/v1beta1/timestamps.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Cloud Data Catalog is a service that allows clients to discover, +// manage, and understand their Google Cloud data resources. +service DataCatalog { + // Get an entry by target resource name. This method allows clients to use + // the resource name from the source Google Cloud Platform service to get the + // Cloud Data Catalog Entry. + rpc LookupEntry(LookupEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1beta1/entries:lookup" + }; + } +} + +// Request message for +// [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. +message LookupEntryRequest { + // Represents either the Google Cloud Platform resource or SQL name for a + // Google Cloud Platform resource. + oneof target_name { + // The full name of the Google Cloud Platform resource the Data Catalog + // entry represents. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + // Full names are case-sensitive. + // + // Examples: + // "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId". + // "//pubsub.googleapis.com/projects/projectId/topics/topicId" + string linked_resource = 1; + + // The SQL name of the entry. SQL names are case-sensitive. + // + // Examples: + // 1. cloud_pubsub.project_id.topic_id + // 2. bigquery.project_id.dataset_id.table_id + // 3. datacatalog.project_id.location_id.entry_group_id.entry_id + string sql_resource = 3; + } +} + +// Entry Metadata. +// A Data Catalog Entry resource represents another resource in Google +// Cloud Platform, such as a BigQuery Dataset or a Pub/Sub Topic. Clients can +// use the `linked_resource` field in the Entry resource to refer to the +// original resource id of the source system. +// +// An Entry resource contains resource details, such as its schema. +message Entry { + // Output only. The Data Catalog resource name of the entry in URL format. For + // example, + // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}". + string name = 1; + + // The full name of the cloud resource the entry belongs to. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + // + // Data Catalog supports resources from select Google Cloud Platform systems. + // `linked_resource` is the full name of the Google Cloud Platform resource. + // For example, the `linked_resource` for a table resource from BigQuery is: + // + // "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId". + string linked_resource = 9; + + // Type of entry. + EntryType type = 2; + + // Type specification information. + oneof type_spec { + // Specification that applies to a BigQuery table. This is only valid on + // entries of type TABLE. + BigQueryTableSpec bigquery_table_spec = 12; + } + + // Display information such as title and description. + // A short name to identify the entry, for example, + // "Analytics Data - Jan 2011". + string display_name = 3; + + // Entry description, which can consist of several sentences or paragraphs + // that describe entry contents. + string description = 4; + + // Schema of the entry. + Schema schema = 5; + + // Timestamps about the underlying Google Cloud Platform resource -- not about + // this Data Catalog Entry. + SystemTimestamps source_system_timestamps = 7; +} + +// Entry resources in Cloud Data Catalog can be of different types e.g. BigQuery +// Table entry is of type 'TABLE'. This enum describes all the possible types +// Cloud Data Catalog contains. +enum EntryType { + // Default unknown type + ENTRY_TYPE_UNSPECIFIED = 0; + // The type of entry that has a GoogleSQL schema, including logical views. + TABLE = 2; + // An entry type which is used for streaming entries. Example - Pub/Sub. + DATA_STREAM = 3; +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/schema.proto b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/schema.proto new file mode 100644 index 000000000000..4dd66cf64fd5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/schema.proto @@ -0,0 +1,51 @@ +// Copyright 2019 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). +message Schema { + // Schema of columns. A maximum of 10,000 columns and sub-columns can be + // specified. + repeated ColumnSchema columns = 2; +} + +// Representation of a column within a schema. Columns could be nested inside +// other columns. +message ColumnSchema { + // Required. Name of the column. + string column = 6; + + // Required. Type of the column. + string type = 1; + + // Description of the column. + string description = 2; + + // A column's mode indicates whether the values in this column are + // required, nullable, etc. Only 'NULLABLE', 'REQUIRED' and 'REPEATED' are + // supported, default mode is 'NULLABLE'. + string mode = 3; + + // Schema of sub-columns. + repeated ColumnSchema subcolumns = 7; +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/table_spec.proto b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/table_spec.proto new file mode 100644 index 000000000000..7e2063aa0d7f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/table_spec.proto @@ -0,0 +1,51 @@ +// Copyright 2019 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Describes a BigQuery table. +message BigQueryTableSpec { + // The table source type. + TableSourceType table_source_type = 1; + + // Table view specification. This field should only be populated if + // table_source_type is BIGQUERY_VIEW. + ViewSpec view_spec = 2; +} + +// Table source type. +enum TableSourceType { + // Default unknown type. + TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + + // Table view. + BIGQUERY_VIEW = 2; + + // BigQuery native table. + BIGQUERY_TABLE = 5; +} + +// Table view specification. +message ViewSpec { + // The query that defines the table view. + string view_query = 1; +} diff --git a/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/timestamps.proto b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/timestamps.proto new file mode 100644 index 000000000000..bb048b915223 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datacatalog-v1beta1/src/main/proto/google/cloud/datacatalog/v1beta1/timestamps.proto @@ -0,0 +1,38 @@ +// Copyright 2019 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Timestamps about this resource according to a particular system. +message SystemTimestamps { + // Output only. The creation time of the resource within the given system. + google.protobuf.Timestamp create_time = 1; + + // Output only. The last-modified time of the resource within the given + // system. + google.protobuf.Timestamp update_time = 2; + + // Output only. The expiration time of the resource within the given system. + google.protobuf.Timestamp expire_time = 3; +} diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index 5f60d0d0c053..d5146bcf21bf 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -354,6 +354,21 @@ google-cloud-core-http 1.69.1-SNAPSHOT
+ + com.google.cloud + google-cloud-datacatalog + 0.0.1-alpha-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-datacatalog-v1beta1 + 0.0.1-alpha-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-datacatalog-v1beta1 + 0.0.1-alpha-SNAPSHOT + com.google.cloud google-cloud-datalabeling diff --git a/google-cloud-clients/google-cloud-datacatalog/README.md b/google-cloud-clients/google-cloud-datacatalog/README.md new file mode 100644 index 000000000000..3200d5986831 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/README.md @@ -0,0 +1,102 @@ +Google Cloud Java Client for Data Catalog +=================================================== + +Java idiomatic client for Data Catalog. + +Data Catalog is a fully managed and scalable metadata management service that empowers organizations to quickly discover, manage, and understand all their data in Google Cloud. It offers a simple and easy-to-use search interface for data discovery, a flexible and powerful cataloging system for capturing both technical and business metadata, and a strong security and compliance foundation with Cloud Data Loss Prevention (DLP) and Cloud Identity and Access Management (IAM) integrations. + +[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datacatalog.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datacatalog.svg) +[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) + +- [Product Documentation][product-docs] +- [Client Library Documentation][lib-docs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- + +[//]: # ({x-version-update-start:google-cloud-datacatalog:released}) +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-datacatalog + 0.71.0-beta + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-datacatalog:0.71.0-beta' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-datacatalog" % "0.71.0-beta" +``` +[//]: # ({x-version-update-end}) + +Authentication +-------------- + +See the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) section in the base directory's README. + +About Data Catalog +---------------------------- + +[Data Catalog][product-overview] Data Catalog + +See the [Data Catalog client library docs][lib-docs] to learn how to use this Data Catalog Client Library. + +Getting Started +--------------- +#### Prerequisites +You will need a [Google Developers Console](https://console.developers.google.com/) project with the Data Catalog API enabled. [Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +#### Installation and setup +You'll need to obtain the `google-cloud-datacatalog` library. See the [Quickstart](#quickstart) section to add `google-cloud-datacatalog` as a dependency in your code. + +Troubleshooting +--------------- + +To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting). + +Transport +--------- +Data Catalog uses gRPC for the transport layer. + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ +[product-overview]: https://cloud.google.com/data-catalog/ +[product-docs]: https://cloud.google.com/data-catalog/ +[lib-docs]: https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/datacatalog/v1beta1/package-summary.html diff --git a/google-cloud-clients/google-cloud-datacatalog/pom.xml b/google-cloud-clients/google-cloud-datacatalog/pom.xml new file mode 100644 index 000000000000..37851ddebb36 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/pom.xml @@ -0,0 +1,87 @@ + + + 4.0.0 + google-cloud-datacatalog + 0.0.1-alpha-SNAPSHOT + jar + Google Cloud Datacatalog + https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datacatalog + + Java idiomatic client for Google Cloud Data Labeling + + + com.google.cloud + google-cloud-clients + 0.87.1-alpha-SNAPSHOT + + + google-cloud-datacatalog + + + + ${project.groupId} + google-cloud-core + + + ${project.groupId} + google-cloud-core-grpc + + + com.google.api.grpc + proto-google-cloud-datacatalog-v1beta1 + + + com.google.api.grpc + grpc-google-cloud-datacatalog-v1beta1 + + + io.grpc + grpc-netty-shaded + + + io.grpc + grpc-stub + + + io.grpc + grpc-auth + + + ${project.groupId} + google-cloud-core + test-jar + test + + + junit + junit + test + + + org.easymock + easymock + test + + + org.objenesis + objenesis + test + + + com.google.truth + truth + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + com.google.api + gax-grpc + testlib + test + + + diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java new file mode 100644 index 000000000000..2a9ce28f3927 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java @@ -0,0 +1,314 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.datacatalog.Entry; +import com.google.cloud.datacatalog.LookupEntryRequest; +import com.google.cloud.datacatalog.v1beta1.stub.DataCatalogStub; +import com.google.cloud.datacatalog.v1beta1.stub.DataCatalogStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Cloud Data Catalog is a service that allows clients to discover, manage, and + * understand their Google Cloud data resources. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+ *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
+ *   Entry response = dataCatalogClient.lookupEntry(request);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the dataCatalogClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of DataCatalogSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * DataCatalogSettings dataCatalogSettings =
+ *     DataCatalogSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataCatalogClient dataCatalogClient =
+ *     DataCatalogClient.create(dataCatalogSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * DataCatalogSettings dataCatalogSettings =
+ *     DataCatalogSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataCatalogClient dataCatalogClient =
+ *     DataCatalogClient.create(dataCatalogSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataCatalogClient implements BackgroundResource { + private final DataCatalogSettings settings; + private final DataCatalogStub stub; + + private static final PathTemplate LOCATION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private static final PathTemplate ENTRY_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}"); + + /** + * Formats a string containing the fully-qualified path to represent a location resource. + * + * @deprecated Use the {@link LocationName} class instead. + */ + @Deprecated + public static final String formatLocationName(String project, String location) { + return LOCATION_PATH_TEMPLATE.instantiate( + "project", project, + "location", location); + } + + /** + * Formats a string containing the fully-qualified path to represent a entry resource. + * + * @deprecated Use the {@link EntryName} class instead. + */ + @Deprecated + public static final String formatEntryName( + String project, String location, String entryGroup, String entry) { + return ENTRY_PATH_TEMPLATE.instantiate( + "project", project, + "location", location, + "entry_group", entryGroup, + "entry", entry); + } + + /** + * Parses the project from the given fully-qualified path which represents a location resource. + * + * @deprecated Use the {@link LocationName} class instead. + */ + @Deprecated + public static final String parseProjectFromLocationName(String locationName) { + return LOCATION_PATH_TEMPLATE.parse(locationName).get("project"); + } + + /** + * Parses the location from the given fully-qualified path which represents a location resource. + * + * @deprecated Use the {@link LocationName} class instead. + */ + @Deprecated + public static final String parseLocationFromLocationName(String locationName) { + return LOCATION_PATH_TEMPLATE.parse(locationName).get("location"); + } + + /** + * Parses the project from the given fully-qualified path which represents a entry resource. + * + * @deprecated Use the {@link EntryName} class instead. + */ + @Deprecated + public static final String parseProjectFromEntryName(String entryName) { + return ENTRY_PATH_TEMPLATE.parse(entryName).get("project"); + } + + /** + * Parses the location from the given fully-qualified path which represents a entry resource. + * + * @deprecated Use the {@link EntryName} class instead. + */ + @Deprecated + public static final String parseLocationFromEntryName(String entryName) { + return ENTRY_PATH_TEMPLATE.parse(entryName).get("location"); + } + + /** + * Parses the entry_group from the given fully-qualified path which represents a entry resource. + * + * @deprecated Use the {@link EntryName} class instead. + */ + @Deprecated + public static final String parseEntryGroupFromEntryName(String entryName) { + return ENTRY_PATH_TEMPLATE.parse(entryName).get("entry_group"); + } + + /** + * Parses the entry from the given fully-qualified path which represents a entry resource. + * + * @deprecated Use the {@link EntryName} class instead. + */ + @Deprecated + public static final String parseEntryFromEntryName(String entryName) { + return ENTRY_PATH_TEMPLATE.parse(entryName).get("entry"); + } + + /** Constructs an instance of DataCatalogClient with default settings. */ + public static final DataCatalogClient create() throws IOException { + return create(DataCatalogSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataCatalogClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DataCatalogClient create(DataCatalogSettings settings) throws IOException { + return new DataCatalogClient(settings); + } + + /** + * Constructs an instance of DataCatalogClient, using the given stub for making calls. This is for + * advanced usage - prefer to use DataCatalogSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataCatalogClient create(DataCatalogStub stub) { + return new DataCatalogClient(stub); + } + + /** + * Constructs an instance of DataCatalogClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected DataCatalogClient(DataCatalogSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataCatalogStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DataCatalogClient(DataCatalogStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DataCatalogSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataCatalogStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get an entry by target resource name. This method allows clients to use the resource name from + * the source Google Cloud Platform service to get the Cloud Data Catalog Entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
+   *   Entry response = dataCatalogClient.lookupEntry(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry lookupEntry(LookupEntryRequest request) { + return lookupEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get an entry by target resource name. This method allows clients to use the resource name from + * the source Google Cloud Platform service to get the Cloud Data Catalog Entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
+   *   ApiFuture<Entry> future = dataCatalogClient.lookupEntryCallable().futureCall(request);
+   *   // Do something
+   *   Entry response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable lookupEntryCallable() { + return stub.lookupEntryCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogSettings.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogSettings.java new file mode 100644 index 000000000000..ace3c3c6a761 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogSettings.java @@ -0,0 +1,175 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datacatalog.Entry; +import com.google.cloud.datacatalog.LookupEntryRequest; +import com.google.cloud.datacatalog.v1beta1.stub.DataCatalogStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link DataCatalogClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (datacatalog.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of lookupEntry to 30 seconds: + * + *

+ * 
+ * DataCatalogSettings.Builder dataCatalogSettingsBuilder =
+ *     DataCatalogSettings.newBuilder();
+ * dataCatalogSettingsBuilder.lookupEntrySettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * DataCatalogSettings dataCatalogSettings = dataCatalogSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataCatalogSettings extends ClientSettings { + /** Returns the object with the settings used for calls to lookupEntry. */ + public UnaryCallSettings lookupEntrySettings() { + return ((DataCatalogStubSettings) getStubSettings()).lookupEntrySettings(); + } + + public static final DataCatalogSettings create(DataCatalogStubSettings stub) throws IOException { + return new DataCatalogSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataCatalogStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataCatalogStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataCatalogStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataCatalogStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataCatalogStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataCatalogStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataCatalogStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataCatalogSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataCatalogSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(DataCatalogStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(DataCatalogStubSettings.newBuilder()); + } + + protected Builder(DataCatalogSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataCatalogStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public DataCatalogStubSettings.Builder getStubSettingsBuilder() { + return ((DataCatalogStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to lookupEntry. */ + public UnaryCallSettings.Builder lookupEntrySettings() { + return getStubSettingsBuilder().lookupEntrySettings(); + } + + @Override + public DataCatalogSettings build() throws IOException { + return new DataCatalogSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java new file mode 100644 index 000000000000..384b79ddbb77 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019 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. + */ + +/** + * A client to Google Cloud Data Catalog API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

================= DataCatalogClient ================= + * + *

Service Description: Cloud Data Catalog is a service that allows clients to discover, manage, + * and understand their Google Cloud data resources. + * + *

Sample for DataCatalogClient: + * + *

+ * 
+ * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+ *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
+ *   Entry response = dataCatalogClient.lookupEntry(request);
+ * }
+ * 
+ * 
+ */ +package com.google.cloud.datacatalog.v1beta1; diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStub.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStub.java new file mode 100644 index 000000000000..31f19e675ca9 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStub.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.Entry; +import com.google.cloud.datacatalog.LookupEntryRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Google Cloud Data Catalog API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class DataCatalogStub implements BackgroundResource { + + public UnaryCallable lookupEntryCallable() { + throw new UnsupportedOperationException("Not implemented: lookupEntryCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStubSettings.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStubSettings.java new file mode 100644 index 000000000000..4592470379b1 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStubSettings.java @@ -0,0 +1,264 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datacatalog.Entry; +import com.google.cloud.datacatalog.LookupEntryRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link DataCatalogStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (datacatalog.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of lookupEntry to 30 seconds: + * + *

+ * 
+ * DataCatalogStubSettings.Builder dataCatalogSettingsBuilder =
+ *     DataCatalogStubSettings.newBuilder();
+ * dataCatalogSettingsBuilder.lookupEntrySettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * DataCatalogStubSettings dataCatalogSettings = dataCatalogSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataCatalogStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings lookupEntrySettings; + + /** Returns the object with the settings used for calls to lookupEntry. */ + public UnaryCallSettings lookupEntrySettings() { + return lookupEntrySettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataCatalogStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataCatalogStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "datacatalog.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataCatalogStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataCatalogStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + lookupEntrySettings = settingsBuilder.lookupEntrySettings().build(); + } + + /** Builder for DataCatalogStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder lookupEntrySettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + lookupEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(lookupEntrySettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .lookupEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(DataCatalogStubSettings settings) { + super(settings); + + lookupEntrySettings = settings.lookupEntrySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(lookupEntrySettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to lookupEntry. */ + public UnaryCallSettings.Builder lookupEntrySettings() { + return lookupEntrySettings; + } + + @Override + public DataCatalogStubSettings build() throws IOException { + return new DataCatalogStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/GrpcDataCatalogCallableFactory.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/GrpcDataCatalogCallableFactory.java new file mode 100644 index 000000000000..dd00477af2f6 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/GrpcDataCatalogCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Google Cloud Data Catalog API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcDataCatalogCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/GrpcDataCatalogStub.java b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/GrpcDataCatalogStub.java new file mode 100644 index 000000000000..7ae729b2c320 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/stub/GrpcDataCatalogStub.java @@ -0,0 +1,139 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.Entry; +import com.google.cloud.datacatalog.LookupEntryRequest; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Google Cloud Data Catalog API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcDataCatalogStub extends DataCatalogStub { + + private static final MethodDescriptor lookupEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/LookupEntry") + .setRequestMarshaller(ProtoUtils.marshaller(LookupEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable lookupEntryCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataCatalogStub create(DataCatalogStubSettings settings) + throws IOException { + return new GrpcDataCatalogStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataCatalogStub create(ClientContext clientContext) throws IOException { + return new GrpcDataCatalogStub(DataCatalogStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataCatalogStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataCatalogStub( + DataCatalogStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataCatalogStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDataCatalogStub(DataCatalogStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataCatalogCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataCatalogStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDataCatalogStub( + DataCatalogStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings lookupEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(lookupEntryMethodDescriptor) + .build(); + + this.lookupEntryCallable = + callableFactory.createUnaryCallable( + lookupEntryTransportSettings, settings.lookupEntrySettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable lookupEntryCallable() { + return lookupEntryCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClientTest.java b/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClientTest.java new file mode 100644 index 000000000000..652f1a84e8ec --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClientTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import java.io.IOException; +import java.util.Arrays; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; + +@javax.annotation.Generated("by GAPIC") +public class DataCatalogClientTest { + private static MockDataCatalog mockDataCatalog; + private static MockServiceHelper serviceHelper; + private DataCatalogClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDataCatalog = new MockDataCatalog(); + serviceHelper = + new MockServiceHelper("in-process-1", Arrays.asList(mockDataCatalog)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + DataCatalogSettings settings = + DataCatalogSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataCatalogClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalog.java b/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalog.java new file mode 100644 index 000000000000..f4bbb7645752 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalog.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataCatalog implements MockGrpcService { + private final MockDataCatalogImpl serviceImpl; + + public MockDataCatalog() { + serviceImpl = new MockDataCatalogImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalogImpl.java b/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalogImpl.java new file mode 100644 index 000000000000..236843a9ace4 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalogImpl.java @@ -0,0 +1,74 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.datacatalog.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datacatalog.DataCatalogGrpc.DataCatalogImplBase; +import com.google.cloud.datacatalog.Entry; +import com.google.cloud.datacatalog.LookupEntryRequest; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataCatalogImpl extends DataCatalogImplBase { + private List requests; + private Queue responses; + + public MockDataCatalogImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void lookupEntry(LookupEntryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Entry) { + requests.add(request); + responseObserver.onNext((Entry) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/google-cloud-datacatalog/synth.py b/google-cloud-clients/google-cloud-datacatalog/synth.py new file mode 100644 index 000000000000..9ca0ee898df7 --- /dev/null +++ b/google-cloud-clients/google-cloud-datacatalog/synth.py @@ -0,0 +1,40 @@ +# Copyright 2018 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 +# +# http://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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import synthtool.languages.java as java + +gapic = gcp.GAPICGenerator() +common_templates = gcp.CommonTemplates() + +versions = ['v1beta1'] +service = 'datacatalog' + +for version in versions: + library = gapic.java_library( + service=service, + version=version, + config_path=f'artman_datacatalog_v1beta1.yaml', + artman_output_name='') + + s.copy(library / f'gapic-google-cloud-{service}-{version}/src', 'src') + s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') + s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') + + java.format_code('./src') + java.format_code(f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') + java.format_code(f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') \ No newline at end of file diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index fc6c7cfddacf..78234b101352 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -431,6 +431,7 @@ google-cloud-core-http google-cloud-core-grpc google-cloud-dataproc + google-cloud-datacatalog google-cloud-datalabeling google-cloud-datastore google-cloud-dlp @@ -787,7 +788,7 @@ Stub packages - com.google.cloud.asset.v1.stub:com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.bigquerystorage.v1beta1.stub:com.google.cloud.bigtable-admin.v2.stub:com.google.cloud.bigtable.v2.stub:com.google.cloud.container.v1.stub:com.google.cloud.containeranalysis.v1beta1.stub:com.google.cloud.datalabeling.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.error-reporting.v1beta1.stub:com.google.cloud.firestore-admin.v1.stub:com.google.cloud.firestore.v1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iamcredentials.v1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.os-login.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.securitycenter.v1.stub:com.google.cloud.securitycenter.v1beta1.stub:com.google.cloud.spanner-admin-database.v1.stub:com.google.cloud.spanner-admin-instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.talent.v4beta1.stub:com.google.cloud.tasks.v2.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.tasks.v2beta3.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.translate.v3beta1.stub:com.google.cloud.video-intelligence.v1.stub:com.google.cloud.video-intelligence.v1beta1.stub:com.google.cloud.video-intelligence.v1beta2.stub:com.google.cloud.video-intelligence.v1p1beta1.stub:com.google.cloud.video-intelligence.v1p2beta1.stub:com.google.cloud.video-intelligence.v1p3beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.vision.v1p4beta1.stub:com.google.cloud.webrisk.v1beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub + com.google.cloud.asset.v1.stub:com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.bigquerystorage.v1beta1.stub:com.google.cloud.bigtable-admin.v2.stub:com.google.cloud.bigtable.v2.stub:com.google.cloud.container.v1.stub:com.google.cloud.containeranalysis.v1beta1.stub:com.google.cloud.datacatalog.v1beta1.stub:com.google.cloud.datalabeling.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.error-reporting.v1beta1.stub:com.google.cloud.firestore-admin.v1.stub:com.google.cloud.firestore.v1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iamcredentials.v1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.os-login.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.securitycenter.v1.stub:com.google.cloud.securitycenter.v1beta1.stub:com.google.cloud.spanner-admin-database.v1.stub:com.google.cloud.spanner-admin-instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.talent.v4beta1.stub:com.google.cloud.tasks.v2.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.tasks.v2beta3.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.translate.v3beta1.stub:com.google.cloud.video-intelligence.v1.stub:com.google.cloud.video-intelligence.v1beta1.stub:com.google.cloud.video-intelligence.v1beta2.stub:com.google.cloud.video-intelligence.v1p1beta1.stub:com.google.cloud.video-intelligence.v1p2beta1.stub:com.google.cloud.video-intelligence.v1p3beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.vision.v1p4beta1.stub:com.google.cloud.webrisk.v1beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub Deprecated packages diff --git a/versions.txt b/versions.txt index 0b33031b4e98..bd3649f9db15 100644 --- a/versions.txt +++ b/versions.txt @@ -24,6 +24,7 @@ google-cloud-contrib:0.87.0-alpha:0.87.1-alpha-SNAPSHOT google-cloud-core:1.69.0:1.69.1-SNAPSHOT google-cloud-core-grpc:1.69.0:1.69.1-SNAPSHOT google-cloud-core-http:1.69.0:1.69.1-SNAPSHOT +google-cloud-datacatalog:0.0.0-alpha:0.0.1-alpha-SNAPSHOT google-cloud-datalabeling:0.87.0-alpha:0.87.1-alpha-SNAPSHOT google-cloud-dataproc:0.87.0-alpha:0.87.1-alpha-SNAPSHOT google-cloud-datastore:1.69.0:1.69.1-SNAPSHOT @@ -74,6 +75,7 @@ grpc-google-cloud-bigtable-admin-v2:0.52.0:0.52.1-SNAPSHOT grpc-google-cloud-bigtable-v2:0.52.0:0.52.1-SNAPSHOT grpc-google-cloud-container-v1:0.52.0:0.52.1-SNAPSHOT grpc-google-cloud-containeranalysis-v1beta1:0.52.0:0.52.1-SNAPSHOT +grpc-google-cloud-datacatalog-v1beta1:0.0.0-alpha:0.0.1-alpha-SNAPSHOT grpc-google-cloud-datalabeling-v1beta1:0.52.0:0.52.1-SNAPSHOT grpc-google-cloud-dataproc-v1:0.52.0:0.52.1-SNAPSHOT grpc-google-cloud-dataproc-v1beta2:0.52.0:0.52.1-SNAPSHOT @@ -136,6 +138,7 @@ proto-google-cloud-bigtable-admin-v2:0.52.0:0.52.1-SNAPSHOT proto-google-cloud-bigtable-v2:0.52.0:0.52.1-SNAPSHOT proto-google-cloud-container-v1:0.52.0:0.52.1-SNAPSHOT proto-google-cloud-containeranalysis-v1beta1:0.52.0:0.52.1-SNAPSHOT +proto-google-cloud-datacatalog-v1beta1:0.0.0-alpha:0.0.1-alpha-SNAPSHOT proto-google-cloud-datalabeling-v1beta1:0.52.0:0.52.1-SNAPSHOT proto-google-cloud-dataproc-v1:0.52.0:0.52.1-SNAPSHOT proto-google-cloud-dataproc-v1beta2:0.52.0:0.52.1-SNAPSHOT