public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
/** * <code>string workspace = 3;</code> */ public Builder clearWorkspace() { workspace_ = getDefaultInstance().getWorkspace(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USERNAME_FIELD_NUMBER; hash = (53 * hash) + getUsername().hashCode(); hash = (37 * hash) + PASS_FIELD_NUMBER; hash = (53 * hash) + getPass().hashCode(); hash = (37 * hash) + WORKSPACE_FIELD_NUMBER; hash = (53 * hash) + getWorkspace().hashCode(); if (getParametersCount() > 0) { hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + getParametersList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>string username = 1;</code> */ public Builder clearUsername() { username_ = getDefaultInstance().getUsername(); onChanged(); return this; } /**
/** * <code>string pass = 2;</code> */ public Builder clearPass() { pass_ = getDefaultInstance().getPass(); onChanged(); return this; } /**
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUsernameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); } if (!getPassBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pass_); } if (!getWorkspaceBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, workspace_); } { int dataSize = 0; for (int i = 0; i < parameters_.size(); i++) { dataSize += computeStringSizeNoTag(parameters_.getRaw(i)); } size += dataSize; size += 1 * getParametersList().size(); } 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 org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos)) { return super.equals(obj); } org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos other = (org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos) obj; boolean result = true; result = result && getUsername() .equals(other.getUsername()); result = result && getPass() .equals(other.getPass()); result = result && getWorkspace() .equals(other.getWorkspace()); result = result && getParametersList() .equals(other.getParametersList()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos other) { if (other == org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos.getDefaultInstance()) return this; if (!other.getUsername().isEmpty()) { username_ = other.username_; onChanged(); } if (!other.getPass().isEmpty()) { pass_ = other.pass_; onChanged(); } if (!other.getWorkspace().isEmpty()) { workspace_ = other.workspace_; onChanged(); } if (!other.parameters_.isEmpty()) { if (parameters_.isEmpty()) { parameters_ = other.parameters_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureParametersIsMutable(); parameters_.addAll(other.parameters_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getUsernameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); } if (!getPassBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pass_); } if (!getWorkspaceBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, workspace_); } for (int i = 0; i < parameters_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parameters_.getRaw(i)); } unknownFields.writeTo(output); }
public org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos getDefaultInstanceForType() { return org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos.getDefaultInstance(); }
public org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos buildPartial() { org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos result = new org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.username_ = username_; result.pass_ = pass_; result.workspace_ = workspace_; if (((bitField0_ & 0x00000008) == 0x00000008)) { parameters_ = parameters_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000008); } result.parameters_ = parameters_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@Override public void configGeoServerCommand( org.locationtech.geowave.service.grpc.protobuf.ConfigGeoServerCommandParametersProtos request, StreamObserver<org.locationtech.geowave.service.grpc.protobuf.GeoWaveReturnTypesProtos.StringResponseProtos> responseObserver) { ConfigGeoServerCommand cmd = new ConfigGeoServerCommand(); Map<FieldDescriptor, Object> m = request.getAllFields(); GeoWaveGrpcServiceCommandUtil.setGrpcToCommandFields(m, cmd); final File configFile = GeoWaveGrpcServiceOptions.geowaveConfigFile; final OperationParams params = new ManualOperationParams(); params.getContext().put(ConfigOptions.PROPERTIES_FILE_CONTEXT, configFile); cmd.prepare(params); LOGGER.info("Executing ConfigGeoServerCommand..."); try { final String result = cmd.computeResults(params); final StringResponseProtos resp = StringResponseProtos.newBuilder().setResponseValue(result).build(); responseObserver.onNext(resp); responseObserver.onCompleted(); } catch (final Exception e) { LOGGER.error("Exception encountered executing command", e); } }
public static io.grpc.MethodDescriptor<org.locationtech.geowave.service.grpc.protobuf.GeoServerGetStoreAdapterCommandParametersProtos, org.locationtech.geowave.service.grpc.protobuf.GeoWaveReturnTypesProtos.RepeatedStringResponseProtos> getGeoServerGetStoreAdapterCommandMethod() { io.grpc.MethodDescriptor<org.locationtech.geowave.service.grpc.protobuf.GeoServerGetStoreAdapterCommandParametersProtos, org.locationtech.geowave.service.grpc.protobuf.GeoWaveReturnTypesProtos.RepeatedStringResponseProtos> getGeoServerGetStoreAdapterCommandMethod; if ((getGeoServerGetStoreAdapterCommandMethod = CliGeoserverGrpc.getGeoServerGetStoreAdapterCommandMethod) == null) { synchronized (CliGeoserverGrpc.class) { if ((getGeoServerGetStoreAdapterCommandMethod = CliGeoserverGrpc.getGeoServerGetStoreAdapterCommandMethod) == null) { CliGeoserverGrpc.getGeoServerGetStoreAdapterCommandMethod = getGeoServerGetStoreAdapterCommandMethod = io.grpc.MethodDescriptor.<org.locationtech.geowave.service.grpc.protobuf.GeoServerGetStoreAdapterCommandParametersProtos, org.locationtech.geowave.service.grpc.protobuf.GeoWaveReturnTypesProtos.RepeatedStringResponseProtos>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "CliGeoserver", "GeoServerGetStoreAdapterCommand")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.locationtech.geowave.service.grpc.protobuf.GeoServerGetStoreAdapterCommandParametersProtos.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.locationtech.geowave.service.grpc.protobuf.GeoWaveReturnTypesProtos.RepeatedStringResponseProtos.getDefaultInstance())) .setSchemaDescriptor(new CliGeoserverMethodDescriptorSupplier("GeoServerGetStoreAdapterCommand")) .build(); } } } return getGeoServerGetStoreAdapterCommandMethod; }
public String ConfigGeoServerCommand() { final ArrayList<String> params = new ArrayList<>(); params.add("grpc"); final ConfigGeoServerCommandParametersProtos request = ConfigGeoServerCommandParametersProtos.newBuilder().addAllParameters(params).setWorkspace( "default").setUsername("user").setPass("default").build(); return cliGeoserverBlockingStub.configGeoServerCommand(request).getResponseValue(); }