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

docs: fix docstring formatting #79

Merged
merged 2 commits into from Oct 21, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -125,7 +125,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Expand Up @@ -134,7 +134,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Expand Up @@ -303,13 +303,13 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getServiceNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
}
if (allocateOperation_ != null) {
output.writeMessage(2, getAllocateOperation());
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceConfigId_);
}
unknownFields.writeTo(output);
Expand All @@ -321,13 +321,13 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getServiceNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
}
if (allocateOperation_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAllocateOperation());
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceConfigId_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -441,7 +441,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getOperationIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operationId_);
}
for (int i = 0; i < allocateErrors_.size(); i++) {
Expand All @@ -450,7 +450,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < quotaMetrics_.size(); i++) {
output.writeMessage(3, quotaMetrics_.get(i));
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceConfigId_);
}
unknownFields.writeTo(output);
Expand All @@ -462,7 +462,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getOperationIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operationId_);
}
for (int i = 0; i < allocateErrors_.size(); i++) {
Expand All @@ -471,7 +471,7 @@ public int getSerializedSize() {
for (int i = 0; i < quotaMetrics_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, quotaMetrics_.get(i));
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceConfigId_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -921,13 +921,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
!= com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, code_);
}
if (!getDetailBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_);
}
if (status_ != null) {
output.writeMessage(3, getStatus());
}
if (!getSubjectBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subject_);
}
unknownFields.writeTo(output);
Expand All @@ -943,13 +943,13 @@ public int getSerializedSize() {
!= com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_);
}
if (!getDetailBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, detail_);
}
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus());
}
if (!getSubjectBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subject_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -309,13 +309,13 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getServiceNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
}
if (operation_ != null) {
output.writeMessage(2, getOperation());
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceConfigId_);
}
unknownFields.writeTo(output);
Expand All @@ -327,13 +327,13 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getServiceNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
}
if (operation_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOperation());
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceConfigId_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -2685,19 +2685,19 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getOperationIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operationId_);
}
for (int i = 0; i < checkErrors_.size(); i++) {
output.writeMessage(2, checkErrors_.get(i));
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceConfigId_);
}
if (checkInfo_ != null) {
output.writeMessage(6, getCheckInfo());
}
if (!getServiceRolloutIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceRolloutId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, serviceRolloutId_);
}
unknownFields.writeTo(output);
Expand All @@ -2709,19 +2709,19 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getOperationIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operationId_);
}
for (int i = 0; i < checkErrors_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, checkErrors_.get(i));
}
if (!getServiceConfigIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceConfigId_);
}
if (checkInfo_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCheckInfo());
}
if (!getServiceRolloutIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceRolloutId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, serviceRolloutId_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -25,10 +25,10 @@
* Distribution represents a frequency distribution of double-valued sample
* points. It contains the size of the population of sample points plus
* additional optional information:
* - the arithmetic mean of the samples
* - the minimum and maximum of the samples
* - the sum-squared-deviation of the samples, used to compute variance
* - a histogram of the values of the sample points
* * the arithmetic mean of the samples
* * the minimum and maximum of the samples
* * the sum-squared-deviation of the samples, used to compute variance
* * a histogram of the values of the sample points
* </pre>
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution}
Expand Down Expand Up @@ -3513,10 +3513,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* Distribution represents a frequency distribution of double-valued sample
* points. It contains the size of the population of sample points plus
* additional optional information:
* - the arithmetic mean of the samples
* - the minimum and maximum of the samples
* - the sum-squared-deviation of the samples, used to compute variance
* - a histogram of the values of the sample points
* * the arithmetic mean of the samples
* * the minimum and maximum of the samples
* * the sum-squared-deviation of the samples, used to compute variance
* * a histogram of the values of the sample points
* </pre>
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution}
Expand Down
Expand Up @@ -766,10 +766,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getRequestMethodBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestMethod_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestMethod_);
}
if (!getRequestUrlBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestUrl_);
}
if (requestSize_ != 0L) {
Expand All @@ -781,13 +781,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (responseSize_ != 0L) {
output.writeInt64(5, responseSize_);
}
if (!getUserAgentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, userAgent_);
}
if (!getRemoteIpBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteIp_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, remoteIp_);
}
if (!getRefererBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, referer_);
}
if (cacheHit_ != false) {
Expand All @@ -802,13 +802,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (cacheFillBytes_ != 0L) {
output.writeInt64(12, cacheFillBytes_);
}
if (!getServerIpBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverIp_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, serverIp_);
}
if (latency_ != null) {
output.writeMessage(14, getLatency());
}
if (!getProtocolBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 15, protocol_);
}
unknownFields.writeTo(output);
Expand All @@ -820,10 +820,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getRequestMethodBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestMethod_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestMethod_);
}
if (!getRequestUrlBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestUrl_);
}
if (requestSize_ != 0L) {
Expand All @@ -835,13 +835,13 @@ public int getSerializedSize() {
if (responseSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, responseSize_);
}
if (!getUserAgentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, userAgent_);
}
if (!getRemoteIpBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteIp_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, remoteIp_);
}
if (!getRefererBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, referer_);
}
if (cacheHit_ != false) {
Expand All @@ -858,13 +858,13 @@ public int getSerializedSize() {
if (cacheFillBytes_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, cacheFillBytes_);
}
if (!getServerIpBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverIp_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, serverIp_);
}
if (latency_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLatency());
}
if (!getProtocolBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, protocol_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -1011,13 +1011,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (payloadCase_ == 3) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, payload_);
}
if (!getInsertIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(insertId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, insertId_);
}
if (payloadCase_ == 6) {
output.writeMessage(6, (com.google.protobuf.Struct) payload_);
}
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, name_);
}
if (timestamp_ != null) {
Expand All @@ -1031,7 +1031,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (httpRequest_ != null) {
output.writeMessage(14, getHttpRequest());
}
if (!getTraceBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trace_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 15, trace_);
}
if (operation_ != null) {
Expand All @@ -1057,15 +1057,15 @@ public int getSerializedSize() {
if (payloadCase_ == 3) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, payload_);
}
if (!getInsertIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(insertId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, insertId_);
}
if (payloadCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, (com.google.protobuf.Struct) payload_);
}
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, name_);
}
if (timestamp_ != null) {
Expand All @@ -1087,7 +1087,7 @@ public int getSerializedSize() {
if (httpRequest_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getHttpRequest());
}
if (!getTraceBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trace_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, trace_);
}
if (operation_ != null) {
Expand Down
Expand Up @@ -284,10 +284,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getProducerBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producer_);
}
if (first_ != false) {
Expand All @@ -305,10 +305,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!getProducerBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producer_);
}
if (first_ != false) {
Expand Down