Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

feat: add read_mask to ListPipelineJobsRequest in aiplatform v1 pipeline_service #1032

Merged
merged 4 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ public final ListPipelineJobsPagedResponse listPipelineJobs(String parent) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setReadMask(FieldMask.newBuilder().build())
* .build();
* for (PipelineJob element : pipelineServiceClient.listPipelineJobs(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -1188,6 +1189,7 @@ public final ListPipelineJobsPagedResponse listPipelineJobs(ListPipelineJobsRequ
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setReadMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<PipelineJob> future =
* pipelineServiceClient.listPipelineJobsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -1220,6 +1222,7 @@ public final ListPipelineJobsPagedResponse listPipelineJobs(ListPipelineJobsRequ
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setReadMask(FieldMask.newBuilder().build())
* .build();
* while (true) {
* ListPipelineJobsResponse response =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ private ListPipelineJobsRequest(
java.lang.String s = input.readStringRequireUtf8();

orderBy_ = s;
break;
}
case 58:
{
com.google.protobuf.FieldMask.Builder subBuilder = null;
if (readMask_ != null) {
subBuilder = readMask_.toBuilder();
}
readMask_ =
input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(readMask_);
readMask_ = subBuilder.buildPartial();
}

break;
}
default:
Expand Down Expand Up @@ -446,6 +461,52 @@ public com.google.protobuf.ByteString getOrderByBytes() {
}
}

public static final int READ_MASK_FIELD_NUMBER = 7;
private com.google.protobuf.FieldMask readMask_;
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*
* @return Whether the readMask field is set.
*/
@java.lang.Override
public boolean hasReadMask() {
return readMask_ != null;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*
* @return The readMask.
*/
@java.lang.Override
public com.google.protobuf.FieldMask getReadMask() {
return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
@java.lang.Override
public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() {
return getReadMask();
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -475,6 +536,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_);
}
if (readMask_ != null) {
output.writeMessage(7, getReadMask());
}
unknownFields.writeTo(output);
}

Expand All @@ -499,6 +563,9 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_);
}
if (readMask_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getReadMask());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -520,6 +587,10 @@ public boolean equals(final java.lang.Object obj) {
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
if (!getOrderBy().equals(other.getOrderBy())) return false;
if (hasReadMask() != other.hasReadMask()) return false;
if (hasReadMask()) {
if (!getReadMask().equals(other.getReadMask())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
Expand All @@ -541,6 +612,10 @@ public int hashCode() {
hash = (53 * hash) + getPageToken().hashCode();
hash = (37 * hash) + ORDER_BY_FIELD_NUMBER;
hash = (53 * hash) + getOrderBy().hashCode();
if (hasReadMask()) {
hash = (37 * hash) + READ_MASK_FIELD_NUMBER;
hash = (53 * hash) + getReadMask().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -697,6 +772,12 @@ public Builder clear() {

orderBy_ = "";

if (readMaskBuilder_ == null) {
readMask_ = null;
} else {
readMask_ = null;
readMaskBuilder_ = null;
}
return this;
}

Expand Down Expand Up @@ -729,6 +810,11 @@ public com.google.cloud.aiplatform.v1.ListPipelineJobsRequest buildPartial() {
result.pageSize_ = pageSize_;
result.pageToken_ = pageToken_;
result.orderBy_ = orderBy_;
if (readMaskBuilder_ == null) {
result.readMask_ = readMask_;
} else {
result.readMask_ = readMaskBuilder_.build();
}
onBuilt();
return result;
}
Expand Down Expand Up @@ -798,6 +884,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListPipelineJobsRequest
orderBy_ = other.orderBy_;
onChanged();
}
if (other.hasReadMask()) {
mergeReadMask(other.getReadMask());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
Expand Down Expand Up @@ -1529,6 +1618,185 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
return this;
}

private com.google.protobuf.FieldMask readMask_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.FieldMask,
com.google.protobuf.FieldMask.Builder,
com.google.protobuf.FieldMaskOrBuilder>
readMaskBuilder_;
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*
* @return Whether the readMask field is set.
*/
public boolean hasReadMask() {
return readMaskBuilder_ != null || readMask_ != null;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*
* @return The readMask.
*/
public com.google.protobuf.FieldMask getReadMask() {
if (readMaskBuilder_ == null) {
return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_;
} else {
return readMaskBuilder_.getMessage();
}
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
public Builder setReadMask(com.google.protobuf.FieldMask value) {
if (readMaskBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
readMask_ = value;
onChanged();
} else {
readMaskBuilder_.setMessage(value);
}

return this;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) {
if (readMaskBuilder_ == null) {
readMask_ = builderForValue.build();
onChanged();
} else {
readMaskBuilder_.setMessage(builderForValue.build());
}

return this;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
public Builder mergeReadMask(com.google.protobuf.FieldMask value) {
if (readMaskBuilder_ == null) {
if (readMask_ != null) {
readMask_ =
com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial();
} else {
readMask_ = value;
}
onChanged();
} else {
readMaskBuilder_.mergeFrom(value);
}

return this;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
public Builder clearReadMask() {
if (readMaskBuilder_ == null) {
readMask_ = null;
onChanged();
} else {
readMask_ = null;
readMaskBuilder_ = null;
}

return this;
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() {

onChanged();
return getReadMaskFieldBuilder().getBuilder();
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() {
if (readMaskBuilder_ != null) {
return readMaskBuilder_.getMessageOrBuilder();
} else {
return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_;
}
}
/**
*
*
* <pre>
* Mask specifying which fields to read.
* </pre>
*
* <code>.google.protobuf.FieldMask read_mask = 7;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.FieldMask,
com.google.protobuf.FieldMask.Builder,
com.google.protobuf.FieldMaskOrBuilder>
getReadMaskFieldBuilder() {
if (readMaskBuilder_ == null) {
readMaskBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.FieldMask,
com.google.protobuf.FieldMask.Builder,
com.google.protobuf.FieldMaskOrBuilder>(
getReadMask(), getParentForChildren(), isClean());
readMask_ = null;
}
return readMaskBuilder_;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Loading