/** * * * <pre> * The body of the message. * </pre> * * <code>.google.devtools.cloudtrace.v1.Traces traces = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.devtools.cloudtrace.v1.Traces, com.google.devtools.cloudtrace.v1.Traces.Builder, com.google.devtools.cloudtrace.v1.TracesOrBuilder> getTracesFieldBuilder() { if (tracesBuilder_ == null) { tracesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.devtools.cloudtrace.v1.Traces, com.google.devtools.cloudtrace.v1.Traces.Builder, com.google.devtools.cloudtrace.v1.TracesOrBuilder>( getTraces(), getParentForChildren(), isClean()); traces_ = null; } return tracesBuilder_; }
/** * * * <pre> * The body of the message. * </pre> * * <code>.google.devtools.cloudtrace.v1.Traces traces = 2;</code> */ public com.google.devtools.cloudtrace.v1.Traces.Builder getTracesBuilder() { onChanged(); return getTracesFieldBuilder().getBuilder(); } /**
/** * Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a trace that you * send matches that of an existing trace, any fields in the existing trace and its spans are * overwritten by the provided values, and any new fields provided are merged with the existing * trace data. If the ID does not match, a new trace is created. * * <p>Sample code: * * <pre><code> * try (TraceServiceClient traceServiceClient = TraceServiceClient.create()) { * String projectId = ""; * Traces traces = Traces.newBuilder().build(); * traceServiceClient.patchTraces(projectId, traces); * } * </code></pre> * * @param projectId ID of the Cloud project where the trace data is stored. * @param traces The body of the message. * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void patchTraces(String projectId, Traces traces) { PatchTracesRequest request = PatchTracesRequest.newBuilder().setProjectId(projectId).setTraces(traces).build(); patchTraces(request); }
@Override public void receive(Traces traces) { if (traces.getTracesCount() == 0) { return; } String projectId = traces.getTraces(0).getProjectId(); PatchTracesRequest.Builder requestBuilder = PatchTracesRequest.newBuilder() .setProjectId(projectId) .setTraces(traces); traceService.patchTraces(requestBuilder.build()); }
/** * Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a trace that you * send matches that of an existing trace, any fields in the existing trace and its spans are * overwritten by the provided values, and any new fields provided are merged with the existing * trace data. If the ID does not match, a new trace is created. * * <p>Sample code: * * <pre><code> * try (TraceServiceClient traceServiceClient = TraceServiceClient.create()) { * String projectId = ""; * Traces traces = Traces.newBuilder().build(); * traceServiceClient.patchTraces(projectId, traces); * } * </code></pre> * * @param projectId ID of the Cloud project where the trace data is stored. * @param traces The body of the message. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void patchTraces(String projectId, Traces traces) { PatchTracesRequest request = PatchTracesRequest.newBuilder().setProjectId(projectId).setTraces(traces).build(); patchTraces(request); }
private Builder() { maybeForceBuilderInitialization(); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public com.google.devtools.cloudtrace.v1.PatchTracesRequest build() { com.google.devtools.cloudtrace.v1.PatchTracesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }